OpenFOAM logo
Open Source CFD Toolkit

dictionary Class Reference

Inheritance diagram for dictionary:

Inheritance graph
[legend]
Collaboration diagram for dictionary:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ClassName ("dictionary")
 dictionary ()
 Construct null.
 dictionary (Istream &, const word &lastEntry=word::null)
 Construct from Istream, reading entries until lastEntry or EOF.
 dictionary (const dictionary &)
 Construct as copy.
autoPtr< dictionaryclone () const
 Construct and return clone.
 ~dictionary ()
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 found (const word &keyword) const
 Search dictionary for given keyword.
const entrylookupEntry (const word &) const
 Find and return an entry data stream.
ITstreamlookup (const word &) const
 Find and return an entry data stream.
bool isDict (const word &) const
 Check if entry is a sub-dictionary.
const dictionarysubDict (const word &) const
 Find and return a sub-dictionary.
wordList toc () const
 Return the table of contents.
void add (const entry &)
 Add an entry.
void add (const word &keyword, const token &)
 Add a token entry.
void add (const word &keyword, const word &)
 Add a word entry.
void add (const word &keyword, const Foam::string &)
 Add a string entry.
void add (const word &keyword, const label)
 Add a label entry.
void add (const word &keyword, const scalar)
 Add a scalar entry.
void add (const word &keyword, const ITstream &)
 Add an entry constructed from a ITstream.
void add (const word &keyword, const tokenList &tokens)
 Add an entry constructed from a tokenList.
template<class T>
void add (const word &keyword, const T &)
 Add a T entry.
void add (const word &keyword, const dictionary &)
 Add a dictionary entry.
bool remove (const word &keyword)
 Remove an entry specified by keyword.
void write (Ostream &os, bool subDict=true) const
ITstreamoperator[] (const word &) const
 Find and return entry.
void operator= (const dictionary &)
void operator+= (const dictionary &)

Static Public Member Functions

autoPtr< dictionaryNew (Istream &is)
 Construct on freestore from Istream.

Static Public Attributes

const dictionary null
 Null dictionary.

Friends

Istreamoperator>> (Istream &, dictionary &)
 Read dictionary from Istream.
Ostreamoperator<< (Ostream &, const dictionary &)
 Write dictionary to Ostream.

Constructor & Destructor Documentation

dictionary  ) 
 

Construct null.

dictionary Istream ,
const word lastEntry = word::null
 

Construct from Istream, reading entries until lastEntry or EOF.

dictionary const dictionary  ) 
 

Construct as copy.

~dictionary  ) 
 


Member Function Documentation

void add const word keyword,
const dictionary
 

Add a dictionary entry.

void add const word keyword,
const T & 
 

Add a T entry.

void add const word keyword,
const tokenList tokens
 

Add an entry constructed from a tokenList.

void add const word keyword,
const ITstream
 

Add an entry constructed from a ITstream.

void add const word keyword,
const   scalar
 

Add a scalar entry.

void add const word keyword,
const   label
 

Add a label entry.

void add const word keyword,
const Foam::string
 

Add a string entry.

void add const word keyword,
const word
 

Add a word entry.

void add const word keyword,
const token
 

Add a token entry.

void add const entry  ) 
 

Add an entry.

ClassName "dictionary"   ) 
 

autoPtr<dictionary> clone  )  const
 

Construct and return clone.

Reimplemented in dictionaryEntry.

label endLineNumber  )  const
 

Return line number of last token in dictionary.

Reimplemented in dictionaryEntry.

bool found const word keyword  )  const
 

Search dictionary for given keyword.

bool isDict const word  )  const
 

Check if entry is a sub-dictionary.

ITstream& lookup const word  )  const
 

Find and return an entry data stream.

const entry& lookupEntry const word  )  const
 

Find and return an entry data stream.

fileName& name  )  [inline]
 

Return the dictionary name.

Reimplemented in dictionaryEntry.

Definition at line 129 of file dictionary.H.

References Foam::label, Foam::tokenList, and Foam::wordList.

const fileName& name  )  const [inline]
 

Return the dictionary name.

Reimplemented in dictionaryEntry, IOdictionary, and fvMesh.

Definition at line 123 of file dictionary.H.

autoPtr<dictionary> New Istream is  )  [static]
 

Construct on freestore from Istream.

void operator+= const dictionary  ) 
 

void operator= const dictionary  ) 
 

ITstream& operator[] const word  )  const
 

Find and return entry.

bool remove const word keyword  ) 
 

Remove an entry specified by keyword.

label startLineNumber  )  const
 

Return line number of first token in dictionary.

Reimplemented in dictionaryEntry.

const dictionary& subDict const word  )  const
 

Find and return a sub-dictionary.

wordList toc  )  const
 

Return the table of contents.

void write Ostream os,
bool  subDict = true
const
 


Friends And Related Function Documentation

Ostream& operator<< Ostream ,
const dictionary
[friend]
 

Write dictionary to Ostream.

Istream& operator>> Istream ,
dictionary
[friend]
 

Read dictionary from Istream.


Member Data Documentation

const dictionary null [static]
 

Null dictionary.

Definition at line 94 of file dictionary.H.


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org