53 Foam::token Foam::functionEntry::readLine(Istream& is)
73 const token fName(is);
88 string::const_reverse_iterator rit = fNameWord.rbegin();
89 rit != fNameWord.rend();
103 const token nextToken(is);
115 fNameArgs = fNameWord + fNameArgs;
120 fNameArgs = fNameWord;
186 "functionEntry::execute"
187 "(const word& functionName, dictionary& parentDict, Istream&)"
190 if (!executedictionaryIstreamMemberFunctionTablePtr_)
192 cerr<<
"functionEntry::execute"
193 <<
"(const word&, dictionary&, Istream&)"
194 <<
" not yet initialised, function = "
201 executedictionaryIstreamMemberFunctionTable::iterator mfIter =
202 executedictionaryIstreamMemberFunctionTablePtr_->find(
functionName);
204 if (mfIter == executedictionaryIstreamMemberFunctionTablePtr_->end())
210 <<
"Valid functionEntries are :" <<
endl
211 << executedictionaryIstreamMemberFunctionTablePtr_->toc()
215 return mfIter()(parentDict, is);
229 "functionEntry::execute"
230 "(const word&, const dictionary&, primitiveEntry&, Istream&)"
233 if (!executeprimitiveEntryIstreamMemberFunctionTablePtr_)
235 cerr<<
"functionEntry::execute"
236 <<
"(const word&, const dictionary&, primitiveEntry&, Istream&)"
237 <<
" not yet initialised, function = "
244 executeprimitiveEntryIstreamMemberFunctionTable::iterator mfIter =
245 executeprimitiveEntryIstreamMemberFunctionTablePtr_->find(
functionName);
247 if (mfIter == executeprimitiveEntryIstreamMemberFunctionTablePtr_->end())
253 <<
"Valid functionEntries are :" <<
endl
254 << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc()
258 return mfIter()(parentDict,
entry, is);
268 os << operator[](0) <<
endl;
273 <<
"Incorrect number of tokens in functionEntry, "
274 "should be a single word."
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
label lineNumber() const
Return current stream line number.
virtual const fileName & name() const
Return the name of the stream.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
Istream & readList(string &)
Read a '(...)' delimited set of characters into a string.
ISstream & putback(const char &)
Low-level putback character function.
Input from memory buffer stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void putBack(const token &)
Put back token.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool read(Istream &, const bool keepHeader=false)
Read dictionary from Istream, optionally keeping the header.
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...
virtual void write(Ostream &) const
Write.
static bool insert(dictionary &parentDict, const string &)
Insert the given string in a sub-dict context.
static string readFuncNameArgs(Istream &is)
Read the function name and optional argument list.
static bool execute(const word &functionName, dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
functionEntry(const word &, const dictionary &, Istream &)
Construct from keyword, parent dictionary and Istream.
A functionName is a word starting with '#'.
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
virtual bool read(const dictionary &, Istream &)
Read tokens from the given stream.
A class for handling character strings derived from std::string.
A token holds items read from Istream.
bool isPunctuation() const
const string & stringToken() const
punctuationToken pToken() const
const string & anyStringToken() const
const word & wordToken() const
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & writeKeyword(Foam::Ostream &os, const keyType &kw)
Write the keyword to the Ostream with the current level of indentation.
defineMemberFunctionSelectionTable(edgeMesh, write, fileExtension)