FreeFOAM The Cross-Platform CFD Toolkit
Dictionary< T > Class Template Reference

Gerneral purpose template dictionary class which manages the storage associated with it. More...

#include <OpenFOAM/Dictionary_.H>


Detailed Description

template<class T>
class Foam::Dictionary< T >

Gerneral purpose template dictionary class which manages the storage associated with it.

It is derived from DictionaryBase instantiated on a memory managed form of intrusive doubly-linked list of <T>.

Source files

Definition at line 55 of file Dictionary_.H.

+ Inheritance diagram for Dictionary< T >:
+ Collaboration diagram for Dictionary< T >:

List of all members.

Public Member Functions

 Dictionary ()
 Null constructor.
 Dictionary (const Dictionary &)
 Copy construct.
bool erase (const word &keyword)
 Remove an entry specified by keyword and delete the pointer.
- Public Member Functions inherited from DictionaryBase< IDLList< T >, T >
 DictionaryBase ()
 Null constructor.
 DictionaryBase (const DictionaryBase &)
 Copy construct.
 DictionaryBase (Istream &, const INew &)
 Construct from Istream using given Istream constructor class.
 DictionaryBase (Istream &)
 Construct from Istream using default Istream constructor class.
bool found (const word &) const
 Search DictionaryBase for given keyword.
const TlookupPtr (const word &) const
 Find and return an entry if present, otherwise return NULL.
TlookupPtr (const word &)
 Find and return an entry if present, otherwise return NULL.
const Tlookup (const word &) const
 Find and return entry.
Tlookup (const word &)
 Find and return entry.
wordList toc () const
 Return the table of contents.
void insert (const word &, T *)
 Add at head of dictionary.
void append (const word &, T *)
 Add at tail of dictionary.
Tremove (const word &)
 Remove and return entry specified by keyword.
void clear ()
 Clear the dictionary.
void transfer (DictionaryBase< IDLList< T >, T > &)
 Transfer the contents of the argument into this DictionaryBase.
void operator= (const DictionaryBase &)
const Toperator[] (const word &key) const
 Find and return entry.
Toperator[] (const word &key)
 Find and return entry.
- Public Member Functions inherited from IDLList< T >
 IDLList ()
 Null construct.
 IDLList (const T &a)
 Construct given initial T.
template<class INew >
 IDLList (Istream &is, const INew &inewt)
 Construct from Istream using given Istream constructor class.
 IDLList (Istream &is)
 Construct from Istream.
template<class CloneArg >
 IDLList (const IDLList< T > &idll, const CloneArg &cloneArg)
 Copy constructor with additional argument for clone.
- Public Member Functions inherited from ILList< DLListBase, T >
 ILList ()
 Null construct.
 ILList (T *a)
 Construct given initial T.
 ILList (Istream &)
 Construct from Istream.
 ILList (const ILList< DLListBase, T > &)
 Construct as copy.
 ILList (const ILList< DLListBase, T > &lst, const CloneArg &cloneArg)
 Copy constructor with additional argument for clone.
 ILList (Istream &, const INew &)
 Construct from Istream using given Istream constructor class.
 ~ILList ()
bool eraseHead ()
 Remove the head element specified from the list and delete it.
bool erase (T *p)
 Remove the specified element from the list and delete it.
void transfer (ILList< DLListBase, T > &)
 Transfer the contents of the argument into this List.
void operator= (const ILList< DLListBase, T > &)
- Public Member Functions inherited from UILList< DLListBase, T >
 UILList ()
 Null construct.
 UILList (T *a)
 Construct given initial T.
 UILList (const UILList< DLListBase, T > &)
 Construct as copy.
Tfirst ()
 Return the first entry.
const Tfirst () const
 Return the first entry.
Tlast ()
 Return the last entry.
const Tlast () const
 Return the last entry.
TremoveHead ()
 Remove and return head.
Tremove (T *p)
 Remove and return element.
Tremove (iterator &it)
 Remove and return specified by iterator.
void operator= (const UILList< DLListBase, T > &)
bool operator== (const UILList< DLListBase, T > &) const
 Equality operation on ULists of the same type.
bool operator!= (const UILList< DLListBase, T > &) const
 The opposite of the equality operation. Takes linear time.
- Public Member Functions inherited from DLListBase
 DLListBase ()
 Null construct.
 DLListBase (link *)
 Construct given initial entry.
 ~DLListBase ()
label size () const
 Return number of elements in list.
bool empty () const
 Return true if the list is empty.
void insert (link *)
 Add at head of list.
void append (link *)
 Add at tail of list.
bool swapUp (link *)
 Swap this element with the one above unless it is at the top.
bool swapDown (link *)
 Swap this element with the one below unless it is at the bottom.
linkremove (link *)
 Remove and return element.
linkreplace (link *oldLink, link *newLink)
 Replace oldLink with newLink and return element.
linkreplace (iterator &oldIter, link *newLink)
 Replace oldIter with newLink and return element.
void transfer (DLListBase &)
 Transfer the contents of the argument into this List.
iterator begin ()
const iteratorend ()
const_iterator cbegin () const
const const_iteratorcend () const
const_iterator begin () const
const const_iteratorend () const

Constructor & Destructor Documentation

Null constructor.

Definition at line 33 of file Dictionary_.C.

Dictionary ( const Dictionary< T > &  dict)

Copy construct.

Definition at line 38 of file Dictionary_.C.


Member Function Documentation

bool erase ( const word keyword)

Remove an entry specified by keyword and delete the pointer.

Returns true if the keyword was found

Definition at line 47 of file Dictionary_.C.

References Foam::T().


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