OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

dictionary Class Reference

Inheritance diagram for dictionary:

Inheritance graph
[legend]
Collaboration diagram for dictionary:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 68 of file dictionary.H.


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< dictionary > clone () const
 Construct and return clone.
 ~dictionary ()
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 found (const word &keyword) const
 Search dictionary for given keyword.
const entry & lookupEntry (const word &) const
 Find and return an entry data stream.
ITstream & lookup (const word &) const
 Find and return an entry data stream.
bool isDict (const word &) const
 Check if entry is a sub-dictionary.
const dictionary & subDict (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.
bool changeKeyword (const word &oldKeyword, const word &newKeyword, bool forceOverwrite=false)
 Change the keyword for an entry,.
void write (Ostream &os, bool subDict=true) const
ITstream & operator[] (const word &) const
 Find and return entry.
void operator= (const dictionary &)
void operator+= (const dictionary &)
 Include entries from the given dictionary.
void operator|= (const dictionary &)
 Conditionally include entries from the given dictionary.
void operator<<= (const dictionary &)
 Unconditionally include entries from the given dictionary.

Static Public Member Functions

static autoPtr< dictionary > New (Istream &is)
 Construct on freestore from Istream.

Static Public Attributes

static const dictionary null
 Null dictionary.

Friends

Istream & operator>> (Istream &, dictionary &)
 Read dictionary from Istream.
Ostream & operator<< (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

ClassName ( "dictionary"   ) 

autoPtr<dictionary> clone (  )  const

Construct and return clone.

Reimplemented in dictionaryEntry.

static autoPtr<dictionary> New ( Istream &  is  )  [static]

Construct on freestore from Istream.

const fileName& name (  )  const [inline]

Return the dictionary name.

Reimplemented in dictionaryEntry, IOdictionary, and fvMesh.

Definition at line 123 of file dictionary.H.

fileName& name (  )  [inline]

Return the dictionary name.

Reimplemented in dictionaryEntry.

Definition at line 129 of file dictionary.H.

label startLineNumber (  )  const

Return line number of first token in dictionary.

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.

const entry& lookupEntry ( const word &   )  const

Find and return an entry data stream.

ITstream& lookup ( const word &   )  const

Find and return an entry data stream.

bool isDict ( const word &   )  const

Check if entry is a sub-dictionary.

const dictionary& subDict ( 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.

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.

bool changeKeyword ( const word &  oldKeyword,
const word &  newKeyword,
bool  forceOverwrite = false 
)

Change the keyword for an entry,.

optionally forcing overwrite of an existing entry

void write ( Ostream &  os,
bool  subDict = true 
) const

ITstream& operator[] ( const word &   )  const

Find and return entry.

void operator= ( const dictionary &   ) 

void operator+= ( const dictionary &   ) 

Include entries from the given dictionary.

Warn, but do not overwrite existing entries

void operator|= ( const dictionary &   ) 

Conditionally include entries from the given dictionary.

Do not overwrite existing entries.

void operator<<= ( const dictionary &   ) 

Unconditionally include entries from the given dictionary.

Overwrite existing entries.


Friends And Related Function Documentation

Istream& operator>> ( Istream &  ,
dictionary &   
) [friend]

Read dictionary from Istream.

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

Write dictionary to Ostream.


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: Copyright © 2000-2007 OpenCFD Ltd