38 const word token::typeNames_[] =
62 void Foam::token::parseError(
const char* expected)
const
64 cerr<<
"Parse error, expected a " << expected
79 const word& compoundType,
83 IstreamConstructorTable::iterator cstrIter =
84 IstreamConstructorTablePtr_->find(compoundType);
86 if (cstrIter == IstreamConstructorTablePtr_->end())
89 <<
"Unknown compound type " << compoundType <<
nl <<
nl
90 <<
"Valid compound types:" <<
endl
91 << IstreamConstructorTablePtr_->sortedToc()
105 return typeNames_[0];
109 return compoundTokenPtr_->type();
122 IstreamConstructorTablePtr_
123 && IstreamConstructorTablePtr_->found(
name)
130 if (type_ == COMPOUND)
132 if (compoundTokenPtr_->empty())
135 <<
"compound has already been transferred from token\n "
140 compoundTokenPtr_->empty() =
true;
143 return *compoundTokenPtr_;
147 parseError(
"compound");
148 return *compoundTokenPtr_;
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Abstract base class for complex tokens.
static autoPtr< compound > New(const word &type, Istream &)
Select null constructed.
static bool isCompound(const word &name)
Return true if name is a compound type.
virtual ~compound()
Destructor.
compound & transferCompoundToken(const Istream &is)
InfoProxy< token > info() const
Return info proxy.
const word & typeName() const
Return the type name of the token.
static token undefinedToken
Static undefined token.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
errorManip< error > abort(error &err)
token::compound tokenCompound
defineTypeNameAndDebug(combustionModel, 0)