Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
entry Class Referenceabstract

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

Inheritance diagram for entry:
Inheritance graph
[legend]
Collaboration diagram for entry:
Collaboration graph
[legend]

Public Member Functions

 entry (const keyType &)
 Construct from keyword. More...
 
 entry (const entry &)
 Construct as copy. 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 &)
 

Additional Inherited Members

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 ( const keyType keyword)

Construct from keyword.

Definition at line 40 of file entry.C.

entry ( const entry e)

Construct as copy.

Definition at line 47 of file entry.C.

virtual ~entry ( )
inlinevirtual

Destructor.

Definition at line 113 of file entry.H.

Member Function Documentation

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, and dictionaryEntry.

Referenced by dictionary::add(), and dictionary::set().

Here is the caller graph for this function:

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.

bool New ( dictionary parentDict,
Istream is 
)
static
Foam::autoPtr< Foam::entry > New ( Istream is)
static

Construct on freestore from Istream and return.

Definition at line 256 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:

const keyType& keyword ( ) const
inline
keyType& keyword ( )
inline

Return non-const access to keyword.

Definition at line 126 of file entry.H.

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

Here is the call graph for this function:

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:

virtual fileName& name ( )
pure virtual

Return the dictionary name.

Implemented in primitiveEntry, and dictionaryEntry.

virtual label startLineNumber ( ) const
pure virtual

Return line number of first token in dictionary.

Implemented in primitiveEntry, and dictionaryEntry.

Referenced by dynamicCodeContext::dynamicCodeContext(), entry::keyword(), codedFunctionObject::read(), CodedSource< Type >::read(), dictionaryEntry::startLineNumber(), and dictionary::startLineNumber().

Here is the caller graph for this function:

virtual label endLineNumber ( ) const
pure virtual

Return line number of last token in dictionary.

Implemented in primitiveEntry, and dictionaryEntry.

Referenced by dictionaryEntry::endLineNumber(), dictionary::endLineNumber(), and entry::keyword().

Here is the caller graph for this function:

virtual bool isStream ( ) const
inlinevirtual

Return true if this entry is a stream.

Reimplemented in primitiveEntry.

Definition at line 144 of file entry.H.

References entry::stream().

Here is the call graph for this function:

virtual ITstream& stream ( ) const
pure virtual
virtual bool isDict ( ) const
inlinevirtual
virtual const dictionary& dict ( ) const
pure virtual
virtual dictionary& dict ( )
pure virtual

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

Implemented in primitiveEntry, and dictionaryEntry.

virtual void write ( Ostream ) const
pure virtual

Write.

Implemented in primitiveEntry, and dictionaryEntry.

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

Here is the caller graph for this function:

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:

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:

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

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

Referenced by entry::isDict().

Member Data Documentation

int disableFunctionEntries
static

Definition at line 83 of file entry.H.

Referenced by entry::New().


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