30#include <casacore/casa/aips.h>
31#include <casacore/casa/iostream.h>
32#include <casacore/casa/Logging/LogIO.h>
43template <
typename T,
typename U>
44inline ostream&
operator<<(ostream& os,
const std::pair<T, U>& p);
47inline ostream&
operator<<(ostream& os,
const std::vector<T>& v);
50inline ostream&
operator<<(ostream& os,
const std::set<T>& v);
53inline ostream&
operator<<(ostream& os,
const std::list<T>& v);
55template <
typename T,
typename U>
56inline ostream&
operator<<(ostream& os,
const std::map<T, U>& m);
100 const char* prefix =
"[",
const char* postfix =
"]");
107template <
class CONTAINER>
108void showContainer(ostream& os,
const CONTAINER& c,
const char* separator =
",",
109 const char* prefix =
"[",
const char* postfix =
"]") {
110 showDataIter(os, c.begin(), c.end(), separator, prefix, postfix);
114template <
typename T,
typename U>
115inline ostream&
operator<<(ostream& os,
const std::pair<T, U>& p) {
116 os <<
'<' << p.first <<
',' << p.second <<
'>';
123inline ostream&
operator<<(ostream& os,
const std::vector<T>& v) {
131inline ostream&
operator<<(ostream& os,
const std::set<T>& v) {
139inline ostream&
operator<<(ostream& os,
const std::list<T>& v) {
146template <
typename T,
typename U>
147inline ostream&
operator<<(ostream& os,
const std::map<T, U>& m) {
169template <
typename T,
typename U>
190template <
typename K,
typename V>
192template <
typename K,
typename V>
198#ifndef CASACORE_NO_AUTO_TEMPLATES
199#include <casacore/casa/BasicSL/STLIO.tcc>
ostream & output()
Acumulate output in this ostream.
For temporary backward namespace compatibility, use casa as alias for casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
iterator begin()
Get the begin and end iterator object for this block.
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.
AipsIO & operator>>(AipsIO &ios, std::map< K, V > &)
Read and write the contents of a map object from/to AipsIO.
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.
AipsIO & operator<<(AipsIO &ios, const std::map< K, V > &)
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.
AipsIO & operator<<(AipsIO &ios, const std::vector< T > &)
ostream & operator<<(ostream &os, const std::vector< T > &v)
Write the contents of a vector enclosed in square brackets, using a comma as separator.