A keyword and a list of tokens is an 'entry'. More...


Public Member Functions | |
| entry (const keyType &key, const label keywordLineNumber) | |
| Construct from keyword and corresponding line number. 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 |
| Return line number of keyword of the entry. More... | |
| virtual label & | startLineNumber () |
| Return non-const access to line number of keyword of the entry. 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.
Construct from keyword and corresponding line number.
Definition at line 40 of file entry.C.
References Foam::link.
|
pure virtual |
Construct on freestore as copy with reference to the.
dictionary the copy belongs to
Implemented in dictionaryListEntry, dictionaryEntry, functionEntry, primitiveEntry, streamEntry, removeEntry, printEntry, inputModeEntry, includeIfPresentEntry, includeFuncEntry, includeEtcEntry, includeEntry, ifeqEntry, ifEntry, exitEntry, endifEntry, endCodeBlockEntry, elseEntry, elifEntry, dumpEntry, codeStream, codeIncludeEntry, codeDict, codeBlockStreamEntry, codeBlockDictEntry, codeBlockEntry, calcEntry, includeFvModelEntry, and includeFvConstraintEntry.
Referenced by Foam::addEntry().

|
virtual |
Construct on freestore as copy.
Note: the parent directory is set to dictionary::null
Definition at line 56 of file entry.C.
References Foam::clone(), and dictionary::null.

|
static |
Construct from Istream and insert into dictionary.
Definition at line 105 of file entryIO.C.
References dictionary::add(), token::BEGIN_BLOCK, token::BEGIN_LIST, dictionary::clear(), entry::dict(), token::END_BLOCK, Foam::endl(), Istream::eof(), inputModeEntry::error(), Foam::exit(), IOstream::fatalCheck(), Foam::FatalIOError, FatalIOErrorInFunction, forAllConstIter, Foam::stringOps::inplaceExpandEntry(), entry::isDict(), keyType::isFunctionName(), token::isLabel(), token::isPunctuation(), entry::isStream(), keyType::isVariable(), dictionary::lookupEntryPtr(), dictionary::lookupScopedEntryPtr(), inputModeEntry::merge(), IOstream::name(), functionEntry::New(), Foam::nl, inputModeEntry::overwrite(), inputModeEntry::protect(), token::pToken(), autoPtr< T >::ptr(), Istream::putBack(), s(), entry::stream(), and Foam::blendedInterfacialModel::valid().
Referenced by Foam::addArgEntry(), dictionaryListEntry::dictionaryListEntry(), functionEntry::insert(), and dictionary::read().


|
static |
Construct on freestore from Istream and return.
Definition at line 366 of file entryIO.C.
References token::BEGIN_BLOCK, IOstream::fatalCheck(), dictionary::null, and Istream::putBack().

|
inline |
Return keyword.
Definition at line 136 of file entry.H.
Referenced by dictionary::add(), cellModel::cellModel(), dictionary::lookupEntryPtrBackwardsCompatible(), Foam::mergeDictionaries(), 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.
|
inlinevirtual |
Return line number of keyword of the entry.
Reimplemented in dictionaryEntry.
Definition at line 154 of file entry.H.
Referenced by primitiveEntry::primitiveEntry(), and dictionaryEntry::startLineNumber().

|
inlinevirtual |
|
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.
Definition at line 169 of file entry.H.
Referenced by entry::New().

|
pure virtual |
Return token stream if this entry is a primitive entry.
Implemented in primitiveEntry, and dictionaryEntry.
Referenced by dictionary::lookup(), dictionary::lookupBackwardsCompatible(), dictionary::lookupCompoundScoped(), dictionary::lookupOrAddDefault(), dictionary::lookupOrDefault(), dictionary::lookupOrDefaultBackwardsCompatible(), dictionary::lookupScoped(), coordinateSystem::New(), entry::New(), dynamicCode::read(), Foam::blockMeshTools::read(), dimensioned< Type >::readIfPresent(), dictionary::readIfPresent(), unitSet::readIfPresent(), and dimensioned< Type >::readOrDefault().

|
inlinevirtual |
Return true if this entry is a dictionary.
Reimplemented in dictionaryEntry.
Definition at line 178 of file entry.H.
Referenced by dictionary::add(), Foam::addEntry(), Foam::stringOps::inplaceExpandCodeString(), dictionary::isDict(), coordinateSystem::New(), entry::New(), dictionary::optionalTypeDict(), dictionary::scopedDict(), dictionary::set(), Foam::debug::switchSet(), dictionary::typeDict(), and dictionary::typeOrEmptyDict().

|
pure virtual |
Return dictionary if this entry is a dictionary.
Implemented in primitiveEntry, and dictionaryEntry.
Referenced by dictionary::add(), Foam::addEntry(), Foam::stringOps::inplaceExpandCodeString(), entry::New(), dictionary::optionalSubDict(), dictionary::optionalTypeDict(), refinementRegions::refinementRegions(), refinementSurfaces::refinementSurfaces(), dictionary::scopedDict(), dictionary::set(), dictionary::subDict(), dictionary::subDictBackwardsCompatible(), dictionary::subDictPtr(), dictionary::subOrEmptyDict(), dictionary::substituteKeyword(), Foam::debug::switchSet(), dictionary::typeDict(), and dictionary::typeOrEmptyDict().

|
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, codeBlockStreamEntry, codeBlockDictEntry, dictionaryListEntry, and dictionaryEntry.
| void operator= | ( | const entry & | e | ) |
Definition at line 64 of file entry.C.
References Foam::abort(), Foam::e, Foam::FatalError, and FatalErrorInFunction.

| bool operator== | ( | const entry & | e | ) | const |
Definition at line 79 of file entry.C.
References Foam::e, and OStringStream::str().

| bool operator!= | ( | const entry & | e | ) | const |
Definition at line 98 of file entry.C.
References Foam::e, and Foam::operator==().

|
static |
Definition at line 102 of file entry.H.
Referenced by dictionary::add(), codeBlockEntry::execute(), and Foam::readConfigFile().