37 namespace functionEntries
61 const string& startString,
62 const string& endString
72 "CODE_BLOCK_STREAM_FUNCTION(" +
Foam::name(index) +
")\n"
84 <<
" Expected either a string delimited by '\"...\"' "
85 "or a verbatim string delimited by '#{...#}' " <<
nl
86 <<
" found token " << t
97 const string& startString,
98 const string& endString
104 <<
" in file " <<
dict.name() <<
endl;
131 <<
" Expected either a string delimited by '\"...\"' "
132 "or a verbatim string delimited by '#{...#}' " <<
nl
133 <<
" found token " << t
137 codeStream::streamingFunctionType
function = codeStream::getFunction
146 (*function)(ots,
dict);
157 const label lineNumber,
174 return insert(contextDict, resultStream(contextDict, is));
185 return insert(contextDict, contextEntry, resultStream(contextDict, is));
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.
streamFormat format() const
Return current stream format.
virtual const fileName & name() const
Return the name of the stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
static const fileName null
An empty fileName.
Compiles and executes C++ OpenFOAM code string expressions.
Compiles and executes C++ OpenFOAM code string expressions.
static OTstream resultStream(const dictionary &dict, Istream &is, const string &startString=string::null, const string &endString=string::null)
Perform the calculation and return the result in an OTstream.
streamEntry(const label lineNumber, const dictionary &parentDict, Istream &is)
Construct from line number, dictionary and Istream.
static string codeString(const label index, const dictionary &codeDict, Istream &, const string &startString=string::null, const string &endString=string::null)
Return the code string.
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 fileName & name() const
Return the dictionary name.
A class for handling character strings derived from std::string.
static const string null
An empty string.
A token holds items read from Istream.
bool isVerbatimString() const
const string & anyStringToken() 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.