Go to the documentation of this file.
22 #ifndef __iOstream_hpp__
23 #define __iOstream_hpp__
112 const bool quoted=
true
143 virtual void indent() = 0;
234 virtual void flush() = 0;
237 virtual void endl() = 0;
240 virtual char fill()
const = 0;
243 virtual char fill(
const char fillch) = 0;
246 virtual int width()
const = 0;
249 virtual int width(
const int w) = 0;
265 return const_cast<iOstream&
>(*this);
361 return os.
write(buf);
372 return os.
write(val);
377 return os.
write(val);
382 return os.
write(val);
387 return os.
write(val);
392 return os.
write(val);
397 return os.
write(val);
402 return os.
write(val);
407 return os.
write(val);
413 return os.
write(val);
416 constexpr
char tab =
'\t';
417 constexpr
char nl =
'\n';
virtual ~iOstream()=default
Destructor.
virtual iOstream & beginBlock(const word &kw)
Write begin block group with a name Increments indentation, adds newline.
virtual bool write(const token &tok)=0
Write Functions.
iOstream & endBlock(iOstream &os)
Write end block group.
virtual int precision() const =0
Get precision of output field.
virtual void endl()=0
Add newline and flush stream.
virtual iOstream & endBlock()
Write end block group Decrements indentation, adds newline.
virtual iOstream & newLine()
Write a newLine to stream.
iOstream & endEntry(iOstream &os)
Write end entry (';') followed by newline.
virtual void indent()=0
Add indentation characters.
virtual int width() const =0
Get width of output field.
iOstream & decrIndent(iOstream &os)
Decrement the indent level.
unsigned short & indentSize()
Access to indent size.
unsigned short indentLevel() const
Return indent level.
iOstream & flush(iOstream &os)
Flush stream.
iOstream & endl(iOstream &os)
Add newline and flush stream.
iOstream & operator()() const
Return a non-const reference to const iOstream Needed for write functions where the stream argument i...
iOstream & indent(iOstream &os)
Indent stream.
unsigned short indentSize() const
Return indent level.
IOstream &(* IOstreamManip)(IOstream &)
An IOstream manipulator.
unsigned short & indentLevel()
Access to indent level.
void incrIndent()
Increment the indent level.
unsigned short int uint16
void decrIndent()
Decrement the indent level.
iOstream & incrIndent(iOstream &os)
Increment the indent level.
const char * defaultColor
virtual void flush()=0
Flush stream.
virtual iOstream & beginSquare()
Write begin list "[".
virtual iOstream & endEntry()
Write end entry (';') followed by newline.
auto count(const Vector< T, Allocator > &vec, const T &val)
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
virtual iOstream & writeQuoted(const word &str, const bool quoted=true)=0
Write std::string surrounded by quotes.
iOstream(writeFormat wF)
Construct from writeFormat.
virtual iOstream & endSquare()
Write end list "]".
const char * magentaColor
unsigned short indentSize_
Number of spaces per indent level.
virtual iOstream & endList()
Write end list ")".
iOstream & beginBlock(iOstream &os)
Write begin block group without a name.
virtual iOstream & beginList()
Write begin list "(".
static constexpr const unsigned short entryIndentation_
Indentation of the entry from the start of the keyword.
virtual char fill() const =0
Get padding character.
virtual iOstream & space(int32 n=1)
Write space to stream.
virtual iOstream & writeWordKeyword(const word &kw)
Write the keyword followed by an appropriate indentation.
iOstream & writeWordEntry(const word &key, const T &value)
Write a keyword/value entry.
virtual iOstream & beginBlock()
Write begin block group without a name Increments indentation, adds newline.
iOstream &(* iOstreamManip)(iOstream &)
An iOstream manipulator.
unsigned short indentLevel_
Current indent level.