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 primitiveEntry, dictionaryEntry, functionEntry, and dictionaryListEntry.
Referenced by dictionary::add(), and dictionary::set().
|
virtual |
Construct on freestore as copy.
Note: the parent directory is set to dictionary::null
Definition at line 54 of file entry.C.
References dictionary::null.
|
static |
Construct from Istream and insert into dictionary.
Definition at line 92 of file entryIO.C.
References dictionary::add(), token::BEGIN_BLOCK, token::BEGIN_LIST, dictionary::clear(), entry::dict(), entry::disableFunctionEntries, token::END_BLOCK, Foam::endl(), IOstream::eof(), inputModeEntry::error(), functionEntry::execute(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::stringOps::inplaceExpand(), entry::isDict(), keyType::isFunctionName(), token::isLabel(), token::isPunctuation(), keyType::isVariable(), entry::keyword(), dictionary::lookup(), dictionary::lookupEntryPtr(), dictionary::lookupScopedEntryPtr(), inputModeEntry::merge(), IOstream::name(), inputModeEntry::overwrite(), inputModeEntry::protect(), token::pToken(), Istream::putBack(), s(), dictionary::substituteScopedKeyword(), and success.
Referenced by dictionaryListEntry::dictionaryListEntry(), dictionary::read(), and functionObjectList::readFunctionObject().
|
static |
Construct on freestore from Istream and return.
Definition at line 320 of file entryIO.C.
References token::BEGIN_BLOCK, IOstream::fatalCheck(), entry::keyword(), dictionary::null, and Istream::putBack().
|
inline |
Return keyword.
Definition at line 123 of file entry.H.
Referenced by dictionary::add(), cellModel::cellModel(), dictionary::lookupEntryPtrBackwardsCompatible(), entry::New(), sizeGroup::iNew::operator()(), Foam::operator<<(), Foam::operator>>(), phaseProperties::phaseProperties(), primitiveEntry::primitiveEntry(), primitiveEntry::read(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::readField(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), dictionary::set(), dictionaryListEntry::write(), dictionaryEntry::write(), and primitiveEntry::write().
|
inline |
Return non-const access to keyword.
Definition at line 129 of file entry.H.
References entry::endLineNumber(), entry::name(), and entry::startLineNumber().
|
pure virtual |
Return the dictionary name.
Implemented in dictionaryEntry, and primitiveEntry.
Referenced by dictionary::add(), and entry::keyword().
|
pure virtual |
Return the dictionary name.
Implemented in dictionaryEntry, and primitiveEntry.
|
pure virtual |
Return line number of first token in dictionary.
Implemented in dictionaryEntry, and primitiveEntry.
Referenced by entry::keyword().
|
pure virtual |
Return line number of last token in dictionary.
Implemented in dictionaryEntry, and primitiveEntry.
Referenced by entry::keyword().
|
inlinevirtual |
Return true if this entry is a stream.
Reimplemented in primitiveEntry.
Definition at line 147 of file entry.H.
References entry::stream().
|
pure virtual |
Return token stream if this entry is a primitive entry.
Implemented in primitiveEntry, and dictionaryEntry.
Referenced by dynamicCodeContext::dynamicCodeContext(), lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), entry::isStream(), dictionary::lookup(), dictionary::lookupBackwardsCompatible(), dictionary::lookupOrAddDefault(), dictionary::lookupOrDefault(), dictionary::lookupOrDefaultBackwardsCompatible(), coordinateSystem::New(), lduMatrix::smoother::New(), lduMatrix::preconditioner::New(), Foam::blockMeshTools::read(), dictionary::readIfPresent(), and solution::upgradeSolverDict().
|
inlinevirtual |
Return true if this entry is a dictionary.
Reimplemented in dictionaryEntry.
Definition at line 156 of file entry.H.
References entry::dict(), entry::operator!=(), entry::operator<<, entry::operator=(), entry::operator==(), and entry::write().
Referenced by dictionary::add(), lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), dictionary::isDict(), entry::New(), coordinateSystem::New(), lduMatrix::smoother::New(), lduMatrix::preconditioner::New(), functionObjectList::read(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::readField(), dictionary::scopedDict(), dictionary::set(), Foam::debug::switchSet(), and solution::upgradeSolverDict().
|
pure virtual |
Return dictionary if this entry is a dictionary.
Implemented in dictionaryEntry, and primitiveEntry.
Referenced by dictionary::add(), lduMatrix::smoother::getName(), lduMatrix::preconditioner::getName(), entry::isDict(), entry::New(), lduMatrix::smoother::New(), lduMatrix::preconditioner::New(), dictionary::optionalSubDict(), functionObjectList::read(), GeometricBoundaryField< vector, pointPatchField, pointMesh >::readField(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), dictionary::scopedDict(), dictionary::set(), dictionary::subDict(), dictionary::subDictPtr(), dictionary::subOrEmptyDict(), and Foam::debug::switchSet().
|
pure virtual |
Return non-const access to dictionary if this entry is a dictionary.
Implemented in dictionaryEntry, and primitiveEntry.
|
pure virtual |
Write.
Implemented in primitiveEntry, dictionaryEntry, functionEntry, and dictionaryListEntry.
Referenced by entry::isDict(), and Foam::operator<<().
void operator= | ( | const entry & | e | ) |
Definition at line 62 of file entry.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by entry::isDict().
Definition at line 76 of file entry.C.
References Foam::e, and OStringStream::str().
Referenced by entry::isDict(), and entry::operator!=().
Definition at line 95 of file entry.C.
References entry::operator==().
Referenced by entry::isDict().
Referenced by entry::isDict().
|
static |
Definition at line 86 of file entry.H.
Referenced by dictionary::add(), Foam::debug::controlDict(), entry::New(), and functionObjectList::readFunctionObject().