39 (
dict.empty() || (
dict.front()->keyword() !=
"FoamFile"))
74 const label len = tok.labelToken();
78 for (label i=0; i<len; ++i)
92 <<
"parsing error " << tok.info() <<
nl
106 <<
"incorrect first token, expected <int> or '(', found "
136 const dictionaryListEntry&
e
148 const InfoProxy<dictionaryListEntry>& iproxy
151 const auto&
e = *iproxy;
153 os <<
" dictionaryListEntry '" <<
e.keyword() <<
"'" <<
endl;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
label size() const noexcept
The number of elements in list.
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
char readEndList(const char *funcName)
End read of list data, ends with ')' or '}'.
char readBeginList(const char *funcName)
Begin read of list data, starts with '(' or '{'.
void putBack(const token &tok)
Put back a token (copy). Only a single put back is permitted.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A keyword and a list of tokens is a 'dictionaryEntry'.
virtual const fileName & name() const
Return the scoped dictionary name (eg, dictA.dictB.dictC).
dictionaryEntry(const dictionaryEntry &)=delete
No copy construct.
virtual const dictionary & dict() const noexcept
Return dictionary (ie, this).
Read/write List of dictionaries.
dictionaryListEntry(const dictionaryListEntry &)=delete
No copy construct.
virtual void write(Ostream &os) const
Write.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void write(Ostream &os, const bool subDict=true) const
Write dictionary, normally with sub-dictionary formatting.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
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.
const keyType & keyword() const noexcept
Return keyword.
A token holds an item read from Istream.
bool isPunctuation() const noexcept
Token is PUNCTUATION.
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
bool isLabel() const noexcept
Integral token is convertible to Foam::label.
label labelToken() const
Return integer type as label value or Error.
InfoProxy< token > info() const noexcept
Return info proxy, for printing token information to a stream.
A class for handling words, derived from Foam::string.
static Foam::label realSize(const Foam::dictionary &dict)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
constexpr char nl
The newline '\n' character (0x0a).