Public Types | Public Member Functions | Private Member Functions | Friends
HashPtrTable Class Reference

A HashTable specialization for hashing pointers. More...

Inheritance diagram for HashPtrTable:
Inheritance graph
[legend]

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. More...
 
template<class INew >
 HashPtrTable (Istream &, const INew &)
 Construct from Istream using given Istream constructor class. More...
 
 HashPtrTable (Istream &)
 Construct from Istream using default Istream constructor class. More...
 
 HashPtrTable (const dictionary &)
 Construct from dictionary using default dictionary constructor. More...
 
 HashPtrTable (const HashPtrTable< T, Key, Hash > &)
 Construct as copy. More...
 
 ~HashPtrTable ()
 Destructor. More...
 
Tremove (iterator &)
 Remove and return the pointer specified by given iterator. More...
 
bool erase (iterator &)
 Erase an hashedEntry specified by given iterator. More...
 
void clear ()
 Clear all entries from table. More...
 
void write (Ostream &os) const
 Write. More...
 
void operator= (const HashPtrTable< T, Key, Hash > &)
 

Private Member Functions

template<class INew >
void read (Istream &, const INew &inewt)
 Read from Istream using given Istream constructor class. More...
 
template<class INew >
void read (const dictionary &dict, const INew &inewt)
 Read from dictionary using given dictionary constructor class. More...
 

Friends

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

Detailed Description

A HashTable specialization for hashing pointers.

Source files

Definition at line 50 of file HashPtrTable.H.

Member Typedef Documentation

◆ iterator

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

Definition at line 82 of file HashPtrTable.H.

◆ const_iterator

Definition at line 83 of file HashPtrTable.H.

Constructor & Destructor Documentation

◆ HashPtrTable() [1/5]

HashPtrTable ( const label  size = 128)

Construct given initial table size.

◆ HashPtrTable() [2/5]

HashPtrTable ( Istream is,
const INew inewt 
)

Construct from Istream using given Istream constructor class.

Definition at line 179 of file HashPtrTableIO.C.

◆ HashPtrTable() [3/5]

Construct from Istream using default Istream constructor class.

◆ HashPtrTable() [4/5]

HashPtrTable ( const dictionary )

Construct from dictionary using default dictionary constructor.

class

◆ HashPtrTable() [5/5]

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

Construct as copy.

◆ ~HashPtrTable()

Destructor.

Definition at line 58 of file HashPtrTable.C.

Member Function Documentation

◆ read() [1/2]

void read ( Istream is,
const INew inewt 
)
private

Read from Istream using given Istream constructor class.

Definition at line 36 of file HashPtrTableIO.C.

◆ read() [2/2]

void read ( const dictionary dict,
const INew inewt 
)
private

Read from dictionary using given dictionary constructor class.

Definition at line 141 of file HashPtrTableIO.C.

◆ remove()

T * remove ( iterator it)

Remove and return the pointer specified by given iterator.

Definition at line 67 of file HashPtrTable.C.

◆ erase()

bool erase ( iterator it)

Erase an hashedEntry specified by given iterator.

Definition at line 76 of file HashPtrTable.C.

Referenced by Foam::readFields(), and redistributeAndWrite().

Here is the caller graph for this function:

◆ clear()

void clear ( )

Clear all entries from table.

Definition at line 97 of file HashPtrTable.C.

◆ write()

void write ( Ostream os) const

Write.

Definition at line 158 of file HashPtrTableIO.C.

◆ operator=()

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

Definition at line 117 of file HashPtrTable.C.

Friends And Related Function Documentation

◆ operator>>

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

◆ operator

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

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