|
|
|
StaticHashTable< T, Key, Hash > Class Template ReferenceSTL conforming hash table. More...
Collaboration diagram for StaticHashTable< T, Key, Hash >:
![]()
Detailed Descriptiontemplate<class T, class Key = word, class Hash = string::hash>
STL conforming hash table.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| typedef Iterator< T&, StaticHashTable<T, Key, Hash>& > iterator |
Definition at line 114 of file StaticHashTable.H.
| typedef Iterator< const T&, const StaticHashTable<T, Key, Hash>& > const_iterator |
Definition at line 126 of file StaticHashTable.H.
| typedef T value_type |
| typedef T& reference |
Type that can be used for storing into StaticHashTable::value_type.
objects. This type is usually List::value_type&.
Definition at line 269 of file StaticHashTable.H.
| typedef const T& const_reference |
Type that can be used for storing into constant.
StaticHashTable::value_type objects. This type is usually const StaticHashTable::value_type&.
Definition at line 276 of file StaticHashTable.H.
The type that can represent the size of a StaticHashTable.
Definition at line 279 of file StaticHashTable.H.
| StaticHashTable | ( | const label | size = 128 |
) | [inline] |
| StaticHashTable | ( | Istream & | is, | |
| const label | size = 128 | |||
| ) | [inline] |
Construct from Istream.
Definition at line 26 of file StaticHashTableIO.C.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.

| StaticHashTable | ( | const StaticHashTable< T, Key, Hash > & | ht | ) | [inline] |
| StaticHashTable | ( | const Xfer< StaticHashTable< T, Key, Hash > > & | ht | ) | [inline] |
| ~StaticHashTable | ( | ) | [inline] |
Definition at line 113 of file StaticHashTable.C.
| Foam::label size | ( | ) | const [inline] |
| bool empty | ( | ) | const [inline] |
| bool found | ( | const Key & | key | ) | const [inline] |
| Foam::StaticHashTable< T, Key, Hash >::iterator find | ( | const Key & | key | ) | [inline] |
Find and return an iterator set at the hashed entry.
If not found iterator = end()
Definition at line 151 of file StaticHashTable.C.
| Foam::StaticHashTable< T, Key, Hash >::const_iterator find | ( | const Key & | key | ) | const [inline] |
Find and return an const_iterator set at the hashed entry.
If not found iterator = end()
Definition at line 184 of file StaticHashTable.C.
| Foam::List< Key > toc | ( | ) | const [inline] |
| Foam::Ostream & printInfo | ( | Ostream & | os | ) | const [inline] |
| bool insert | ( | const Key & | key, | |
| const T & | newElmt | |||
| ) | [inline] |
| bool set | ( | const Key & | key, | |
| const T & | newElmt | |||
| ) | [inline] |
Assign a new hashed entry, overwriting existing entries.
Definition at line 63 of file StaticHashTableI.H.
| bool erase | ( | const iterator & | it | ) | [inline] |
Erase an hashed entry specified by given iterator.
Definition at line 290 of file StaticHashTable.C.
| bool erase | ( | const Key & | key | ) | [inline] |
Erase an hashed entry specified by given key if in table.
Definition at line 361 of file StaticHashTable.C.
| void resize | ( | const label | newSize | ) | [inline] |
Resize the hash table for efficiency.
Definition at line 399 of file StaticHashTable.C.
Referenced by StaticHashTable< T, Key, Hash >::transfer().

| Foam::label erase | ( | const StaticHashTable< T, Key, Hash > & | rhs | ) | [inline] |
Remove entries in the given hash table from this hash table.
Return the number of elements removed
Definition at line 378 of file StaticHashTable.C.
| void clear | ( | ) | [inline] |
Clear all entries from table.
Definition at line 442 of file StaticHashTable.C.
Referenced by StaticHashTable< T, Key, Hash >::transfer().

| void clearStorage | ( | ) | [inline] |
Clear the table entries and the table itself.
Equivalent to clear() followed by resize(1)
Definition at line 455 of file StaticHashTable.C.
| void transfer | ( | StaticHashTable< T, Key, Hash > & | ht | ) | [inline] |
Transfer the contents of the argument table into this table.
and annull the argument table.
Definition at line 465 of file StaticHashTable.C.
References StaticHashTable< T, Key, Hash >::clear(), and StaticHashTable< T, Key, Hash >::resize().

| Foam::Xfer< Foam::StaticHashTable< T, Key, Hash > > xfer | ( | ) | [inline] |
| T & operator[] | ( | const Key & | key | ) | [inline] |
Find and return an hashed entry.
Definition at line 83 of file StaticHashTableI.H.
References Foam::xferMove().

| const T & operator[] | ( | const Key & | key | ) | const [inline] |
| T & operator() | ( | const Key & | key | ) | [inline] |
Find and return an hashed entry, create it null if not present.
Definition at line 122 of file StaticHashTableI.H.
| void operator= | ( | const StaticHashTable< T, Key, Hash > & | rhs | ) | [inline] |
| bool operator== | ( | const StaticHashTable< T, Key, Hash > & | rhs | ) | const [inline] |
Equality. Two hash tables are equal if all contents of first are.
also in second and vice versa.
Definition at line 533 of file StaticHashTable.C.
References insert().

| bool operator!= | ( | const StaticHashTable< T, Key, Hash > & | rhs | ) | const [inline] |
| Foam::StaticHashTable< T, Key, Hash >::iterator begin | ( | ) | [inline] |
iterator set to the beginning of the StaticHashTable
Definition at line 328 of file StaticHashTableI.H.
| const Foam::StaticHashTable< T, Key, Hash >::iterator & end | ( | ) | [inline] |
iterator set to beyond the end of the StaticHashTable
Definition at line 352 of file StaticHashTableI.H.
| Foam::StaticHashTable< T, Key, Hash >::const_iterator cbegin | ( | ) | const [inline] |
const_iterator set to the beginning of the StaticHashTable
Definition at line 360 of file StaticHashTableI.H.
Referenced by StaticHashTable< T, Key, Hash >::end().

| const Foam::StaticHashTable< T, Key, Hash >::const_iterator & cend | ( | ) | const [inline] |
const_iterator set to beyond the end of the StaticHashTable
Definition at line 384 of file StaticHashTableI.H.
| Foam::StaticHashTable< T, Key, Hash >::const_iterator begin | ( | ) | const [inline] |
const_iterator set to the beginning of the StaticHashTable
Definition at line 392 of file StaticHashTableI.H.
| const Foam::StaticHashTable< T, Key, Hash >::const_iterator & end | ( | ) | const [inline] |
const_iterator set to beyond the end of the StaticHashTable
Definition at line 400 of file StaticHashTableI.H.
References StaticHashTable< T, Key, Hash >::cbegin().

friend class Iterator< T &,StaticHashTable< T, Key, Hash > & > [friend] |
Definition at line 135 of file StaticHashTable.H.
friend class Iterator< const T &,const StaticHashTable< T, Key, Hash > & > [friend] |
Definition at line 141 of file StaticHashTable.H.
| Istream& operator>> | ( | Istream & | , | |
| StaticHashTable< T, Key, Hash > & | ||||
| ) | [friend] |
| Ostream& operator | ( | Ostream & | , | |
| const StaticHashTable< T, Key, Hash > & | ||||
| ) | [friend] |