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

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...

#include <OpenFOAM/primitiveEntry.H>


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

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< entry >  clone (const dictionary &) 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.
bool  isStream () const
 Return true because this entry is a stream.
ITstream &  stream () const
 Return token stream if this entry is a primitive entry.
const dictionary &  dict () const
 This entry is not a dictionary,.
dictionary &  dict ()
 This entry is not a dictionary,.
bool  read (const dictionary &, Istream &)
 Read tokens from the given stream.
void  write (Ostream &) const
 Write.
InfoProxy< primitiveEntry >  info () const
 Return info proxy.

Constructor & Destructor Documentation

primitiveEntry ( const keyType &   key,
Istream &   is  
)

Construct from keyword and a Istream.

Definition at line 243 of file primitiveEntryIO.C.

References dictionary::null.

Referenced by primitiveEntry::clone().

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

Construct from keyword, parent dictionary and Istream.

Definition at line 224 of file primitiveEntryIO.C.

primitiveEntry ( const keyType &   key,
const ITstream &   tokens  
)

Construct from keyword and a ITstream.

Definition at line 31 of file primitiveEntry.C.

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

primitiveEntry ( const keyType &   keyword,
const token &   t  
)

Construct from keyword and a token.

Definition at line 40 of file primitiveEntry.C.

primitiveEntry ( const keyType &   keyword,
const tokenList &   tokens  
)

Construct from keyword and a tokenList.

Definition at line 48 of file primitiveEntry.C.

primitiveEntry ( const keyType &   keyword,
const T &   t  
)

Construct from keyword and a T.

Definition at line 32 of file primitiveEntryTemplates.C.

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


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

References primitiveEntry::primitiveEntry().

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

Return the dictionary name.

Implements entry.

Definition at line 131 of file primitiveEntry.H.

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

fileName& name (  ) [inline, virtual]

Return the dictionary name.

Implements entry.

Definition at line 137 of file primitiveEntry.H.

References primitiveEntry::name().

Foam::label startLineNumber (  ) const [virtual]

Return line number of first token in dictionary.

Implements entry.

Definition at line 60 of file primitiveEntry.C.

Foam::label endLineNumber (  ) const [virtual]

Return line number of last token in dictionary.

Implements entry.

Definition at line 72 of file primitiveEntry.C.

bool isStream (  ) const [inline, virtual]

Return true because this entry is a stream.

Reimplemented from entry.

Definition at line 149 of file primitiveEntry.H.

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

Return token stream if this entry is a primitive entry.

Implements entry.

Definition at line 85 of file primitiveEntry.C.

References ITstream::rewind().

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

This entry is not a dictionary,.

calling this function generates a FatalError

Implements entry.

Definition at line 93 of file primitiveEntry.C.

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

Foam::dictionary & dict (  ) [virtual]

This entry is not a dictionary,.

calling this function generates a FatalError

Implements entry.

Definition at line 104 of file primitiveEntry.C.

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

void write ( Ostream &    ) const [virtual]

Write.

Implements entry.

Definition at line 260 of file primitiveEntryIO.C.

References token::END_STATEMENT, Foam::endl(), token::SPACE, and Ostream::writeKeyword().

InfoProxy<primitiveEntry> info (  ) const [inline]

Return info proxy.

Used to print token information to a stream

Reimplemented from IOstream.

Definition at line 173 of file primitiveEntry.H.

Referenced by Foam::operator<<().


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