45 template <
typename T,
typename U>
46 inline ostream& operator<< (ostream& os, const std::pair<T,U>& p);
49 inline ostream& operator<<(ostream& os, const std::vector<T>& v);
52 inline ostream& operator<<(ostream& os, const std::set<T>& v);
55 inline ostream& operator<<(ostream& os, const std::list<T>& v);
57 template<
typename T,
typename U>
58 inline ostream& operator<<(ostream& os, const std::map<T,U>& m);
100 template<
class ITER>
void showDataIter (ostream&,
101 ITER begin,
const ITER& end,
102 const char* separator=
",",
103 const char* prefix=
"[",
104 const char* postfix=
"]");
112 const char* separator=
",",
113 const char* prefix=
"[",
114 const char* postfix=
"]")
115 { showDataIter (os, c.begin(), c.end(), separator, prefix, postfix); }
118 template <
typename T,
typename U>
119 inline ostream& operator<< (ostream& os, const std::pair<T,U>& p)
121 os <<
'<' << p.first <<
',' << p.second <<
'>';
128 inline ostream& operator<<(ostream& os, const std::vector<T>& v)
130 showContainer (os, v,
",",
"[",
"]");
137 inline ostream& operator<<(ostream& os, const std::set<T>& v)
139 showContainer (os, v,
",",
"[",
"]");
146 inline ostream& operator<<(ostream& os, const std::list<T>& v)
148 showContainer (os, v,
",",
"[",
"]");
154 template<
typename T,
typename U>
155 inline ostream& operator<<(ostream& os, const std::map<T,U>& m)
157 showContainer (os, m,
", ",
"{",
"}");
164 inline LogIO& operator<<(LogIO &os, const std::vector<T> &a)
165 { os.
output() << a;
return os; }
167 inline LogIO& operator<<(LogIO &os, const std::set<T> &a)
168 { os.
output() << a;
return os; }
170 inline LogIO& operator<<(LogIO &os, const std::list<T> &a)
171 { os.
output() << a;
return os; }
172 template<
typename T,
typename U>
173 inline LogIO& operator<<(LogIO& os, const std::map<T,U>& a)
174 { os.
output() << a;
return os; }
184 AipsIO& operator<< (AipsIO& ios, const std::vector<T>&);
191 template<
typename K,
typename V>
193 template<
typename K,
typename V>
194 AipsIO& operator<< (AipsIO& ios, const std::map<K,V>&);
199 #ifndef CASACORE_NO_AUTO_TEMPLATES
200 #include <casacore/casa/BasicSL/STLIO.tcc>
201 #endif //# CASACORE_NO_AUTO_TEMPLATES
void showContainer(ostream &os, const CONTAINER &c, const char *separator=",", const char *prefix="[", const char *postfix="]")
Write out an ascii representation of any container having a forward iterator.
AipsIO is the object persistency mechanism of Casacore.
ostream-like interface to creating log messages.
ostream & output()
Acumulate output in this ostream.
const Double c
Fundamental physical constants (SI units):
AipsIO & operator>>(AipsIO &os, Record &rec)