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);
186 bool separator =
false;
188 for (
const entry&
e : *
this)
203 <<
"Cannot write entry " <<
e.keyword()
204 <<
" for dictionary " <<
name()
219 writeEntries(
os, !subDict);
void writeEntry(Ostream &os) const
Write sub-dictionary with its dictName as its header.
Begin block [isseparator].
A class for handling keywords in dictionaries.
A class for handling file names.
bool bad() const noexcept
True if stream is corrupted.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool read(Istream &is)
Read dictionary from Istream (discards the header). Reads entries until EOF or when the first token i...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
const word dictName("faMeshDefinition")
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fileName & name() const noexcept
The dictionary name.
static void resetInputMode()
Reset the globalInputMode to merge.
bool read(const char *buf, int32_t &val)
Same as readInt32.
dictionary()
Default construct, a top-level empty dictionary.
void putBack(const token &tok)
Put back a token (copy). Only a single put back is permitted.
const dimensionedScalar e
Elementary charge.
static autoPtr< dictionary > New(Istream &is)
Construct top-level dictionary on freestore from Istream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Istream & operator>>(Istream &, directionInfo &)
virtual Ostream & endBlock()
Write end block group.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
OBJstream os(runTime.globalPath()/outputName)
Use global value from globalInputMode variable.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool good() const noexcept
True if next operation might succeed.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
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.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
void clear()
Clear the dictionary.
void writeEntries(Ostream &os, const bool extraNewLine=false) const
Write dictionary entries.
bool eof() const noexcept
True if end of input seen.
A keyword and a list of tokens is an 'entry'.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
#define InfoInFunction
Report an information message using Foam::Info.