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>
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.
Definition at line 63 of file primitiveEntry.H.
 Inheritance diagram for primitiveEntry:
 Inheritance diagram for primitiveEntry: Collaboration diagram for primitiveEntry:
 Collaboration diagram for primitiveEntry:| 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. | |
| 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().
| 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.
| bool read | ( | const dictionary & | dict, | 
| Istream & | is | ||
| ) | 
Read tokens from the given stream.
Definition at line 126 of file primitiveEntryIO.C.
References append(), IOstream::bad(), token::BEGIN_BLOCK, token::BEGIN_LIST, token::END_BLOCK, token::END_LIST, token::END_STATEMENT, IOstream::fatalCheck(), token::good(), and Istream::read().
Referenced by includeIfPresentEntry::execute(), and includeEntry::execute().
| 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<<().