OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

HashPtrTable< T, Key, Hash > Class Template Reference

A HashTable specialization for hashing pointers. More...

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 > &)

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 60 of file HashPtrTable.H.


Member Typedef Documentation

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

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

Definition at line 73 of file HashPtrTable.H.

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

Definition at line 74 of file HashPtrTable.H.


Constructor & Destructor Documentation

HashPtrTable ( const label  size = 128  )  [inline]

Construct given initial table size.

Definition at line 25 of file HashPtrTable.C.

HashPtrTable ( Istream &  is,
const INew &  inewt 
) [inline]

Construct from Istream using given Istream constructor class.

Definition at line 136 of file HashPtrTableIO.C.

HashPtrTable ( Istream &  is  )  [inline]

Construct from Istream using default Istream constructor class.

Definition at line 143 of file HashPtrTableIO.C.

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

Construct as copy.

Definition at line 34 of file HashPtrTable.C.

~HashPtrTable (  )  [inline]

Definition at line 50 of file HashPtrTable.C.

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

Here is the call graph for this function:


Member Function Documentation

T * remove ( iterator &  it  )  [inline]

Remove and return the pointer specified by given iterator.

Definition at line 59 of file HashPtrTable.C.

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

Here is the call graph for this function:

bool erase ( iterator &  it  )  [inline]

Erase an hashedEntry specified by given iterator.

Definition at line 68 of file HashPtrTable.C.

References Foam::T().

Here is the call graph for this function:

void clear (  )  [inline]

Clear all entries from table.

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

Definition at line 89 of file HashPtrTable.C.

Referenced by HashPtrTable< T, Key, Hash >::remove().

Here is the caller graph for this function:

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

Definition at line 109 of file HashPtrTable.C.


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