A HashTable of pointers to objects of type <T>. More...
Public Types | |
| typedef HashPtrTable< T, Key, Hash > | this_type |
| The template instance used for this table. More... | |
| typedef HashTable< T *, Key, Hash > | parent_type |
| The template instance used for the parent HashTable. More... | |
| using | iterator = typename parent_type::iterator |
| using | const_iterator = typename parent_type::const_iterator |
Public Member Functions | |
| HashPtrTable () | |
| Construct null with default table capacity. More... | |
| HashPtrTable (const label size) | |
| Construct given initial table capacity. More... | |
| template<class INew > | |
| HashPtrTable (Istream &is, const INew &inew) | |
| Construct from Istream using given Istream constructor class. More... | |
| HashPtrTable (Istream &is) | |
| Construct from Istream using default Istream constructor class. More... | |
| HashPtrTable (const dictionary &dict) | |
| Construct from dictionary with default dictionary constructor class. More... | |
| HashPtrTable (const this_type &ht) | |
| Copy construct. More... | |
| HashPtrTable (this_type &&ht) | |
| Move construct. More... | |
| ~HashPtrTable () | |
| Destructor. More... | |
| autoPtr< T > | remove (iterator &iter) |
| Remove entry specified by given iterator. More... | |
| autoPtr< T > | remove (const Key &key) |
| Remove entry specified by given key. More... | |
| bool | erase (iterator &iter) |
| bool | erase (const Key &key) |
| void | clear () |
| Clear all entries from table and delete any allocated pointers. More... | |
| void | write (Ostream &os) const |
| Write. More... | |
| void | operator= (const this_type &rhs) |
| Copy assignment. More... | |
| void | operator= (this_type &&rhs) |
| Move assignment. More... | |
| bool | insert (const Key &, T *)=delete |
| bool | insert (const Key &key, autoPtr< T > &aptr) |
| Insert a new entry, not overwriting existing entries. More... | |
| bool | insert (const Key &key, autoPtr< T > &&aptr) |
| Insert a new entry, not overwriting existing entries. More... | |
| bool | set (const Key &key, T *ptr) |
| Assign a new entry, overwriting existing entries. More... | |
| bool | set (const Key &key, autoPtr< T > &aptr) |
| Assign a new entry, overwriting existing entries. More... | |
| bool | set (const Key &key, autoPtr< T > &&aptr) |
| Assign a new entry, overwriting existing entries. More... | |
Friends | |
| Istream & | operator>> (Istream &is, HashPtrTable< T, Key, Hash > &tbl) |
A HashTable of pointers to objects of type <T>.
Definition at line 54 of file HashPtrTable.H.
| typedef HashPtrTable<T, Key, Hash> this_type |
The template instance used for this table.
Definition at line 83 of file HashPtrTable.H.
| typedef HashTable<T*, Key, Hash> parent_type |
The template instance used for the parent HashTable.
Definition at line 86 of file HashPtrTable.H.
| using iterator = typename parent_type::iterator |
Definition at line 88 of file HashPtrTable.H.
| using const_iterator = typename parent_type::const_iterator |
Definition at line 89 of file HashPtrTable.H.
|
inline |
Construct null with default table capacity.
Definition at line 33 of file HashPtrTableI.H.
|
inlineexplicit |
Construct given initial table capacity.
Definition at line 40 of file HashPtrTableI.H.
| HashPtrTable | ( | Istream & | is, |
| const INew & | inew | ||
| ) |
Construct from Istream using given Istream constructor class.
Definition at line 172 of file HashPtrTableIO.C.
| HashPtrTable | ( | Istream & | is | ) |
Construct from Istream using default Istream constructor class.
Definition at line 179 of file HashPtrTableIO.C.
|
explicit |
Construct from dictionary with default dictionary constructor class.
Definition at line 186 of file HashPtrTableIO.C.
| HashPtrTable | ( | const this_type & | ht | ) |
Copy construct.
| HashPtrTable | ( | this_type && | ht | ) |
Move construct.
| ~HashPtrTable | ( | ) |
Destructor.
Definition at line 70 of file HashPtrTable.C.
| Foam::autoPtr< T > remove | ( | iterator & | iter | ) |
Remove entry specified by given iterator.
Includes a safeguard against the end-iterator.
Definition at line 79 of file HashPtrTable.C.
| Foam::autoPtr< T > remove | ( | const Key & | key | ) |
Remove entry specified by given key.
Definition at line 93 of file HashPtrTable.C.
Erase entry specified by given iterator and delete the allocated pointer.
Includes a safeguard against the end-iterator.
Definition at line 101 of file HashPtrTable.C.
| bool erase | ( | const Key & | key | ) |
Erase entry specified by given key and delete the allocated pointer.
Definition at line 123 of file HashPtrTable.C.
| void clear | ( | ) |
Clear all entries from table and delete any allocated pointers.
Definition at line 131 of file HashPtrTable.C.
| void write | ( | Ostream & | os | ) | const |
Write.
Definition at line 155 of file HashPtrTableIO.C.
| void operator= | ( | const this_type & | rhs | ) |
Copy assignment.
Referenced by PtrMap< Foam::coordSystem::cylindrical >::operator=().
| void operator= | ( | this_type && | rhs | ) |
Move assignment.
Insert a new entry, not overwriting existing entries.
Definition at line 50 of file HashPtrTableI.H.
Insert a new entry, not overwriting existing entries.
Definition at line 67 of file HashPtrTableI.H.
Assign a new entry, overwriting existing entries.
Definition at line 84 of file HashPtrTableI.H.
Referenced by phaseSystem::addField(), exprResultGlobals::addValue(), phaseSystem::fillFields(), OneResistanceHeatTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), TwoResistanceHeatTransferPhaseSystem< BasePhaseSystem >::heatTransfer(), PhaseTransferPhaseSystem< BasePhaseSystem >::massTransfer(), MomentumTransferPhaseSystem< BasePhaseSystem >::momentumTransfer(), and MomentumTransferPhaseSystem< BasePhaseSystem >::momentumTransferf().
Assign a new entry, overwriting existing entries.
Definition at line 95 of file HashPtrTableI.H.
Assign a new entry, overwriting existing entries.
Definition at line 106 of file HashPtrTableI.H.
|
friend |