Go to the documentation of this file.
48 template<
class Container,
class Delimiters>
class OutputAdaptor;
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;
75 static constexpr
char separator = SepChar;
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;
193 const OutputAdaptor<Container, Delimiters>& adaptor
213 template<
class Container,
class Delimiters>
214 inline FlatOutput::OutputAdaptor<Container, Delimiters>
217 const Container& obj,
226 template<
class Container>
227 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)
Surround with '{' and '}' separate with ' '.
Surround with '<' and '>' separate with ','.
static constexpr char separator
Surround with '[' and ']' separate with ' '.
Surround with '<' and '>' separate with ' '.
OBJstream os(runTime.globalPath()/outputName)
virtual bool write(const token &tok)=0
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
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,...