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 cstrIter = IstreamConstructorTablePtr_->cfind(compoundType);
63 if (!cstrIter.found())
70 *IstreamConstructorTablePtr_
84 IstreamConstructorTablePtr_
85 && IstreamConstructorTablePtr_->found(
name)
92 if (type_ == tokenType::COMPOUND)
94 if (data_.compoundPtr->empty())
97 <<
"compound has already been transferred from token\n "
102 data_.compoundPtr->empty() =
true;
105 return *data_.compoundPtr;
108 parseError(
"compound");
109 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)....
word name(const complex &c)
Return string representation of complex.
compound & transferCompoundToken(const Istream &is)
static bool isCompound(const word &name)
Return true if name is a known (registered) compound type.
static const token undefinedToken
An undefined token.
errorManip< error > abort(error &err)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< compound > New(const word &type, Istream &is)
Select null constructed.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
defineTypeNameAndDebug(combustionModel, 0)