All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
entry Class Referenceabstract

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

Inheritance diagram for entry:
Collaboration diagram for entry:

Public Member Functions

 entry (const keyType &)
 Construct from keyword. More...
 
 entry (const entry &)
 Copy constructor. More...
 
virtual autoPtr< entryclone (const dictionary &parentDict) const =0
 Construct on freestore as copy with reference to the. More...
 
virtual autoPtr< entryclone () const
 Construct on freestore as copy. More...
 
virtual ~entry ()
 Destructor. More...
 
const keyTypekeyword () const
 Return keyword. More...
 
keyTypekeyword ()
 Return non-const access to keyword. More...
 
virtual const fileNamename () const =0
 Return the dictionary name. More...
 
virtual fileNamename ()=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 ITstreamstream () 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 dictionarydict () const =0
 Return dictionary if this entry is a dictionary. More...
 
virtual dictionarydict ()=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< entryNew (Istream &is)
 Construct on freestore from Istream and return. More...
 

Static Public Attributes

static int disableFunctionEntries
 

Friends

Ostreamoperator<< (Ostream &, const entry &)
 

Detailed Description

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.

Source files

Definition at line 65 of file entry.H.

Constructor & Destructor Documentation

◆ entry() [1/2]

entry ( const keyType keyword)

Construct from keyword.

Definition at line 40 of file entry.C.

References Foam::link.

◆ entry() [2/2]

entry ( const entry e)

Copy constructor.

Definition at line 47 of file entry.C.

◆ ~entry()

virtual ~entry ( )
inlinevirtual

Destructor.

Definition at line 116 of file entry.H.

Member Function Documentation

◆ clone() [1/2]

virtual autoPtr<entry> clone ( const dictionary parentDict) const
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().

Here is the caller graph for this function:

◆ clone() [2/2]

Foam::autoPtr< Foam::entry > clone ( ) const
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.

◆ New() [1/2]

◆ New() [2/2]

Foam::autoPtr< Foam::entry > New ( Istream is)
static

Construct on freestore from Istream and return.

Definition at line 305 of file entryIO.C.

References token::BEGIN_BLOCK, IOstream::fatalCheck(), entry::keyword(), dictionary::null, and Istream::putBack().

Here is the call graph for this function:

◆ keyword() [1/2]

◆ keyword() [2/2]

keyType& keyword ( )
inline

Return non-const access to keyword.

Definition at line 129 of file entry.H.

References entry::endLineNumber(), entry::name(), and entry::startLineNumber().

Here is the call graph for this function:

◆ name() [1/2]

virtual const fileName& name ( ) const
pure virtual

Return the dictionary name.

Implemented in primitiveEntry, and dictionaryEntry.

Referenced by dictionary::add(), and entry::keyword().

Here is the caller graph for this function:

◆ name() [2/2]

virtual fileName& name ( )
pure virtual

Return the dictionary name.

Implemented in primitiveEntry, and dictionaryEntry.

◆ startLineNumber()

virtual label startLineNumber ( ) const
pure virtual

Return line number of first token in dictionary.

Implemented in primitiveEntry, and dictionaryEntry.

Referenced by entry::keyword().

Here is the caller graph for this function:

◆ endLineNumber()

virtual label endLineNumber ( ) const
pure virtual

Return line number of last token in dictionary.

Implemented in primitiveEntry, and dictionaryEntry.

Referenced by entry::keyword().

Here is the caller graph for this function:

◆ isStream()

virtual bool isStream ( ) const
inlinevirtual

Return true if this entry is a stream.

Reimplemented in primitiveEntry.

Definition at line 147 of file entry.H.

References entry::stream().

Here is the call graph for this function:

◆ stream()

◆ isDict()

◆ dict() [1/2]

◆ dict() [2/2]

virtual dictionary& dict ( )
pure virtual

Return non-const access to dictionary if this entry is a dictionary.

Implemented in primitiveEntry, and dictionaryEntry.

◆ write()

virtual void write ( Ostream ) const
pure virtual

Write.

Implemented in primitiveEntry, dictionaryEntry, functionEntry, and dictionaryListEntry.

Referenced by entry::isDict(), and Foam::operator<<().

Here is the caller graph for this function:

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

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

◆ operator==()

bool operator== ( const entry e) const

Definition at line 76 of file entry.C.

References Foam::e, and OStringStream::str().

Referenced by entry::isDict(), and entry::operator!=().

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

◆ operator!=()

bool operator!= ( const entry e) const

Definition at line 95 of file entry.C.

References entry::operator==().

Referenced by entry::isDict().

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

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const entry  
)
friend

Referenced by entry::isDict().

Member Data Documentation

◆ disableFunctionEntries

int disableFunctionEntries
static

Definition at line 86 of file entry.H.

Referenced by dictionary::add(), entry::New(), and functionObjectList::readFunctionObject().


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