36 namespace functionEntries
47 bool Foam::functionEntries::codeBlockDictEntry::resultStream
55 Info<<
"Expanding " <<
typeName <<
" at line " << is.lineNumber()
61 const word functionName
63 codeBlockPtr_->codeBlockName_ +
"_" +
Foam::name(index_)
67 const codeDict::codeDictFunctionType
function =
68 reinterpret_cast<codeDict::codeDictFunctionType
>
70 dlSym(codeBlockPtr_->lib_, functionName)
76 <<
"Failed looking up symbol " << functionName
81 (*function)(
dict, is);
91 const label lineNumber,
97 codeBlockPtr_(nullptr),
116 <<
"Wrong argument type for " <<
typeName <<
nl
117 <<
" Expected a label but found token " << t
124 <<
"Wrong argument type for " <<
typeName <<
nl
125 <<
" Expected a unsignedInteger64 but found token " << t
139 return resultStream(contextDict, is);
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Macros for easy insertion into run-time selection tables.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & read(token &)=0
Return next token from stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const fileName & name() const
Return the dictionary name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
codeBlockDictEntry(const label lineNumber, const dictionary &parentDict, Istream &is)
Construct from line number, dictionary and Istream.
virtual void write(Ostream &) const
Dummy write.
virtual bool execute(dictionary &contextDict, Istream &)
Expand the functionEntry into the contextDict.
Part of the #codeBlock...#codeBlock clause.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
const dictionary & dict() const
This entry is not a dictionary,.
A token holds items read from Istream.
bool isUnsignedInteger64() const
uint64_t unsignedInteger64Token() const
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
defineFunctionTypeNameAndDebug(includeFvConstraintEntry, 0)
addToRunTimeSelectionTable(functionEntry, includeFvConstraintEntry, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void * dlSym(void *handle, const std::string &symbol)
Lookup a symbol in a dlopened library using handle to library.