42 <<
"Ostream::decrIndent() : attempt to decrement 0 indent level\n";
53 const std::string& str,
57 return writeQuoted(str.data(), str.size(), quoted);
63 return writeQuoted(kw.data(), kw.size(), kw.
isPattern());
70 writeQuoted(kw.data(), kw.size(), kw.
isPattern());
78 label padding = (entryIndentation_ - label(kw.size()));
91 while (--padding > 0);
99 indent(); writeQuoted(kw.data(), kw.size(), kw.isPattern());
write(
'\n');
Begin block [isseparator].
A class for handling keywords in dictionaries.
unsigned short indentLevel_
Current indent level.
Ostream & indent(Ostream &os)
Indent stream.
virtual Ostream & beginBlock()
Write begin block group without a name.
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true)=0
Write character/string content, with/without surrounding quotes.
void decrIndent()
Decrement the indent level.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
virtual Ostream & endBlock()
Write end block group.
bool isPattern() const noexcept
The keyType is treated as a pattern, not as literal string.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & beginBlock(Ostream &os)
Write begin block group without a name.
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.