Data entry to be used in dictionries. More...
Public Member Functions | |
dataEntry () | |
construct null dataEntry More... | |
dataEntry (const word &keyword, const dictionary &parDict) | |
construct from keyword and parDict, empty dataEntry More... | |
dataEntry (const word &keyWord, const dictionary &parDict, const iTstream &is) | |
construct from keyword, parDict and input token stream More... | |
dataEntry (const word &keyWord, const dictionary &parDict, iIstream &is) | |
dataEntry (const word &keyword, const dictionary &parDict, const token &tok) | |
construct from keyword, parDict and a single token More... | |
template<typename T > | |
dataEntry (const word &keyword, const dictionary &parDict, const T &v) | |
construct from keyword, parDict, and data of type T More... | |
dataEntry (const word &keyword, const dictionary &parDict, const dataEntry &entry) | |
copy construct with new keyword and parDict More... | |
dataEntry (const dataEntry &src)=default | |
copy construct More... | |
virtual word | globalName () const |
global name of entry, separated with dots More... | |
virtual iTstream & | stream () |
access to token stream More... | |
virtual dictionary * | dictPtr () |
not permited to be called More... | |
virtual const dictionary * | dictPtr () const |
not permited to be called More... | |
virtual bool | isDictionary () const |
should returen false; More... | |
virtual const dictionary & | parrentDict () const |
const ref to parrent dictionary More... | |
virtual dictionary & | dict () |
not permited to be called More... | |
virtual const dictionary & | dict () const |
not permited to be called More... | |
virtual iEntry * | clonePtr () const |
clone the object More... | |
virtual uniquePtr< iEntry > | clone () const |
virtual iEntry * | clonePtr (const dictionary &parDict) const |
clone the object and change its ownership to parDict More... | |
virtual uniquePtr< iEntry > | clone (const dictionary &parDict) const |
clone the object and change its ownership to parDict More... | |
virtual bool | read (iIstream &is) |
read from stream More... | |
virtual bool | write (iOstream &os) const |
write to stream More... | |
![]() | |
TypeInfo ("iEntry") | |
Type info. More... | |
iEntry () | |
empty constructor More... | |
iEntry (const word &key) | |
construct with a keyword More... | |
virtual | ~iEntry () |
destructor More... | |
virtual const word & | keyword () const |
return keyword More... | |
virtual word & | keyword () |
return keyword More... | |
virtual word | name () const |
name/keyword of entry More... | |
Static Public Attributes | |
static dataEntry | nullDataEntry |
Protected Member Functions | |
bool | readDataEntry (iIstream &is) |
read dataEntry from stream More... | |
bool | writeDataEntry (iOstream &os) const |
write dataEntry to stream More... | |
![]() | |
bool | writeKeyword (iOstream &os) const |
Protected Attributes | |
const dictionary & | parDict_ |
ref to parrent dictionary More... | |
iTstream | tokenStream_ |
list the tokens as input token stream More... | |
![]() | |
word | keyword_ |
Additional Inherited Members | |
![]() | |
static bool | readKeyword (iIstream &is, word &keyword, token &tok) |
read a keyword from stream More... | |
static bool | createEntry (dictionary &parDict, iIstream &is, bool hasBlockToken=false) |
create an entry (dataEntry or dictionary) from stream More... | |
Data entry to be used in dictionries.
Its format is:
Definition at line 48 of file dataEntry.hpp.
dataEntry | ( | ) |
construct null dataEntry
Definition at line 163 of file dataEntry.cpp.
dataEntry | ( | const word & | keyword, |
const dictionary & | parDict | ||
) |
construct from keyword and parDict, empty dataEntry
Definition at line 172 of file dataEntry.cpp.
dataEntry | ( | const word & | keyWord, |
const dictionary & | parDict, | ||
const iTstream & | is | ||
) |
construct from keyword, parDict and input token stream
Definition at line 189 of file dataEntry.cpp.
dataEntry | ( | const word & | keyWord, |
const dictionary & | parDict, | ||
iIstream & | is | ||
) |
Definition at line 207 of file dataEntry.cpp.
References fatalExit, ioErrorInFile, IOstream::lineNumber(), and IOstream::name().
dataEntry | ( | const word & | keyword, |
const dictionary & | parDict, | ||
const token & | tok | ||
) |
construct from keyword, parDict and a single token
Definition at line 231 of file dataEntry.cpp.
dataEntry | ( | const word & | keyword, |
const dictionary & | parDict, | ||
const T & | v | ||
) |
construct from keyword, parDict, and data of type T
Definition at line 155 of file dataEntry.hpp.
References pFlow::endStatementToken(), dataEntry::globalName(), oTstream::tokens(), and dataEntry::tokenStream_.
dataEntry | ( | const word & | keyword, |
const dictionary & | parDict, | ||
const dataEntry & | entry | ||
) |
copy construct with new keyword and parDict
Definition at line 251 of file dataEntry.cpp.
References iTstream::tokens(), and dataEntry::tokenStream_.
|
protected |
read dataEntry from stream
Definition at line 35 of file dataEntry.cpp.
References IOstream::bad(), IOstream::fatalCheck(), fatalExit, FUNCTION_NAME, token::good(), ioErrorInFile, token::isPunctuation(), IOstream::lineNumber(), IOstream::name(), token::pToken(), and iIstream::read().
|
protected |
write dataEntry to stream
Definition at line 98 of file dataEntry.cpp.
References iOstream::endEntry(), pFlow::endStatementToken(), isBeginToken(), isEndToken(), and pFlow::spaceToken().
|
virtual |
global name of entry, separated with dots
Implements iEntry.
Definition at line 295 of file dataEntry.cpp.
Referenced by dataEntry::dataEntry().
|
virtual |
access to token stream
Definition at line 265 of file dataEntry.cpp.
References iTstream::rewind().
Referenced by dictionary::readDataEntry(), and twoPartEntry::twoPartEntry().
|
virtual |
not permited to be called
Reimplemented from iEntry.
Definition at line 273 of file dataEntry.cpp.
References pFlow::endl(), fatalErrorInFunction, and fatalExit.
|
virtual |
not permited to be called
Reimplemented from iEntry.
|
virtual |
|
virtual |
|
virtual |
not permited to be called
Implements iEntry.
Definition at line 307 of file dataEntry.cpp.
References pFlow::endl(), fatalErrorInFunction, and fatalExit.
|
virtual |
not permited to be called
Implements iEntry.
|
virtual |
|
virtual |
Implements iEntry.
Definition at line 325 of file dataEntry.cpp.
|
virtual |
clone the object and change its ownership to parDict
Implements iEntry.
Definition at line 342 of file dataEntry.cpp.
|
virtual |
clone the object and change its ownership to parDict
Implements iEntry.
Definition at line 337 of file dataEntry.cpp.
|
virtual |
read from stream
Implements iEntry.
Definition at line 349 of file dataEntry.cpp.
References pFlow::endl(), fatalErrorInFunction, fatalExit, ioErrorInFile, IOstream::lineNumber(), and IOstream::name().
|
virtual |
write to stream
Implements iEntry.
Definition at line 370 of file dataEntry.cpp.
References fatalExit, ioErrorInFile, IOstream::lineNumber(), and IOstream::name().
|
protected |
ref to parrent dictionary
Definition at line 58 of file dataEntry.hpp.
|
protected |
list the tokens as input token stream
Definition at line 61 of file dataEntry.hpp.
Referenced by dataEntry::dataEntry().
|
static |
Definition at line 74 of file dataEntry.hpp.
Referenced by dictionary::dataEntryRef().