FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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

#include <OpenFOAM/entry.H>


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 66 of file entry.H.

Inheritance diagram for entry:
Collaboration diagram for entry:

List of all members.

Public Member Functions

 entry (const keyType &)
 Construct from keyword.
 entry (const entry &)
 Construct as copy.
virtual autoPtr< entry >  clone (const dictionary &parentDict) const =0
 Construct on freestore as copy with reference to the.
virtual autoPtr< entry >  clone () const
 Construct on freestore as copy.
virtual  ~entry ()
 Destructor.
const keyType &  keyword () const
 Return keyword.
keyType &  keyword ()
 Return non-const access to keyword.
virtual const fileName &  name () const =0
 Return the dictionary name.
virtual fileName &  name ()=0
 Return the dictionary name.
virtual label  startLineNumber () const =0
 Return line number of first token in dictionary.
virtual label  endLineNumber () const =0
 Return line number of last token in dictionary.
virtual bool  isStream () const
 Return true if this entry is a stream.
virtual ITstream &  stream () const =0
 Return token stream if this entry is a primitive entry.
virtual bool  isDict () const
 Return true if this entry is a dictionary.
virtual const dictionary &  dict () const =0
 Return dictionary if this entry is a dictionary.
virtual dictionary &  dict ()=0
 Return non-const access to dictionary if this entry is a dictionary.
virtual void  write (Ostream &) const =0
 Write.
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.
static autoPtr< entry >  New (Istream &is)
 Construct on freestore from Istream and return.

Friends

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

Constructor & Destructor Documentation

entry ( const keyType &   keyword  )

Construct from keyword.

Definition at line 32 of file entry.C.

entry ( const entry &   e  )

Construct as copy.

Definition at line 38 of file entry.C.

virtual ~entry (  ) [inline, virtual]

Destructor.

Definition at line 111 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 dictionaryEntry, and primitiveEntry.

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

Foam::autoPtr< Foam::entry > clone (  ) const [virtual]

Construct on freestore as copy.

Note: the parent directory is set to dictionary::null

Definition at line 44 of file entry.C.

References dictionary::null.

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

Construct on freestore from Istream and return.

Definition at line 194 of file entryIO.C.

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

keyType& keyword (  ) [inline]

Return non-const access to keyword.

Definition at line 124 of file entry.H.

virtual const fileName& name (  ) const [pure virtual]

Return the dictionary name.

Implemented in dictionaryEntry, and primitiveEntry.

Referenced by dictionary::add().

virtual fileName& name (  ) [pure virtual]

Return the dictionary name.

Implemented in dictionaryEntry, and primitiveEntry.

virtual label startLineNumber (  ) const [pure virtual]

Return line number of first token in dictionary.

Implemented in dictionaryEntry, and primitiveEntry.

Referenced by dictionaryEntry::startLineNumber().

virtual label endLineNumber (  ) const [pure virtual]

Return line number of last token in dictionary.

Implemented in dictionaryEntry, and primitiveEntry.

virtual bool isStream (  ) const [inline, virtual]

Return true if this entry is a stream.

Reimplemented in primitiveEntry.

Definition at line 142 of file entry.H.

virtual dictionary& dict (  ) [pure virtual]

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

Implemented in dictionaryEntry, and primitiveEntry.

virtual void write ( Ostream &    ) const [pure virtual]

Write.

Implemented in dictionaryEntry, and primitiveEntry.

Referenced by Foam::operator<<().

void operator= ( const entry &   e  )

Definition at line 52 of file entry.C.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

bool operator== ( const entry &   e  ) const

Definition at line 66 of file entry.C.

References e, and OStringStream::str().

bool operator!= ( const entry &   e  ) const

Definition at line 85 of file entry.C.

References Foam::operator==().


Friends And Related Function Documentation

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

The documentation for this class was generated from the following files:
  • src/OpenFOAM/db/dictionary/entry/entry.H
  • src/OpenFOAM/db/dictionary/entry/entry.C
  • src/OpenFOAM/db/dictionary/entry/entryIO.C