Go to the documentation of this file.
36 bool Foam::primitiveEntry::expandVariable
38 const string& varName,
39 const dictionary&
dict
46 string expanded(varName.substr(1, varName.size()-2));
52 return expandVariable(expanded,
dict);
74 <<
"Illegal dictionary entry or environment variable name "
76 <<
"Known dictionary entries: " <<
dict.
toc() <<
nl
88 else if (eptr->isDict())
154 tokens.first().lineNumber();
167 return tokens.last().lineNumber();
185 <<
"Attempt to return primitive entry " << info()
186 <<
" as a sub-dictionary"
196 <<
"Attempt to return primitive entry " << info()
197 <<
" as a sub-dictionary"
entry(const keyType &keyword)
Construct from keyword.
A keyword and a list of tokens is an 'entry'.
void append(const token &t, const bool lazy)
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
virtual void rewind()
Rewind the stream so that it may be read again.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
const keyType & keyword() const
Return keyword.
primitiveEntry(const keyType &key, Istream &is)
Construct from keyword and a Istream.
virtual ITstream & stream() const
Return token stream for this primitive entry.
A token holds an item read from Istream.
virtual const dictionary & dict() const
This entry is not a dictionary,.
string getEnv(const std::string &envName)
Get environment value for given envName.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
A class for handling keywords in dictionaries.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An input stream of tokens.
virtual label endLineNumber() const
Return line number of last token in dictionary.
virtual label startLineNumber() const
Return line number of first token in dictionary.
void inplaceExpand(std::string &s, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static tokenList parse(const UList< char > &input, streamFormat format=ASCII)
errorManip< error > abort(error &err)
Begin block [isseparator].
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< token > tokenList
List of tokens, used for a IOdictionary entry.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const entry * findScoped(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for a scoped entry (const access) with the given keyword.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
wordList toc() const
Return the table of contents.
virtual const fileName & name() const
Return the dictionary name.