44 namespace functionEntries
51 const Foam::word Foam::functionEntries::codeBlockEntry::codeOptions
56 const Foam::wordList Foam::functionEntries::codeBlockEntry::compileFiles
66 const label lineNumber,
72 codeBlockName_(
word::null),
87 Info<<
"Compiling code within " <<
typeName <<
" starting at line "
127 codeStream::codeString(codeIndex, contextDict, is);
135 << codeIndex++ <<
endl;
142 codeDict::codeString(codeIndex, contextDict, is);
149 << codeIndex++ <<
endl;
162 << codeIndex++ <<
endl;
168 calcEntry::codeString(codeIndex,
codeDict, is);
175 << codeIndex++ <<
endl;
215 lib_ = codeStream::compile
Macros for easy insertion into run-time selection tables.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
label lineNumber() const
Return current stream line number.
bool bad() const
Return true if stream is corrupted.
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.
bool eof() const
Return true if end of input seen.
void append(const T &)
Append an element at the end of the list.
virtual const fileName & name() const
Return the name of the stream.
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.
bool read(Istream &, const bool keepHeader=false)
Read dictionary from Istream, optionally keeping the header.
static int disableFunctionEntries
Part of the #codeBlock...#codeBlock clause.
virtual bool execute(dictionary &contextDict, Istream &is)
Expand the functionEntry into the contextDict.
codeBlockEntry(const label lineNumber, const dictionary &parentDict, Istream &is)
Construct from line number, dictionary and Istream.
Compiles and executes C++ OpenFOAM code string expressions.
Specify an include file or list of files for #calc within #codeBlock.
const List< fileName > & fileNames() const
Return the include file names.
static void addCodeInclude(const List< fileName > &fileNames, const dictionary &contextDict, dictionary &codeDict)
Add the codeInclude entry to codeDict.
static string codeString(const label index, const dictionary &codeDict, Istream &, const string &startString=string::null, const string &endString=string::null)
Return the code string.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
A class for handling keywords in dictionaries.
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
A token holds items read from Istream.
const functionName & functionNameToken() const
bool isFunctionName() const
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
#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.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.