FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

HashPtrTable< T, Key, Hash > Class Template Reference

A HashTable specialization for hashing pointers. More...

#include <OpenFOAM/HashPtrTable.H>


Detailed Description

template<class T, class Key = word, class Hash = string::hash>
class Foam::HashPtrTable< T, Key, Hash >

A HashTable specialization for hashing pointers.

Source files

Definition at line 65 of file HashPtrTable.H.

Inheritance diagram for HashPtrTable< T, Key, Hash >:
Collaboration diagram for HashPtrTable< T, Key, Hash >:

List of all members.

Public Types

typedef HashTable< T *, Key,
Hash >::iterator  
iterator
typedef HashTable< T *, Key,
Hash >::const_iterator  
const_iterator

Public Member Functions

 HashPtrTable (const label size=128)
 Construct given initial table size.
template<class INew >
 HashPtrTable (Istream &, const INew &)
 Construct from Istream using given Istream constructor class.
 HashPtrTable (Istream &)
 Construct from Istream using default Istream constructor class.
 HashPtrTable (const HashPtrTable< T, Key, Hash > &)
 Construct as copy.
 ~HashPtrTable ()
T *  remove (iterator &)
 Remove and return the pointer specified by given iterator.
bool  erase (iterator &)
 Erase an hashedEntry specified by given iterator.
void  clear ()
 Clear all entries from table.
void  operator= (const HashPtrTable< T, Key, Hash > &)

Friends

Istream &  operator>> (Istream &, HashPtrTable< T, Key, Hash > &)
Ostream &  operator (Ostream &, const HashPtrTable< T, Key, Hash > &)

Member Typedef Documentation

typedef HashTable<T*, Key, Hash>::iterator iterator

Reimplemented from HashTable< T *, Key, Hash >.

Definition at line 78 of file HashPtrTable.H.

Reimplemented from HashTable< T *, Key, Hash >.

Definition at line 79 of file HashPtrTable.H.


Constructor & Destructor Documentation

HashPtrTable ( const label   size = 128  )

Construct given initial table size.

Definition at line 33 of file HashPtrTable.C.

HashPtrTable ( Istream &   is,
const INew &   inewt  
)

Construct from Istream using given Istream constructor class.

Definition at line 144 of file HashPtrTableIO.C.

HashPtrTable ( Istream &   is  )

Construct from Istream using default Istream constructor class.

Definition at line 151 of file HashPtrTableIO.C.

HashPtrTable ( const HashPtrTable< T, Key, Hash > &   ht  )

Construct as copy.

Definition at line 42 of file HashPtrTable.C.

References HashTable< T *, Key, Hash >::begin(), HashTable< T *, Key, Hash >::end(), insert(), and Foam::T().

~HashPtrTable (  )

Definition at line 58 of file HashPtrTable.C.

References clear().


Member Function Documentation

T * remove ( iterator &   it  )

Remove and return the pointer specified by given iterator.

Definition at line 67 of file HashPtrTable.C.

References HashTable< T, Key, Hash >::erase(), and Foam::T().

bool erase ( iterator &   it  )

Erase an hashedEntry specified by given iterator.

Definition at line 76 of file HashPtrTable.C.

References Foam::T().

void clear (  )

Clear all entries from table.

Reimplemented from HashTable< T *, Key, Hash >.

Definition at line 97 of file HashPtrTable.C.

References HashTable< T, Key, Hash >::clear().

Referenced by Foam::operator>>().

void operator= ( const HashPtrTable< T, Key, Hash > &   rhs  )

Definition at line 117 of file HashPtrTable.C.

References Foam::abort(), clear(), Foam::FatalError, FatalErrorIn, insert(), and Foam::T().


Friends And Related Function Documentation

Istream& operator>> ( Istream &   ,
HashPtrTable< T, Key, Hash > &    
) [friend]
Ostream& operator ( Ostream &   ,
const HashPtrTable< T, Key, Hash > &    
) [friend]

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