69 const bool stripComments
74 .continueReadUntilRightBrace(str, stripComments);
99 const word& functionName,
106 if (!executedictionaryIstreamMemberFunctionTablePtr_)
110 <<
"Not yet initialized, function = " 118 executedictionaryIstreamMemberFunctionTable(functionName);
123 <<
"Unknown functionEntry '" << functionName
126 <<
"Valid functionEntries :" <<
nl 127 << executedictionaryIstreamMemberFunctionTablePtr_->sortedToc()
131 return mfuncPtr(parentDict, is);
137 const word& functionName,
138 const dictionary& parentDict,
139 primitiveEntry& entry,
145 if (!executeprimitiveEntryIstreamMemberFunctionTablePtr_)
149 <<
"Not yet initialized, function = " 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)
fileName relativeName() const
Return the name of the stream relative to the current case.
static bool execute(const word &functionName, dictionary &parentDict, Istream &is)
Execute the functionEntry in a sub-dict context.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual Ostream & write(const char c) override
Write character.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
A token holds an item read from Istream.
static bool continueReadUntilRightBrace(Istream &is, std::string &str, const bool stripComments=true)
Slurp a string until a closing '}' is found.
Ostream & endl(Ostream &os)
Add newline and flush stream.
functionEntry(const functionEntry &)=delete
No copy construct.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
virtual void write(Ostream &os) const
Write.
OBJstream os(runTime.globalPath()/outputName)
label lineNumber() const noexcept
Const access to the current stream line number.
Generic input stream using a standard (STL) stream.
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
static token readLine(const word &key, Istream &is)
Read line and return as a string token.
defineMemberFunctionSelectionTable(edgeMesh, write, fileExtension)
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))
A keyword and a list of tokens is an 'entry'.