www.cemf.ir
dataEntry Class Reference

Data entry to be used in dictionries. More...

+ Inheritance diagram for dataEntry:
+ Collaboration diagram for dataEntry:

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...
 
- Public Member Functions inherited from iEntry
 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...
 
- Protected Member Functions inherited from iEntry
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...
 
- Protected Attributes inherited from iEntry
word keyword_
 

Additional Inherited Members

- Static Public Member Functions inherited from iEntry
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...
 

Detailed Description

Data entry to be used in dictionries.

Its format is:

entryName value;
entryName2 (list of values);

Definition at line 48 of file dataEntry.hpp.

Constructor & Destructor Documentation

◆ dataEntry() [1/8]

dataEntry ( )

construct null dataEntry

Definition at line 163 of file dataEntry.cpp.

◆ dataEntry() [2/8]

dataEntry ( const word &  keyword,
const dictionary &  parDict 
)

construct from keyword and parDict, empty dataEntry

Definition at line 172 of file dataEntry.cpp.

◆ dataEntry() [3/8]

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() [4/8]

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().

+ Here is the call graph for this function:

◆ dataEntry() [5/8]

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() [6/8]

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_.

+ Here is the call graph for this function:

◆ dataEntry() [7/8]

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_.

+ Here is the call graph for this function:

◆ dataEntry() [8/8]

dataEntry ( const dataEntry &  src)
default

copy construct

Member Function Documentation

◆ readDataEntry()

bool readDataEntry ( iIstream &  is)
protected

◆ writeDataEntry()

bool writeDataEntry ( iOstream &  os) const
protected

write dataEntry to stream

Definition at line 98 of file dataEntry.cpp.

References iOstream::endEntry(), pFlow::endStatementToken(), isBeginToken(), isEndToken(), and pFlow::spaceToken().

+ Here is the call graph for this function:

◆ globalName()

pFlow::word globalName ( ) const
virtual

global name of entry, separated with dots

Implements iEntry.

Definition at line 295 of file dataEntry.cpp.

Referenced by dataEntry::dataEntry().

+ Here is the caller graph for this function:

◆ stream()

pFlow::iTstream & stream ( )
virtual

access to token stream

Definition at line 265 of file dataEntry.cpp.

References iTstream::rewind().

Referenced by dictionary::readDataEntry(), and twoPartEntry::twoPartEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dictPtr() [1/2]

const pFlow::dictionary * dictPtr ( )
virtual

not permited to be called

Reimplemented from iEntry.

Definition at line 273 of file dataEntry.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

+ Here is the call graph for this function:

◆ dictPtr() [2/2]

virtual const dictionary* dictPtr ( ) const
virtual

not permited to be called

Reimplemented from iEntry.

◆ isDictionary()

bool isDictionary ( ) const
virtual

should returen false;

Reimplemented from iEntry.

Definition at line 290 of file dataEntry.cpp.

◆ parrentDict()

const pFlow::dictionary & parrentDict ( ) const
virtual

const ref to parrent dictionary

Implements iEntry.

Definition at line 301 of file dataEntry.cpp.

◆ dict() [1/2]

const pFlow::dictionary & dict ( )
virtual

not permited to be called

Implements iEntry.

Definition at line 307 of file dataEntry.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

+ Here is the call graph for this function:

◆ dict() [2/2]

virtual const dictionary& dict ( ) const
virtual

not permited to be called

Implements iEntry.

◆ clonePtr() [1/2]

pFlow::iEntry * clonePtr ( ) const
virtual

clone the object

Implements iEntry.

Definition at line 331 of file dataEntry.cpp.

◆ clone() [1/2]

pFlow::uniquePtr< pFlow::iEntry > clone ( ) const
virtual

Implements iEntry.

Definition at line 325 of file dataEntry.cpp.

◆ clonePtr() [2/2]

pFlow::iEntry * clonePtr ( const dictionary &  parDict) const
virtual

clone the object and change its ownership to parDict

Implements iEntry.

Definition at line 342 of file dataEntry.cpp.

◆ clone() [2/2]

pFlow::uniquePtr< pFlow::iEntry > clone ( const dictionary &  parDict) const
virtual

clone the object and change its ownership to parDict

Implements iEntry.

Definition at line 337 of file dataEntry.cpp.

◆ read()

bool read ( iIstream &  is)
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().

+ Here is the call graph for this function:

◆ write()

bool write ( iOstream &  os) const
virtual

write to stream

Implements iEntry.

Definition at line 370 of file dataEntry.cpp.

References fatalExit, ioErrorInFile, IOstream::lineNumber(), and IOstream::name().

+ Here is the call graph for this function:

Member Data Documentation

◆ parDict_

const dictionary& parDict_
protected

ref to parrent dictionary

Definition at line 58 of file dataEntry.hpp.

◆ tokenStream_

iTstream tokenStream_
protected

list the tokens as input token stream

Definition at line 61 of file dataEntry.hpp.

Referenced by dataEntry::dataEntry().

◆ nullDataEntry

pFlow::dataEntry nullDataEntry
static

Definition at line 74 of file dataEntry.hpp.

Referenced by dictionary::dataEntryRef().


The documentation for this class was generated from the following files: