Go to the documentation of this file.
54 template<
class Container,
class Delimiters>
70 template<
char OpenChar,
char CloseChar,
char SepChar>
73 static constexpr
char open = OpenChar;
74 static constexpr
char close = CloseChar;
80 #define makeDecorator(Name, Open, Close, Sep) \
82 struct Name : public Decorators<Open, Close, Sep> {};
126 template<
class Container,
class Delimiters>
132 const Container& values;
155 bool started =
false;
159 if (Delimiters::open)
161 os << Delimiters::open;
163 for (
const auto& item : values)
167 if (Delimiters::separator)
169 os << Delimiters::separator;
178 if (Delimiters::close)
180 os << Delimiters::close;
194 const OutputAdaptor<Container, Delimiters>& adaptor
197 return adaptor.
write(os);
214 template<
class Container,
class Delimiters>
215 inline FlatOutput::OutputAdaptor<Container, Delimiters>
218 const Container& obj,
227 template<
class Container>
228 inline FlatOutput::OutputAdaptor<Container, FlatOutput::ParenSpace>
Surround with '(' and ')' separate with ','.
#define makeDecorator(Name, Open, Close, Sep)
static constexpr char open
static constexpr char close
Surround with '[' and ']' separate with ','.
Ostream & write(Ostream &os) const
OutputAdaptor(const Container &obj)
Construct from component.
Surround with '{' and '}' separate with ' '.
messageStream Info
Information stream (uses stdout - output is on the master only)
Surround with '<' and '>' separate with ','.
static constexpr char separator
Surround with '[' and ']' separate with ' '.
Surround with '<' and '>' separate with ' '.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
List decorators with open, close and separator characters.
Surround with '\0' and '\0' separate with ','.
Surround with '\0' and '\0' separate with ' '.
Surround with '(' and ')' separate with ' '.
Surround with '{' and '}' separate with ','.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An output adaptor with a write method and an Ostream operator.