37 namespace functionEntries
56 Foam::OTstream Foam::functionEntries::codeBlockStreamEntry::resultStream
58 const dictionary&
dict,
64 Info<<
"Expanding " <<
typeName <<
" at line " << is.lineNumber()
70 const word functionName
72 codeBlockPtr_->codeBlockName_ +
"_" +
Foam::name(index_)
76 const codeStream::streamingFunctionType
function =
77 reinterpret_cast<codeStream::streamingFunctionType
>
79 dlSym(codeBlockPtr_->lib_, functionName)
85 <<
"Failed looking up symbol " << functionName
90 OTstream ots(is.name(), is.format());
91 (*function)(ots,
dict);
102 const label lineNumber,
108 codeBlockPtr_(nullptr),
127 <<
"Wrong argument type for " <<
typeName <<
nl
128 <<
" Expected a label but found token " << t
135 <<
"Wrong argument type for " <<
typeName <<
nl
136 <<
" Expected a unsignedInteger64 but found token " << t
150 return insert(contextDict, resultStream(contextDict, is));
166 .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 member function selection tables.
Macros for easy insertion into run-time selection tables.
label lineNumber() const
Return current stream line number.
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.
Part of the #codeBlock...#codeBlock clause.
codeBlockStreamEntry(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.
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,...
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)
addToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, primitiveEntryIstream)
addToRunTimeSelectionTable(functionEntry, includeFvConstraintEntry, dictionary)
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
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.