Go to the documentation of this file.
137 const std::string& str,
138 const bool quoted=
true
160 std::streamsize
count
172 virtual void indent() = 0;
251 if (value1 != value2)
263 virtual void flush() = 0;
266 virtual void endl() = 0;
269 virtual char fill()
const = 0;
272 virtual char fill(
const char fillch) = 0;
275 virtual int width()
const = 0;
278 virtual int width(
const int w) = 0;
294 return const_cast<Ostream&
>(*this);
385 constexpr
char tab =
'\t';
386 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.
double doubleScalar
A typedef for double.
unsigned short & indentLevel()
Access to indent level.
A class for handling words, derived from Foam::string.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Ostream & operator()() const
Return a non-const reference to const Ostream.
virtual ~Ostream()=default
Destructor.
float floatScalar
A typedef for float.
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,...
static const versionNumber currentVersion
The current version number (2.0)
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.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
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.
Ostream &(* OstreamManip)(Ostream &)
An Ostream manipulator.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
The IOstreamOption is a simple container for options an IOstream can normally have.
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
void decrIndent()
Decrement the indent level.
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.
Ostream(IOstreamOption streamOpt=IOstreamOption())
virtual char fill() const =0
Get padding character.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
Ostream(const Ostream &)=default
Copy construct.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
unsigned short & indentSize()
Access to indent size.
Database for solution data, solver performance and other reduced data.
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.