83 keepHeader = keepHeader || hashedEntries_.found(
"FoamFile");
94 <<
"Istream not OK for reading dictionary " <<
name()
107 <<
"Dictionary input cannot start with '}'" <<
nl
131 <<
"Istream not OK after reading dictionary " <<
name()
143 return this->
read(is,
false);
182 for (
const entry&
e : *
this)
198 <<
"Cannot write entry " <<
e.keyword()
199 <<
" for dictionary " <<
name()
214 writeEntries(
os, !subDict);
bool good() const noexcept
True if next operation might succeed.
bool bad() const noexcept
True if stream is corrupted.
virtual const fileName & name() const
Return the name of the stream.
bool eof() const noexcept
True if end of input seen.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void putBack(const token &tok)
Put back a token. Only a single put back is permitted.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & endBlock()
Write end block group.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
virtual bool read()
Re-read model coefficients if they have changed.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const fileName & name() const noexcept
The dictionary name.
dictionary()
Default construct, a top-level empty dictionary.
void writeEntries(Ostream &os, const bool extraNewLine=false) const
Write dictionary entries.
void writeEntry(Ostream &os) const
Write sub-dictionary with its dictName as its header.
void clear()
Clear the dictionary.
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
bool read(Istream &is)
Read dictionary from Istream. Discards the header.
A keyword and a list of tokens is an 'entry'.
static void resetInputMode()
Reset the globalInputMode to merge.
@ GLOBAL
Use global value from globalInputMode variable.
A class for handling file names.
virtual bool write()
Write the output fields.
A class for handling keywords in dictionaries.
A token holds an item read from Istream.
@ BEGIN_BLOCK
Begin block [isseparator].
@ END_BLOCK
End block [isseparator].
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
const word dictName("faMeshDefinition")
#define WarningInFunction
Report a warning using Foam::Warning.
#define InfoInFunction
Report an information message using Foam::Info.
bool read(const char *buf, int32_t &val)
Same as readInt32.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Istream & operator>>(Istream &, directionInfo &)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)