32 #include <casacore/casa/aips.h> 33 #include <casacore/casa/iostream.h> 34 #include <casacore/casa/Logging/LogIO.h> 85 template<
class ITER>
void showDataIter (ostream&,
86 ITER begin,
const ITER& end,
87 const char* separator=
",",
88 const char* prefix=
"[",
89 const char* postfix=
"]");
96 template<
class CONTAINER>
void showContainer (ostream& os,
const CONTAINER& c,
97 const char* separator=
",",
98 const char* prefix=
"[",
99 const char* postfix=
"]")
100 { showDataIter (os, c.begin(), c.end(), separator, prefix, postfix); }
103 template <
typename T,
typename U>
104 inline ostream& operator<< (ostream& os, const std::pair<T,U>& p)
106 os <<
'<' << p.first <<
',' << p.second <<
'>';
113 inline ostream& operator<<(ostream& os, const std::vector<T>& v)
115 showContainer (os, v,
",",
"[",
"]");
122 inline ostream& operator<<(ostream& os, const std::set<T>& v)
124 showContainer (os, v,
",",
"[",
"]");
131 inline ostream& operator<<(ostream& os, const std::list<T>& v)
133 showContainer (os, v,
",",
"[",
"]");
139 template<
typename T,
typename U>
140 inline ostream& operator<<(ostream& os, const std::map<T,U>& m)
142 showContainer (os, m,
", ",
"{",
"}");
149 inline LogIO& operator<<(LogIO &os, const std::vector<T> &a)
150 { os.output() << a;
return os; }
152 inline LogIO& operator<<(LogIO &os, const std::set<T> &a)
153 { os.output() << a;
return os; }
155 inline LogIO& operator<<(LogIO &os, const std::list<T> &a)
156 { os.output() << a;
return os; }
157 template<
typename T,
typename U>
158 inline LogIO& operator<<(LogIO& os, const std::map<T,U>& a)
159 { os.output() << a;
return os; }
167 AipsIO&
operator>> (AipsIO& ios, std::vector<T>&);
169 AipsIO& operator<< (AipsIO& ios, const std::vector<T>&);
174 #ifndef CASACORE_NO_AUTO_TEMPLATES 175 #include <casacore/casa/BasicSL/STLIO.tcc> 176 #endif //# CASACORE_NO_AUTO_TEMPLATES AipsIO & operator>>(AipsIO &os, Record &rec)
this file contains all the compiler specific defines