![]() |
|
Public Types | |
typedef Iterator< T &, HashTable< T, Key, Hash > &, hashedEntry * > | iterator |
typedef Iterator< const T &, const HashTable< T, Key, Hash > &, const hashedEntry * > | const_iterator |
typedef T | value_type |
Type of values the HashTable contains. | |
typedef T & | reference |
Type that can be used for storing into HashTable::value_type. | |
typedef const T & | const_reference |
Type that can be used for storing into constant. | |
typedef label | size_type |
The type that can represent the size of a HashTable. | |
Public Member Functions | |
HashTable (const label size=100) | |
Construct given initial table size. | |
HashTable (Istream &, const label size=100) | |
Construct from Istream. | |
HashTable (const HashTable< T, Key, Hash > &) | |
Construct as copy. | |
~HashTable () | |
label | size () const |
Return number of elements in table. | |
bool | found (const Key &key) const |
Return true if hashedEntry is found in table. | |
iterator | find (const Key &key) |
Find and return an iterator set at the hashedEntry. | |
const_iterator | find (const Key &key) const |
Find and return an const_iterator set at the hashedEntry. | |
List< Key > | toc () const |
Return the table of contents. | |
bool | insert (const Key &key, const T &newElmt) |
Insert a new hashedEntry. | |
bool | erase (const iterator &it) |
Erase an hashedEntry specified by given iterator. | |
bool | erase (const Key &key) |
Erase an hashedEntry specified by given key if in table. | |
void | resize (const label newSize) |
Resize the hash table for efficiency. | |
void | clear () |
Clear all entries from table. | |
void | transfer (HashTable< T, Key, Hash > &) |
Transfer the contents of the argument table into this table. | |
T & | operator[] (const Key &key) |
Find and return an hashedEntry. | |
const T & | operator[] (const Key &key) const |
Find and return an hashedEntry. | |
void | operator= (const HashTable< T, Key, Hash > &) |
Assignment. | |
iterator | begin () |
iterator set to the begining of the HashTable | |
const iterator & | end () |
iterator set to beyond the end of the HashTable | |
const_iterator | begin () const |
const_iterator set to the begining of the HashTable | |
const const_iterator & | end () const |
const_iterator set to beyond the end of the HashTable | |
Friends | |
class | HashPtrTable |
Declare friendship with the HashPtrTable class. | |
class | Iterator< T&, HashTable<T, Key, Hash>&, hashedEntry* > |
class | Iterator< const T&, const HashTable<T, Key, Hash>&, const hashedEntry* > |
Istream & | operator>> (Istream &, HashTable< T, Key, Hash > &) |
Ostream & | operator (Ostream &, const HashTable< T, Key, Hash > &) |
|
Reimplemented in HashPtrTable, HashPtrTable< IOobject >, HashPtrTable< tensorField >, HashPtrTable< curve >, HashPtrTable< sphericalTensorField >, HashPtrTable< scalarField >, HashPtrTable< reactionThermo >, HashPtrTable< T, label, Hash< label > >, HashPtrTable< ReactionThermo >, and HashPtrTable< vectorField >. Definition at line 157 of file HashTable.H. Referenced by HashTable::end(), HashTable::Iterator::operator!=(), and HashTable::Iterator::operator==(). |
|
Type that can be used for storing into constant. HashTable::value_type objects. This type is usually const HashTable::value_type&. Definition at line 272 of file HashTable.H. |
|
Reimplemented in HashPtrTable, HashPtrTable< IOobject >, HashPtrTable< tensorField >, HashPtrTable< curve >, HashPtrTable< sphericalTensorField >, HashPtrTable< scalarField >, HashPtrTable< reactionThermo >, HashPtrTable< T, label, Hash< label > >, HashPtrTable< ReactionThermo >, and HashPtrTable< vectorField >. Definition at line 150 of file HashTable.H. Referenced by HashTable::Iterator::key(), HashTable::Iterator::operator==(), and HashTable::size(). |
|
Type that can be used for storing into HashTable::value_type. objects. This type is usually List::value_type&. Definition at line 265 of file HashTable.H. |
|
The type that can represent the size of a HashTable.
Definition at line 275 of file HashTable.H. |
|
Type of values the HashTable contains.
Definition at line 259 of file HashTable.H. |
|
Construct given initial table size.
|
|
Construct from Istream.
|
|
Construct as copy.
|
|
|
|
const_iterator set to the begining of the HashTable
Definition at line 309 of file HashTableI.H. References Foam::Info. |
|
iterator set to the begining of the HashTable
Definition at line 275 of file HashTableI.H. References Foam::Info. |
|
Clear all entries from table.
Reimplemented in HashPtrTable, HashPtrTable< IOobject >, HashPtrTable< tensorField >, HashPtrTable< curve >, HashPtrTable< sphericalTensorField >, HashPtrTable< scalarField >, HashPtrTable< reactionThermo >, HashPtrTable< T, label, Hash< label > >, HashPtrTable< ReactionThermo >, and HashPtrTable< vectorField >. |
|
const_iterator set to beyond the end of the HashTable
Reimplemented in Time. Definition at line 335 of file HashTableI.H. |
|
iterator set to beyond the end of the HashTable
Definition at line 301 of file HashTableI.H. References HashTable::const_iterator, and Foam::label. Referenced by HashTable::size(). |
|
Erase an hashedEntry specified by given key if in table.
|
|
Erase an hashedEntry specified by given iterator.
|
|
Find and return an const_iterator set at the hashedEntry. If not found iterator = end() |
|
Find and return an iterator set at the hashedEntry. If not found iterator = end() Referenced by HashTable::size(). |
|
Return true if hashedEntry is found in table.
|
|
Insert a new hashedEntry.
|
|
Assignment.
|
|
Find and return an hashedEntry.
Reimplemented in NamedEnum, NamedEnum< typeOfMatch, 2 >, NamedEnum< algorithm, 3 >, NamedEnum< pointAction, 2 >, NamedEnum< setAction, 7 >, NamedEnum< cellAction, 1 >, NamedEnum< faceAction, 1 >, NamedEnum< pointAction, 1 >, NamedEnum< cellAction, 2 >, NamedEnum< stopAtControls, 4 >, NamedEnum< direction, 2 >, NamedEnum< writeControls, 5 >, NamedEnum< faceAction, 4 >, and NamedEnum< directionType, 3 >. Definition at line 89 of file HashTableI.H. References Foam::exit(), Foam::FatalError, FatalErrorIn, and HashTable::toc(). |
Here is the call graph for this function:
|
Find and return an hashedEntry.
Definition at line 73 of file HashTableI.H. References Foam::exit(), Foam::FatalError, FatalErrorIn, and HashTable::toc(). |
Here is the call graph for this function:
|
Resize the hash table for efficiency.
|
|
Return number of elements in table.
Definition at line 64 of file HashTableI.H. References HashTable::end(), HashTable::find(), HashTable::iterator, and Foam::T(). Referenced by polyTopoChange::faceBalance(), polyTopoChange::pointBalance(), mapPolyMesh::pointZoneMap(), and GeoMesh< fvMesh >::size(). |
Here is the call graph for this function:
|
Return the table of contents.
Referenced by HashTable::operator[](). |
|
Transfer the contents of the argument table into this table. and annull the argument table. |
|
Declare friendship with the HashPtrTable class.
Definition at line 137 of file HashTable.H. |
|
Definition at line 174 of file HashTable.H. |
|
Definition at line 167 of file HashTable.H. |
|
|
|
|