30#include <casacore/casa/aips.h>
31#include <casacore/casa/iostream.h>
32#include <casacore/casa/Logging/LogIO.h>
43 template <
typename T,
typename U>
44 inline ostream&
operator<< (ostream& os,
const std::pair<T,U>& p);
47 inline ostream&
operator<<(ostream& os,
const std::vector<T>& v);
50 inline ostream&
operator<<(ostream& os,
const std::set<T>& v);
53 inline ostream&
operator<<(ostream& os,
const std::list<T>& v);
55 template<
typename T,
typename U>
56 inline ostream&
operator<<(ostream& os,
const std::map<T,U>& m);
99 ITER begin,
const ITER& end,
100 const char* separator=
",",
101 const char* prefix=
"[",
102 const char* postfix=
"]");
109 template<
class CONTAINER>
void showContainer (ostream& os,
const CONTAINER& c,
110 const char* separator=
",",
111 const char* prefix=
"[",
112 const char* postfix=
"]")
113 { showDataIter (os, c.begin(), c.end(), separator, prefix, postfix); }
116 template <
typename T,
typename U>
117 inline ostream&
operator<< (ostream& os,
const std::pair<T,U>& p)
119 os <<
'<' << p.first <<
',' << p.second <<
'>';
126 inline ostream&
operator<<(ostream& os,
const std::vector<T>& v)
128 showContainer (os, v,
",",
"[",
"]");
135 inline ostream&
operator<<(ostream& os,
const std::set<T>& v)
137 showContainer (os, v,
",",
"[",
"]");
144 inline ostream&
operator<<(ostream& os,
const std::list<T>& v)
146 showContainer (os, v,
",",
"[",
"]");
152 template<
typename T,
typename U>
153 inline ostream&
operator<<(ostream& os,
const std::map<T,U>& m)
155 showContainer (os, m,
", ",
"{",
"}");
163 { os.
output() << a;
return os; }
166 { os.
output() << a;
return os; }
169 { os.
output() << a;
return os; }
170 template<
typename T,
typename U>
172 { os.
output() << a;
return os; }
189 template<
typename K,
typename V>
191 template<
typename K,
typename V>
197#ifndef CASACORE_NO_AUTO_TEMPLATES
198#include <casacore/casa/BasicSL/STLIO.tcc>
ostream & output()
Acumulate output in this ostream.
this file contains all the compiler specific defines
AipsIO & operator>>(AipsIO &os, Record &rec)
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
LogIO & operator<<(LogIO &os, const std::list< T > &a)
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.
LogIO & operator<<(LogIO &os, const std::set< T > &a)
ostream & operator<<(ostream &os, const std::pair< T, U > &p)
Write a std::pair.
ostream & operator<<(ostream &os, const std::set< T > &v)
Write the contents of a set enclosed in square brackets, using a comma as separator.
AipsIO & operator>>(AipsIO &ios, std::vector< T > &)
Read or write the contents of an STL vector from/to AipsIO.
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::map< T, U > &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::vector< T > &v)
Write the contents of a vector enclosed in square brackets, using a comma as separator.