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

primitiveEntry Class Reference

A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read, written and printed, and the types and values of its tokens analysed. More...

Inheritance diagram for primitiveEntry:
Collaboration diagram for primitiveEntry:

List of all members.


Public Member Functions

 primitiveEntry (const keyType &, Istream &)
 Construct from keyword and a Istream.
 primitiveEntry (const keyType &, const dictionary &parentDict, Istream &)
 Construct from keyword, parent dictionary and Istream.
 primitiveEntry (const keyType &, const ITstream &)
 Construct from keyword and a ITstream.
 primitiveEntry (const keyType &, const token &)
 Construct from keyword and a token.
 primitiveEntry (const keyType &, const tokenList &)
 Construct from keyword and a tokenList.
template<class T >
 primitiveEntry (const keyType &, const T &)
 Construct from keyword and a T.
autoPtr< entryclone (const dictionary &) const
 Construct on freestore as copy with reference to the.
const fileNamename () const
 Return the dictionary name.
fileNamename ()
 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.
bool isStream () const
 Return true because this entry is a stream.
ITstreamstream () const
 Return token stream if this entry is a primitive entry.
const dictionarydict () const
 This entry is not a dictionary,.
dictionarydict ()
 This entry is not a dictionary,.
bool read (const dictionary &, Istream &)
 Read tokens from the given stream.
void write (Ostream &) const
 Write.
InfoProxy< primitiveEntryinfo () const
 Return info proxy.

Detailed Description

A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read, written and printed, and the types and values of its tokens analysed.

A primitiveEntry 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 primitiveEntry.H.


Constructor & Destructor Documentation

primitiveEntry ( const keyType key,
Istream is 
)

Construct from keyword and a Istream.

Definition at line 231 of file primitiveEntryIO.C.

primitiveEntry ( const keyType key,
const dictionary parentDict,
Istream is 
)

Construct from keyword, parent dictionary and Istream.

Definition at line 212 of file primitiveEntryIO.C.

primitiveEntry ( const keyType key,
const ITstream tokens 
)

Construct from keyword and a ITstream.

Definition at line 23 of file primitiveEntry.C.

primitiveEntry ( const keyType keyword,
const token t 
)

Construct from keyword and a token.

Definition at line 32 of file primitiveEntry.C.

References entry::keyword(), and primitiveEntry::name().

Here is the call graph for this function:

primitiveEntry ( const keyType keyword,
const tokenList tokens 
)

Construct from keyword and a tokenList.

Definition at line 40 of file primitiveEntry.C.

primitiveEntry ( const keyType keyword,
const T &  t 
) [inline]

Construct from keyword and a T.

Definition at line 24 of file primitiveEntryTemplates.C.

References token::END_STATEMENT, dictionary::null, and OStringStream::str().

Here is the call graph for this function:


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 117 of file primitiveEntry.H.

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

Return the dictionary name.

Implements entry.

Definition at line 126 of file primitiveEntry.H.

Referenced by primitiveEntry::name(), and primitiveEntry::primitiveEntry().

Here is the caller graph for this function:

fileName& name (  )  [inline, virtual]

Return the dictionary name.

Implements entry.

Definition at line 132 of file primitiveEntry.H.

References primitiveEntry::name().

Here is the call graph for this function:

Foam::label startLineNumber (  )  const [virtual]

Return line number of first token in dictionary.

Implements entry.

Definition at line 52 of file primitiveEntry.C.

Foam::label endLineNumber (  )  const [virtual]

Return line number of last token in dictionary.

Implements entry.

Definition at line 64 of file primitiveEntry.C.

bool isStream (  )  const [inline, virtual]

Return true because this entry is a stream.

Reimplemented from entry.

Definition at line 144 of file primitiveEntry.H.

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

Return token stream if this entry is a primitive entry.

Implements entry.

Definition at line 77 of file primitiveEntry.C.

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

This entry is not a dictionary,.

calling this function generates a FatalError

Implements entry.

Definition at line 85 of file primitiveEntry.C.

References ITstream::rewind().

Here is the call graph for this function:

Foam::dictionary & dict (  )  [virtual]

This entry is not a dictionary,.

calling this function generates a FatalError

Implements entry.

Definition at line 96 of file primitiveEntry.C.

bool read ( const dictionary dict,
Istream is 
)

Read tokens from the given stream.

Definition at line 114 of file primitiveEntryIO.C.

References functionEntry::execute(), and entry::keyword().

Here is the call graph for this function:

void write ( Ostream  )  const [virtual]

Write.

Implements entry.

Definition at line 248 of file primitiveEntryIO.C.

References dictionary::null.

InfoProxy<primitiveEntry> info (  )  const [inline]

Return info proxy.

Used to print token information to a stream

Reimplemented from IOstream.

Definition at line 174 of file primitiveEntry.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd