void Foam::primitiveEntry::readEntry(const dictionary& dict, Istream& is) { label keywordLineNumber = is.lineNumber(); tokenIndex() = 0; if (read(dict, is)) { setSize(tokenIndex()); tokenIndex() = 0; } else { std::ostringstream os; os << "ill defined primitiveEntry starting at keyword '" << keyword() << '\'' << " on line " << keywordLineNumber << " and ending at line " << is.lineNumber(); SafeFatalIOErrorIn ( "primitiveEntry::readEntry(const dictionary&, Istream&)", is, os.str() ); } }
void Foam::primitiveEntry::append ( const token& currToken, const dictionary& dict, Istream& is ) { if (currToken.isWord()) { const word& w = currToken.wordToken(); if ( w.size() == 1 || ( !(w[0] == '$' && expandVariable(w, dict)) && !(w[0] == '#' && expandFunction(w, dict, is)) ) ) { newElmt(tokenIndex()++) = currToken; } } else { newElmt(tokenIndex()++) = currToken; } }
void Foam::primitiveEntry::append ( const token& currToken, const dictionary& dict, Istream& is ) { if (currToken.isWord()) { const word& w = currToken.wordToken(); if ( disableFunctionEntries || w.size() == 1 || ( !(w[0] == '$' && expandVariable(w, dict)) && !(w[0] == '#' && expandFunction(w, dict, is)) ) ) { newElmt(tokenIndex()++) = currToken; } } else if (currToken.isVariable()) { const string& w = currToken.stringToken(); if ( disableFunctionEntries || w.size() <= 3 || !( w[0] == '$' && w[1] == token::BEGIN_BLOCK && expandVariable(w, dict) ) ) { newElmt(tokenIndex()++) = currToken; } } else { newElmt(tokenIndex()++) = currToken; } }
forAll(varTokens, i) { newElmt(tokenIndex()++) = varTokens[i]; }