OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

entry Class Reference

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

Inheritance diagram for entry:
Collaboration diagram for entry:

List of all members.


Public Member Functions

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

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


Constructor & Destructor Documentation

entry ( const keyType &  keyword  ) 

Construct from keyword.

Definition at line 24 of file entry.C.

entry ( const entry &  e  ) 

Construct as copy.

Definition at line 30 of file entry.C.

virtual ~entry (  )  [inline, virtual]

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.

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

Construct on freestore as copy.

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

Definition at line 37 of file entry.C.

Referenced by entry::operator=().

Here is the caller graph for this function:

bool New ( dictionary &  parentDict,
Istream &  is 
) [static]

Construct from Istream and insert into dictionary.

Definition at line 80 of file entryIO.C.

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

Construct on freestore from Istream and return.

Definition at line 186 of file entryIO.C.

const keyType& keyword (  )  const [inline]

Return keyword.

Definition at line 118 of file entry.H.

Referenced by phaseProperties::phaseProperties(), pointSourceProperties::pointSourceProperties(), primitiveEntry::primitiveEntry(), and primitiveEntry::read().

Here is the caller graph for this function:

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.

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

Here is the caller graph for this function:

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 ITstream& stream (  )  const [pure virtual]

Return token stream if this entry is a primitive entry.

Implemented in dictionaryEntry, and primitiveEntry.

Referenced by dictionary::isDict(), dictionary::lookupOrDefault(), and smoother::New().

Here is the caller graph for this function:

virtual bool isDict (  )  const [inline, virtual]

Return true if this entry is a dictionary.

Reimplemented in dictionaryEntry.

Definition at line 151 of file entry.H.

virtual const dictionary& dict (  )  const [pure virtual]

Return dictionary if this entry is a dictionary.

Implemented in dictionaryEntry, and primitiveEntry.

Referenced by dictionary::set().

Here is the caller graph for this function:

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.

void operator= ( const entry &  e  ) 

Definition at line 45 of file entry.C.

References entry::clone(), and dictionary::null.

Here is the call graph for this function:

bool operator== ( const entry &  e  )  const

Definition at line 59 of file entry.C.

bool operator!= ( const entry &  e  )  const

Definition at line 78 of file entry.C.


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
Copyright © 2000-2009 OpenCFD Ltd