34 void Foam::primitiveEntry::append
36 const token& currToken,
37 const dictionary&
dict,
45 else if (currToken.isFunctionName())
47 if (!expandFunction(currToken.functionNameToken(),
dict, is))
52 else if (currToken.isVariable())
54 if (!expandVariable(currToken.variableToken(),
dict))
66 bool Foam::primitiveEntry::expandFunction
68 const functionName& hashFn,
69 const dictionary& parentDict,
73 const word fn = hashFn(1, hashFn.size() - 1);
82 "primitiveEntry::read(const dictionary&, Istream&) start"
95 append(currToken,
dict, is);
130 append(currToken,
dict, is);
136 "primitiveEntry::read(const dictionary&, Istream&) end"
139 if (currToken.
good())
162 std::ostringstream os;
163 os <<
"ill defined primitiveEntry starting at keyword '"
165 <<
" on line " << keywordLineNumber
189 is.
name() +
'/' + key,
204 is.
name() +
'/' + key,
218 if (!contentsOnly && keyword().size())
223 for (
label i=0; i<size(); ++i)
225 os << operator[](i);;
242 this->
write(os,
false);
259 const label nPrintTokens = 10;
261 os <<
" primitiveEntry '" <<
e.keyword() <<
"' comprises ";
263 for (
label i=0; i<
min(
e.size(), nPrintTokens); i++)
265 os <<
nl <<
" " <<
e[i].info();
268 if (
e.size() > nPrintTokens)
label lineNumber() const
Return current stream line number.
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
bool bad() const
Return true if stream is corrupted.
label tokenIndex() const
Return the current token index.
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & read(token &)=0
Return next token from stream.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T & newElmt(const label)
Return subscript-checked element of UList.
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....
static const dictionary null
Null dictionary.
A keyword and a list of tokens is an 'entry'.
static int disableFunctionEntries
static bool execute(const word &functionName, dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
A class for handling keywords in dictionaries.
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
void write(Ostream &) const
Write.
virtual Istream & read(token &)
Inherit read from ITstream.
primitiveEntry(const keyType &, Istream &)
Construct from keyword and a Istream.
const dictionary & dict() const
This entry is not a dictionary,.
A token holds items read from Istream.
#define SafeFatalIOErrorInFunction(ios, msg)
Report an error message using Foam::FatalIOError.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
bool read(const char *, int32_t &)
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 bool)
Return a word representation of a bool.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
Ostream & writeKeyword(Foam::Ostream &os, const keyType &kw)
Write the keyword to the Ostream with the current level of indentation.
word format(conversionProperties.lookup("format"))
points setSize(newPointi)