Uses dynamic compilation to provide calculating functionality for entering dictionary entries. More...
Public Member Functions | |
ClassName ("calc") | |
Runtime type information. More... | |
![]() | |
declareMemberFunctionSelectionTable (bool, functionEntry, execute, dictionaryIstream,(dictionary &parentDict, Istream &is),(parentDict, is)) | |
declareMemberFunctionSelectionTable (bool, functionEntry, execute, primitiveEntryIstream,(const dictionary &parentDict, primitiveEntry &entry, Istream &is),(parentDict, entry, is)) | |
Static Public Member Functions | |
static bool | execute (dictionary &parentDict, Istream &) |
Execute the functionEntry in a sub-dict context. More... | |
static bool | execute (const dictionary &parentDict, primitiveEntry &, Istream &) |
Execute the functionEntry in a primitiveEntry context. More... | |
![]() | |
static bool | execute (const word &functionName, dictionary &parentDict, Istream &) |
Execute the functionEntry in a sub-dict context. More... | |
static bool | execute (const word &functionName, const dictionary &parentDict, primitiveEntry &, Istream &) |
Execute the functionEntry in a primitiveEntry context. More... | |
Uses dynamic compilation to provide calculating functionality for entering dictionary entries.
a 1.0; b 3; c #calc "$a/$b";
Note the explicit trailing 0 ('1.0') to force a to be read (and written) as a floating point number.
Definition at line 68 of file calcEntry.H.
ClassName | ( | "calc" | ) |
Runtime type information.
|
static |
Execute the functionEntry in a sub-dict context.
Definition at line 108 of file calcEntry.C.
References dictionary::add(), dynamicCode::checkSecurity(), Foam::endl(), IOstream::format(), Foam::Info, IOstream::lineNumber(), dictionaryName::name(), dictionary::read(), and s().
Referenced by calcEntry::execute().
|
static |
Execute the functionEntry in a primitiveEntry context.
Definition at line 63 of file calcEntry.C.
References dictionary::add(), dynamicCode::checkSecurity(), Foam::endl(), calcEntry::execute(), IOstream::format(), Foam::Info, IOstream::lineNumber(), dictionaryName::name(), primitiveEntry::read(), and s().