33 namespace functionEntries
50 Foam::string Foam::functionEntries::negEntry::negateVariable
52 const dictionary& parentDict,
57 const variable var(is);
60 const string varName = var(1, var.size() - 1);
63 const entry* ePtr = parentDict.lookupScopedEntryPtr(varName,
true,
false);
65 if (ePtr && ePtr->isStream())
67 const token variable(ePtr->stream());
70 OStringStream os(is.format());
72 const string str(os.str());
77 return str(1, str.size() - 1);
89 ) <<
"Unknown dictionary variable name " << varName <<
endl
90 <<
"Valid dictionary entries are " << parentDict.toc()
107 return insert(contextDict, contextEntry, negateVariable(contextDict, is));
Macros for easy insertion into member function selection tables.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
entry(const keyType &key, const label keywordLineNumber)
Construct from keyword and corresponding line number.
Negate a variable by prefixing with neg.
virtual bool execute(dictionary &contextDict, Istream &is)
Expand the functionEntry into the contextDict.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
A class for handling character strings derived from std::string.
static const string null
An empty string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
defineFunctionTypeNameAndDebug(includeFvConstraintEntry, 0)
addToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, primitiveEntryIstream)
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.