69 const bool stripComments
99 const word& functionName,
106 if (!executedictionaryIstreamMemberFunctionTablePtr_)
110 <<
"Not yet initialized, function = "
111 << functionName.c_str() << std::endl;
118 executedictionaryIstreamMemberFunctionTable(functionName);
123 <<
"Unknown functionEntry '" << functionName
126 <<
"Valid functionEntries :" <<
nl
127 << executedictionaryIstreamMemberFunctionTablePtr_->sortedToc()
131 return mfuncPtr(parentDict, is);
137 const word& functionName,
139 primitiveEntry& entry,
145 if (!executeprimitiveEntryIstreamMemberFunctionTablePtr_)
149 <<
"Not yet initialized, function = "
150 << functionName.c_str() << std::endl;
157 executeprimitiveEntryIstreamMemberFunctionTable(functionName);
162 <<
"Unknown functionEntry '" << functionName
163 <<
"' in " << is.relativeName()
164 <<
" near line " << is.lineNumber() <<
nl <<
nl
165 <<
"Valid functionEntries :" <<
nl
166 << executeprimitiveEntryIstreamMemberFunctionTablePtr_->sortedToc()
170 return mfuncPtr(parentDict,
entry, is);
177 const token& tok = operator[](0);
178 const string&
s = tok.stringToken();
181 for (
size_t i = 0; i <
s.size(); ++i)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
label lineNumber() const noexcept
Const access to the current stream line number.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
fileName relativeName() const
Return the name of the stream relative to the current case.
Generic input stream using a standard (STL) stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
T & operator[](const label i)
Return element of UList.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A keyword and a list of tokens is an 'entry'.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
static bool continueReadUntilRightBrace(Istream &is, std::string &str, const bool stripComments=true)
Slurp a string until a closing '}' is found.
virtual void write(Ostream &os) const
Write.
functionEntry(const functionEntry &)=delete
No copy construct.
static token readLine(const word &key, Istream &is)
Read line and return as a string token.
static bool execute(const word &functionName, dictionary &parentDict, Istream &is)
Execute the functionEntry in a sub-dict context.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
primitiveEntry(const keyType &key)
Construct from keyword and no tokens.
virtual const fileName & name() const
Return the token stream name.
virtual const dictionary & dict() const
This entry is not a dictionary, calling this function generates a FatalError.
A token holds an item read from Istream.
const string & stringToken() const
Return const reference to the string contents.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define defineMemberFunctionSelectionTable(baseType, funcName, argNames)
Define run-time selection table.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).