Go to the documentation of this file.
42 name_(fileName::concat(parentDict.
name(),
name,
'.')),
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);
A keyword and a list of tokens is an 'entry'.
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
#define InfoInFunction
Report an information message using Foam::Info.
static bool New(dictionary &parentDict, Istream &is, const inputMode inpMode=inputMode::GLOBAL, const int endChar=0)
Construct from an Istream and insert into the dictionary.
A class for handling file names.
static autoPtr< dictionary > New(Istream &is)
Construct top-level dictionary on freestore from Istream.
dictionary()
Default construct, a top-level empty dictionary.
bool read(const char *buf, int32_t &val)
Same as readInt32.
const word dictName("faMeshDefinition")
Istream & operator>>(Istream &, directionInfo &)
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.
const fileName & name() const noexcept
The dictionary name.
bool good() const noexcept
True if next operation might succeed.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
A class for handling keywords in dictionaries.
void writeEntry(Ostream &os) const
Write sub-dictionary with its dictName as its header.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool eof() const noexcept
True if end of input seen.
virtual const fileName & name() const
Return the name of the stream.
static void resetInputMode()
Reset the globalInputMode to merge.
void writeEntries(Ostream &os, const bool extraNewLine=false) const
Write dictionary entries.
virtual Ostream & endBlock()
Write end block group.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
bool bad() const noexcept
True if stream is corrupted.
Use global value from globalInputMode variable.
Begin block [isseparator].
bool read(Istream &is)
Read dictionary from Istream. Discards the header.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
void putBack(const token &tok)
Put back a token. Only a single put back is permitted.
const dimensionedScalar e
Elementary charge.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void clear()
Clear the dictionary.
#define WarningInFunction
Report a warning using Foam::Warning.