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

dictionaryEntry Class Reference

A keyword and a list of tokens is a 'dictionaryEntry'. More...

#include <OpenFOAM/dictionaryEntry.H>


Detailed Description

A keyword and a list of tokens is a 'dictionaryEntry'.

An dictionaryEntry can be read, written and printed, and the types and values of its tokens analysed. A dictionaryEntry 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 58 of file dictionaryEntry.H.

Inheritance diagram for dictionaryEntry:
Collaboration diagram for dictionaryEntry:

List of all members.

Public Member Functions

 dictionaryEntry (const dictionary &parentDict, Istream &)
 Construct from the parent dictionary and Istream.
 dictionaryEntry (const keyType &, const dictionary &parentDict, Istream &)
 Construct from the keyword, parent dictionary and a Istream.
 dictionaryEntry (const keyType &, const dictionary &parentDict, const dictionary &dict)
 Construct from the keyword, parent dictionary and a dictionary.
 dictionaryEntry (const dictionary &parentDict, const dictionaryEntry &)
 Construct as copy for the given parentDict.
autoPtr< entry >  clone (const dictionary &parentDict) const
 Construct on freestore as copy with reference to the.
const fileName &  name () const
 Return the dictionary name.
fileName &  name ()
 Return the dictionary name.
label  startLineNumber () const
 Return line number of first token in dictionary.
label  endLineNumber () const
 Return line number of last token in dictionary.
ITstream &  stream () const
 This entry is not a primitive,.
bool  isDict () const
 Return true because this entry is a dictionary.
const dictionary &  dict () const
 Return dictionary.
dictionary &  dict ()
 Return non-const access to dictionary.
void  write (Ostream &) const
 Write.
InfoProxy< dictionaryEntry >  info () const
 Return info proxy.

Friends

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

Constructor & Destructor Documentation

dictionaryEntry ( const dictionary &   parentDict,
Istream &   is  
)

Construct from the parent dictionary and Istream.

Definition at line 36 of file dictionaryEntryIO.C.

References IOstream::fatalCheck().

dictionaryEntry ( const keyType &   key,
const dictionary &   parentDict,
Istream &   is  
)

Construct from the keyword, parent dictionary and a Istream.

Definition at line 53 of file dictionaryEntryIO.C.

References IOstream::fatalCheck().

dictionaryEntry ( const keyType &   key,
const dictionary &   parentDict,
const dictionary &   dict  
)

Construct from the keyword, parent dictionary and a dictionary.

Definition at line 31 of file dictionaryEntry.C.

dictionaryEntry ( const dictionary &   parentDict,
const dictionaryEntry &   dictEnt  
)

Construct as copy for the given parentDict.

Definition at line 43 of file dictionaryEntry.C.


Member Function Documentation

autoPtr<entry> clone ( const dictionary &   parentDict  ) const [inline, virtual]

Construct on freestore as copy with reference to the.

dictionary the copy belongs to

Implements entry.

Definition at line 101 of file dictionaryEntry.H.

const fileName& name (  ) const [inline, virtual]

Return the dictionary name.

Implements entry.

Definition at line 110 of file dictionaryEntry.H.

Referenced by dictionaryEntry::name().

fileName& name (  ) [inline, virtual]

Return the dictionary name.

Implements entry.

Definition at line 116 of file dictionaryEntry.H.

References dictionaryEntry::name().

Foam::label startLineNumber (  ) const

Return line number of first token in dictionary.

Reimplemented from dictionary.

Definition at line 55 of file dictionaryEntry.C.

References UILList< DLListBase, entry >::first(), DLListBase::size(), and entry::startLineNumber().

Foam::label endLineNumber (  ) const

Return line number of last token in dictionary.

Reimplemented from dictionary.

Definition at line 67 of file dictionaryEntry.C.

Foam::ITstream & stream (  ) const [virtual]

This entry is not a primitive,.

calling this function generates a FatalError

Implements entry.

Definition at line 80 of file dictionaryEntry.C.

References Foam::abort(), Foam::FatalIOError, and FatalIOErrorIn.

bool isDict (  ) const [inline, virtual]

Return true because this entry is a dictionary.

Reimplemented from entry.

Definition at line 132 of file dictionaryEntry.H.

const Foam::dictionary & dict (  ) const [virtual]

Return dictionary.

Implements entry.

Definition at line 90 of file dictionaryEntry.C.

Foam::dictionary & dict (  ) [virtual]

Return non-const access to dictionary.

Implements entry.

Definition at line 96 of file dictionaryEntry.C.

void write ( Ostream &    ) const [virtual]

Write.

Implements entry.

Definition at line 72 of file dictionaryEntryIO.C.

References Ostream::indent(), entry::keyword(), and Ostream::write().

InfoProxy<dictionaryEntry> info (  ) const [inline]

Return info proxy.

Used to print token information to a stream

Definition at line 148 of file dictionaryEntry.H.


Friends And Related Function Documentation

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

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