Go to the documentation of this file.
48 || !keywordToken.
good()
78 <<
"entry::getKeyword(keyType&, Istream&)" <<
std::endl
79 <<
" in file " << __FILE__
93 is.
fatalCheck(
"entry::New(const dictionary& parentDict, Istream&)");
98 if (!getKeyword(keyword, is))
106 !disableFunctionEntries
110 word functionName = keyword(1, keyword.size()-1);
115 !disableFunctionEntries
127 string s(keyword(2, keyword.size()-3));
131 keyword.std::string::replace(1, keyword.size()-1,
s);
136 word varName = keyword(1, keyword.size()-1);
151 return parentDict.
add
160 <<
"Attempt to use undefined variable " << varName
175 !disableFunctionEntries
176 && keyword ==
"include"
187 bool mergeEntry =
false;
206 if (existingPtr->
isDict())
228 <<
"ERROR! duplicate entry: " << keyword
237 return parentDict.
add
245 return parentDict.
add
263 if (!getKeyword(keyword, is))
static bool execute(const word &functionName, dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
A keyword and a list of tokens is an 'entry'.
A keyword and a list of tokens is a 'dictionaryEntry'.
static bool overwrite()
Return true if the inputMode is overwrite.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
A class for handling words, derived from string.
virtual ITstream & stream() const =0
Return token stream if this entry is a primitive entry.
const keyType & keyword() const
Return keyword.
static bool protect()
Return true if the inputMode is protect.
static bool error()
Return true if the inputMode is error.
bool eof() const
Return true if end of input seen.
const word & wordToken() const
static bool execute(dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A token holds items read from Istream.
const string & stringToken() const
A class for handling keywords in dictionaries.
virtual bool isDict() const
Return true if this entry is a dictionary.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Ostream & operator<<(Ostream &, const edgeMesh &)
const entry * lookupScopedEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool bad() const
Return true if stream is corrupted.
const double e
Elementary charge.
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool substituteScopedKeyword(const word &keyword)
Substitute the given scoped keyword prepended by '$' with the.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
void putBack(const token &)
Put back token.
static bool New(dictionary &parentDict, Istream &)
Construct from Istream and insert into dictionary.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static bool getKeyword(keyType &, Istream &)
Get the next valid keyword otherwise return false.
void clear()
Clear the dictionary.
string & inplaceExpand(string &, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
Inplace expand occurences of variables according to the mapping.
virtual const fileName & name() const
Return the name of the stream.
static const dictionary null
Null dictionary.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
static bool merge()
Return true if the inputMode is merge.
virtual Istream & read(token &)=0
Return next token from stream.