Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
DictionaryBase Class Reference

Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it holds. More...

Inheritance diagram for DictionaryBase:
Inheritance graph
[legend]
Collaboration diagram for DictionaryBase:
Collaboration graph
[legend]

Public Member Functions

 DictionaryBase (const label size=128)
 
 DictionaryBase (const DictionaryBase &dict)
 
template<class INew >
 DictionaryBase (Istream &is, const INew &inew)
 
 DictionaryBase (Istream &is)
 
bool found (const word &keyword) const
 
const Tcfind (const word &keyword) const
 
Tfind (const word &keyword)
 
const Tlookup (const word &keyword) const
 
Tlookup (const word &keyword)
 
wordList toc () const
 
wordList sortedToc () const
 
template<class Compare >
wordList sortedToc (const Compare &comp) const
 
void insert (const word &keyword, T *)
 
void append (const word &keyword, T *)
 
Tremove (const word &keyword)
 
void clear ()
 
void transfer (DictionaryBase< IDLListType, T > &dict)
 
void operator= (const DictionaryBase &)
 
const Toperator[] (const word &key) const
 
Toperator[] (const word &key)
 
const TlookupPtr (const word &keyword) const
 
TlookupPtr (const word &keyword)
 
template<class Compare >
Foam::wordList sortedToc (const Compare &comp) const
 

Protected Member Functions

void addEntries ()
 

Protected Attributes

HashTable< T * > hashedTs_
 

Friends

Ostreamoperator (Ostream &, const DictionaryBase< IDLListType, T > &)
 

Detailed Description

Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it holds.

The double templating allows for the instantiation of forms with or without storage management.

Note
The IDLListType parameter should itself be a template but this confused gcc 2.95.2 so it has to be instantiated for T when an instantiation of DictionaryBase is requested
See also
Dictionary and UDictionary
Source files

Definition at line 60 of file DictionaryBase.H.

Constructor & Destructor Documentation

◆ DictionaryBase() [1/4]

DictionaryBase ( const label  size = 128)
explicit

◆ DictionaryBase() [2/4]

DictionaryBase ( const DictionaryBase dict)

Definition at line 47 of file DictionaryBase.C.

◆ DictionaryBase() [3/4]

DictionaryBase ( Istream is,
const INew inew 
)

Definition at line 60 of file DictionaryBase.C.

◆ DictionaryBase() [4/4]

Definition at line 72 of file DictionaryBase.C.

Member Function Documentation

◆ addEntries()

void addEntries ( )
protected

Definition at line 27 of file DictionaryBase.C.

◆ found()

bool found ( const word keyword) const

Definition at line 83 of file DictionaryBase.C.

◆ cfind()

const T * cfind ( const word keyword) const

Definition at line 91 of file DictionaryBase.C.

Referenced by DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry >::lookupPtr().

Here is the caller graph for this function:

◆ find()

T * find ( const word keyword)

◆ lookup() [1/2]

const T * lookup ( const word keyword) const

Definition at line 121 of file DictionaryBase.C.

Referenced by DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry >::operator[]().

Here is the caller graph for this function:

◆ lookup() [2/2]

T * lookup ( const word keyword)

Definition at line 137 of file DictionaryBase.C.

◆ toc()

Foam::wordList toc ( ) const

Definition at line 153 of file DictionaryBase.C.

◆ sortedToc() [1/3]

Foam::wordList sortedToc ( ) const

Definition at line 163 of file DictionaryBase.C.

◆ sortedToc() [2/3]

wordList sortedToc ( const Compare &  comp) const

◆ insert()

void insert ( const word keyword,
T tPtr 
)

Definition at line 181 of file DictionaryBase.C.

◆ append()

void append ( const word keyword,
T tPtr 
)

Definition at line 190 of file DictionaryBase.C.

Referenced by Foam::appendNamedEntry().

Here is the caller graph for this function:

◆ remove()

T * remove ( const word keyword)

Definition at line 199 of file DictionaryBase.C.

◆ clear()

void clear ( )

Definition at line 215 of file DictionaryBase.C.

◆ transfer()

void transfer ( DictionaryBase< IDLListType, T > &  dict)

Definition at line 224 of file DictionaryBase.C.

◆ operator=()

void operator= ( const DictionaryBase )

Definition at line 242 of file DictionaryBase.C.

◆ operator[]() [1/2]

const T* operator[] ( const word key) const
inline

Definition at line 163 of file DictionaryBase.H.

◆ operator[]() [2/2]

T* operator[] ( const word key)
inline

Definition at line 169 of file DictionaryBase.H.

◆ lookupPtr() [1/2]

const T* lookupPtr ( const word keyword) const
inline

Definition at line 190 of file DictionaryBase.H.

◆ lookupPtr() [2/2]

T* lookupPtr ( const word keyword)
inline

Definition at line 199 of file DictionaryBase.H.

◆ sortedToc() [3/3]

Foam::wordList sortedToc ( const Compare &  comp) const

Definition at line 172 of file DictionaryBase.C.

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const DictionaryBase< IDLListType, T > &   
)
friend

Member Data Documentation

◆ hashedTs_

HashTable<T*> hashedTs_
protected

Definition at line 80 of file DictionaryBase.H.


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