Go to the documentation of this file.
45 void Foam::token::parseError(
const char* expected)
const
48 <<
"Parse error, expected a " << expected
57 const word& compoundType,
61 auto* ctorPtr = IstreamConstructorTable(compoundType);
70 *IstreamConstructorTablePtr_
84 IstreamConstructorTablePtr_
85 && IstreamConstructorTablePtr_->found(
name)
92 if (type_ != tokenType::COMPOUND)
94 parseError(
"compound");
97 if (data_.compoundPtr->moved())
100 <<
"compound has already been transferred from token\n "
105 data_.compoundPtr->moved(
true);
108 return *data_.compoundPtr;
114 if (type_ != tokenType::COMPOUND)
116 parseError(
"compound");
119 if (data_.compoundPtr->moved())
122 <<
"compound has already been transferred from token\n "
127 data_.compoundPtr->moved(
true);
130 return *data_.compoundPtr;
token::compound tokenCompound
Abstract base class for complex tokens.
A class for handling words, derived from Foam::string.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A token holds an item read from Istream.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
InfoProxy< token > info() const
Return info proxy for printing token information to a stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static bool isCompound(const word &name)
Test if name is a known (registered) compound type.
static const token undefinedToken
An undefined token.
errorManip< error > abort(error &err)
compound & transferCompoundToken()
Return reference to compound and mark internally as released.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
static autoPtr< compound > New(const word &type, Istream &is)
Construct compound from Istream.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
defineTypeNameAndDebug(combustionModel, 0)