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.
bool eof() const
Return true if end of input seen.
dictionary()
Construct top-level dictionary null.
bool read(const char *buf, int32_t &val)
Same as readInt32.
const word dictName("blockMeshDict")
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.
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.
const fileName & name() const
The dictionary name.
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)....
word name(const complex &c)
Return string representation of complex.
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,...
bool bad() const
Return true if stream is corrupted.
Use global value from globalInputMode variable.
Begin block [isseparator].
bool read(Istream &is)
Read dictionary from Istream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
void putBack(const token &tok)
Put back token.
const dimensionedScalar e
Elementary charge.
#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,...
bool good() const
Return true if next operation might succeed.
void clear()
Clear the dictionary.
#define WarningInFunction
Report a warning using Foam::Warning.