33 namespace functionEntries
58 Foam::string Foam::functionEntries::negEntry::negateVariable
60 const dictionary& parentDict,
65 const word varWord(is);
67 if (varWord[0] !=
'$')
72 ) <<
"Expected variable name beginning with a '$' but found '" 79 const string varName = varWord(1, varWord.size()-1);
82 const entry* ePtr = parentDict.lookupScopedEntryPtr(varName,
true,
false);
84 if (ePtr && ePtr->isStream())
86 const token variable(ePtr->stream());
89 OStringStream os(is.format());
91 const string str(os.str());
96 return str(1, str.size() - 1);
108 ) <<
"Illegal dictionary variable name " << varName <<
endl 109 <<
"Valid dictionary entries are " << parentDict.toc()
126 thisEntry.
read(parentDict, resultStream);
140 parentDict.
read(resultStream);
bool read(Istream &)
Read dictionary from Istream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
static bool execute(dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
addToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, dictionaryIstream)
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read, written and printed, and the types and values of its tokens analysed.
static const string null
An empty string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Input from memory buffer stream.
Macros for easy insertion into member function selection tables.
virtual bool read(const dictionary &, Istream &)
Read tokens from the given stream.
A class for handling character strings derived from std::string.
defineTypeNameAndDebug(calcEntry, 0)