32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/iostream.h>
34 #include <casacore/casa/Logging/LogIO.h>
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);
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,
", ",
"{",
"}");
165 { os.
output() << a;
return os; }
168 { os.
output() << a;
return os; }
171 { os.
output() << a;
return os; }
172 template<
typename T,
typename U>
174 { os.
output() << a;
return os; }
191 template<
typename K,
typename V>
193 template<
typename K,
typename V>
199 #ifndef CASACORE_NO_AUTO_TEMPLATES
200 #include <casacore/casa/BasicSL/STLIO.tcc>
ostream & output()
Acumulate output in this ostream.
const Double c
Fundamental physical constants (SI units):
this file contains all the compiler specific defines
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
AipsIO & operator>>(AipsIO &os, Record &rec)
ostream & operator<<(ostream &os, const std::set< T > &v)
Write the contents of a set enclosed in square brackets, using a comma as separator.
ostream & operator<<(ostream &os, const std::vector< T > &v)
Write the contents of a vector enclosed in square brackets, using a comma as separator.
LogIO & operator<<(LogIO &os, const std::map< T, U > &a)
LogIO & operator<<(LogIO &os, const std::list< T > &a)
LogIO & operator<<(LogIO &os, const std::set< T > &a)
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.
void showDataIter(ostream &, ITER begin, const ITER &end, const char *separator=",", const char *prefix="[", const char *postfix="]")
Write out an ascii representation of any container using the given begin and end iterator.
ostream & operator<<(ostream &os, const std::map< T, U > &m)
Print the contents of a map enclosed in braces, using a comma as separator.
LogIO & operator<<(LogIO &os, const std::vector< T > &a)
Print the contents of a container on LogIO.
ostream & operator<<(ostream &os, const std::list< T > &v)
Write the contents of a list enclosed in square brackets, using a comma as separator.