Public Member Functions | Static Public Member Functions | List of all members
calcEntry Class Reference

Uses dynamic compilation to provide calculating functionality for entering dictionary entries. More...

Inheritance diagram for calcEntry:
Inheritance graph
[legend]
Collaboration diagram for calcEntry:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("calc")
 Runtime type information. More...
 
- Public Member Functions inherited from functionEntry
 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 Public Member Functions inherited from functionEntry
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...
 

Detailed Description

Uses dynamic compilation to provide calculating functionality for entering dictionary entries.

E.g.

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.

Note
Internally this is just a wrapper around codeStream functionality - the #calc string gets used to construct a dictionary for codeStream.
Source files

Definition at line 68 of file calcEntry.H.

Member Function Documentation

ClassName ( "calc"  )

Runtime type information.

bool execute ( dictionary parentDict,
Istream is 
)
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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool execute ( const dictionary parentDict,
primitiveEntry thisEntry,
Istream is 
)
static

The documentation for this class was generated from the following files: