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;
181 unsigned short indentSize(
unsigned short val) noexcept
195 unsigned short indentLevel(
unsigned short val) noexcept
255 if (value1 != value2)
267 virtual void flush() = 0;
270 virtual void endl() = 0;
273 virtual char fill()
const = 0;
276 virtual char fill(
const char fillch) = 0;
279 virtual int width()
const = 0;
282 virtual int width(
const int w) = 0;
298 return const_cast<Ostream&
>(*this);
404 constexpr
char tab =
'\t';
405 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.
unsigned short indentSize() const noexcept
Return indent size (spaces per level)
unsigned short & indentSize() noexcept
Access to indent size.
double doubleScalar
A typedef for double.
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.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
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 incrIndent() noexcept
Increment the indent level.
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.
OBJstream os(runTime.globalPath()/outputName)
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.
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.
virtual void indent()
Add indentation characters.
virtual void endl()
Add newline and flush stream.
unsigned short indentSize(unsigned short val) noexcept
Change indent size (spaces per level), return old value.
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.
unsigned short & indentLevel() noexcept
Access to indent level.
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,...
Database for solution data, solver performance and other reduced data.
unsigned short indentLevel(unsigned short val) noexcept
Change the indent level, return old value.
virtual Ostream & writeRaw(const char *data, std::streamsize count)=0
Low-level raw binary output.
virtual void flush()
Flush stream.
virtual int width() const =0
Get width of output field.
unsigned short indentLevel() const noexcept
Return the indent level.