A keyword and a list of tokens is an 'entry'. More...
Public Member Functions | |
entry (const keyType &) | |
Construct from keyword. More... | |
entry (const entry &) | |
Copy constructor. More... | |
virtual autoPtr< entry > | clone (const dictionary &parentDict) const =0 |
Construct on freestore as copy with reference to the. More... | |
virtual autoPtr< entry > | clone () const |
Construct on freestore as copy. More... | |
virtual | ~entry () |
Destructor. More... | |
const keyType & | keyword () const |
Return keyword. More... | |
keyType & | keyword () |
Return non-const access to keyword. More... | |
virtual const fileName & | name () const =0 |
Return the dictionary name. More... | |
virtual fileName & | name ()=0 |
Return the dictionary name. More... | |
virtual label | startLineNumber () const =0 |
Return line number of first token in dictionary. More... | |
virtual label | endLineNumber () const =0 |
Return line number of last token in dictionary. More... | |
virtual bool | isStream () const |
Return true if this entry is a stream. More... | |
virtual ITstream & | stream () const =0 |
Return token stream if this entry is a primitive entry. More... | |
virtual bool | isDict () const |
Return true if this entry is a dictionary. More... | |
virtual const dictionary & | dict () const =0 |
Return dictionary if this entry is a dictionary. More... | |
virtual dictionary & | dict ()=0 |
Return non-const access to dictionary if this entry is a dictionary. More... | |
virtual void | write (Ostream &) const =0 |
Write. More... | |
void | operator= (const entry &) |
bool | operator== (const entry &) const |
bool | operator!= (const entry &) const |
Static Public Member Functions | |
static bool | New (dictionary &parentDict, Istream &) |
Construct from Istream and insert into dictionary. More... | |
static autoPtr< entry > | New (Istream &is) |
Construct on freestore from Istream and return. More... | |
Static Public Attributes | |
static int | disableFunctionEntries |
Friends | |
Ostream & | operator<< (Ostream &, const entry &) |
A keyword and a list of tokens is an 'entry'.
An entry can be read, written and printed, and the types and values of its tokens analysed. An entry is a high-level building block for data description. It is a front-end for the token parser. A list of entries can be used as a set of keyword syntax elements, for example.
|
pure virtual |
Construct on freestore as copy with reference to the.
dictionary the copy belongs to
Implemented in dictionaryListEntry, dictionaryEntry, primitiveEntry, and functionEntry.
|
virtual |
Construct on freestore as copy.
Note: the parent directory is set to dictionary::null
Definition at line 54 of file entry.C.
References Foam::clone(), and dictionary::null.
|
static |
Construct from Istream and insert into dictionary.
Definition at line 91 of file entryIO.C.
References dictionary::add(), token::BEGIN_BLOCK, token::BEGIN_LIST, dictionary::clear(), entry::dict(), token::END_BLOCK, Foam::endl(), IOstream::eof(), inputModeEntry::error(), functionEntry::execute(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::stringOps::inplaceExpandEntry(), entry::isDict(), keyType::isFunctionName(), token::isLabel(), token::isPunctuation(), keyType::isVariable(), dictionary::lookupEntryPtr(), dictionary::lookupScopedEntryPtr(), inputModeEntry::merge(), IOstream::name(), inputModeEntry::overwrite(), inputModeEntry::protect(), token::pToken(), Istream::putBack(), s(), entry::stream(), dictionary::substituteScopedKeyword(), success, and Foam::blendedInterfacialModel::valid().
Referenced by dictionaryListEntry::dictionaryListEntry(), dictionary::read(), and Foam::readConfigFile().
|
static |
Construct on freestore from Istream and return.
Definition at line 305 of file entryIO.C.
References token::BEGIN_BLOCK, IOstream::fatalCheck(), dictionary::null, and Istream::putBack().
|
inline |
Return keyword.
Definition at line 123 of file entry.H.
Referenced by dictionary::add(), cellModel::cellModel(), dictionary::lookupBackwardsCompatible(), dictionary::lookupEntryPtrBackwardsCompatible(), dictionary::lookupOrDefaultBackwardsCompatible(), Foam::operator>>(), phaseProperties::phaseProperties(), primitiveEntry::primitiveEntry(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), and dictionary::set().
|
inline |
|
pure virtual |
Return the dictionary name.
Implemented in primitiveEntry, and dictionaryEntry.
Referenced by dictionary::add().
|
pure virtual |
Return the dictionary name.
Implemented in primitiveEntry, and dictionaryEntry.
|
pure virtual |
Return line number of first token in dictionary.
Implemented in primitiveEntry, and dictionaryEntry.
|
pure virtual |
Return line number of last token in dictionary.
Implemented in primitiveEntry, and dictionaryEntry.
|
inlinevirtual |
Return true if this entry is a stream.
Reimplemented in primitiveEntry.
|
pure virtual |
Return token stream if this entry is a primitive entry.
Implemented in primitiveEntry, and dictionaryEntry.
Referenced by dynamicCodeContext::dynamicCodeContext(), dictionary::lookup(), dictionary::lookupBackwardsCompatible(), dictionary::lookupCompoundScoped(), dictionary::lookupOrAddDefault(), dictionary::lookupOrDefault(), dictionary::lookupOrDefaultBackwardsCompatible(), dictionary::lookupScoped(), coordinateSystem::New(), entry::New(), Foam::blockMeshTools::read(), dimensioned< Type >::readIfPresent(), dictionary::readIfPresent(), unitConversions::readIfPresent(), unitConversion::readIfPresent(), and solution::upgradeSolverDict().
|
inlinevirtual |
Return true if this entry is a dictionary.
Reimplemented in dictionaryEntry.
Definition at line 156 of file entry.H.
Referenced by dictionary::add(), Foam::stringOps::inplaceExpandCodeString(), dictionary::isDict(), coordinateSystem::New(), entry::New(), dictionary::scopedDict(), dictionary::set(), Foam::debug::switchSet(), and solution::upgradeSolverDict().
|
pure virtual |
Return dictionary if this entry is a dictionary.
Implemented in primitiveEntry, and dictionaryEntry.
Referenced by dictionary::add(), Foam::stringOps::inplaceExpandCodeString(), entry::New(), dictionary::optionalSubDict(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), dictionary::scopedDict(), dictionary::set(), dictionary::subDict(), dictionary::subDictBackwardsCompatible(), dictionary::subDictPtr(), dictionary::subOrEmptyDict(), dictionary::substituteKeyword(), dictionary::substituteScopedKeyword(), and Foam::debug::switchSet().
|
pure virtual |
Return non-const access to dictionary if this entry is a dictionary.
Implemented in primitiveEntry, and dictionaryEntry.
|
pure virtual |
Write.
Implemented in primitiveEntry, functionEntry, dictionaryListEntry, and dictionaryEntry.
void operator= | ( | const entry & | e | ) |
Definition at line 62 of file entry.C.
References Foam::abort(), Foam::e, Foam::FatalError, and FatalErrorInFunction.
bool operator== | ( | const entry & | e | ) | const |
Definition at line 76 of file entry.C.
References Foam::e, and OStringStream::str().
bool operator!= | ( | const entry & | e | ) | const |
Definition at line 95 of file entry.C.
References Foam::e, and Foam::operator==().
|
static |
Definition at line 86 of file entry.H.
Referenced by dictionary::add(), and Foam::readConfigFile().