Go to the documentation of this file.
124 const std::string& str,
125 const bool quoted=
true
147 std::streamsize
count
159 virtual void indent() = 0;
238 if (value1 != value2)
250 virtual void flush() = 0;
253 virtual void endl() = 0;
256 virtual char fill()
const = 0;
259 virtual char fill(
const char fillch) = 0;
262 virtual int width()
const = 0;
265 virtual int width(
const int w) = 0;
281 return const_cast<Ostream&
>(*this);
372 constexpr
char tab =
'\t';
373 constexpr
char nl =
'\n';
static constexpr const unsigned short entryIndentation_
Indentation of the entry from the start of the keyword.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
label ListType::const_reference val
double doubleScalar
Floating-point double precision scalar type.
unsigned short & indentLevel()
Access to indent level.
A class for handling words, derived from Foam::string.
Ostream & operator()() const
Return a non-const reference to const Ostream.
virtual ~Ostream()=default
Destructor.
float floatScalar
Floating-point single precision scalar type.
virtual Ostream & writeQuoted(const std::string &str, const bool quoted=true)=0
Write std::string surrounded by quotes.
IOstream &(* IOstreamManip)(IOstream &)
An IOstream manipulator.
An IOstream is an abstract base class for all input/output systems; be they streams,...
streamFormat format() const noexcept
Get the current stream format.
static const versionNumber currentVersion
The current version number.
virtual bool beginRawWrite(std::streamsize count)=0
Emit begin marker for low-level raw binary output.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A token holds an item read from Istream.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
virtual int precision() const =0
Get precision of output field.
A class for handling keywords in dictionaries.
Ostream & flush(Ostream &os)
Flush stream.
virtual Ostream & beginBlock()
Write begin block group without a name.
Representation of a major/minor version number.
virtual void endl()=0
Add newline and flush stream.
IOstream(const IOstreamOption option)
Construct with specified stream option.
Ostream &(* OstreamManip)(Ostream &)
An Ostream manipulator.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
Ostream(streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
Construct and set stream status.
void decrIndent()
Decrement the indent level.
versionNumber version() const noexcept
Get the stream version.
virtual Ostream & endBlock()
Write end block group.
streamFormat
Data format (ascii | binary)
Ostream & endBlock(Ostream &os)
Write end block group.
unsigned short indentSize() const
Return indent level.
Ostream & beginBlock(Ostream &os)
Write begin block group without a name.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
unsigned short indentLevel() const
Return indent level.
Ostream & indent(Ostream &os)
Indent stream.
virtual void flush()=0
Flush stream.
unsigned short indentLevel_
Current indent level.
unsigned short indentSize_
Number of spaces per indent level.
virtual bool endRawWrite()=0
Emit end marker for low-level raw binary output.
void incrIndent()
Increment the indent level.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Ostream & endEntry(Ostream &os)
Write end entry (';') followed by newline.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void indent()=0
Add indentation characters.
const dimensionedScalar c
Speed of light in a vacuum.
virtual char fill() const =0
Get padding character.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
compressionType compression() const noexcept
Get the stream compression.
unsigned short & indentSize()
Access to indent size.
Database for solution data, solver performance and other reduced data.
Ostream & operator<<(Ostream &, const boundaryPatch &)
virtual Ostream & writeRaw(const char *data, std::streamsize count)=0
Low-level raw binary output.
virtual int width() const =0
Get width of output field.