Go to the documentation of this file.
36 const token& currToken,
47 disableFunctionEntries
50 !(
w[0] ==
'$' && expandVariable(
w,
dict))
51 && !(
w[0] ==
'#' && expandFunction(
w,
dict, is))
55 newElmt(tokenIndex()++) = currToken;
64 disableFunctionEntries
68 &&
w[1] == token::BEGIN_BLOCK
69 && expandVariable(
w,
dict)
73 newElmt(tokenIndex()++) = currToken;
78 newElmt(tokenIndex()++) = currToken;
90 word functionName = keyword(1, keyword.size()-1);
91 return functionEntry::execute(functionName, parentDict, *
this, is);
99 "primitiveEntry::readData(const dictionary&, Istream&)"
102 label blockCount = 0;
153 "primitiveEntry::readData(const dictionary&, Istream&)"
156 if (currToken.
good())
179 std::ostringstream os;
180 os <<
"ill defined primitiveEntry starting at keyword '"
182 <<
" on line " << keywordLineNumber
206 is.
name() +
'.' + key,
221 is.
name() +
'.' + key,
240 for (
label i=0; i<size(); ++i)
242 const token& t = operator[](i);
269 this->
write(os,
false);
286 const label nPrintTokens = 10;
288 os <<
" primitiveEntry '" <<
e.keyword() <<
"' comprises ";
290 for (
label i=0; i<
min(
e.size(), nPrintTokens); i++)
292 os <<
nl <<
" " <<
e[i].info();
295 if (
e.size() > nPrintTokens)
A keyword and a list of tokens is an 'entry'.
streamFormat format() const
Return current stream format.
points setSize(newPointi)
word format(conversionProperties.lookup("format"))
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
A class for handling words, derived from string.
A helper class for outputting values to Ostream.
void append(const UList< token > &)
Append the given tokens starting at the current tokenIndex.
virtual bool read(const dictionary &, Istream &)
Read tokens from the given stream.
bool read(const char *, int32_t &)
const word & wordToken() const
Ostream & endl(Ostream &os)
Add newline and flush stream.
A token holds items read from Istream.
const string & stringToken() const
bool expandFunction(const word &, const dictionary &, Istream &)
Expand the given function (keyword starts with #)
A class for handling keywords in dictionaries.
void readEntry(const dictionary &, Istream &)
Read the complete entry from the given stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Ostream & write(const token &)=0
Write next token to stream.
primitiveEntry(const keyType &, Istream &)
Construct from keyword and a Istream.
#define SafeFatalIOErrorInFunction(ios, msg)
Report an error message using Foam::FatalIOError.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool bad() const
Return true if stream is corrupted.
const double e
Elementary charge.
versionNumber version() const
Return the stream version.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
void write(Ostream &) const
Write.
const dictionary & dict() const
This entry is not a dictionary,.
label lineNumber() const
Return current stream line number.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual const fileName & name() const
Return the name of the stream.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
static const dictionary null
Null dictionary.
virtual Istream & read(token &)=0
Return next token from stream.