|
|
|
StaticHashTable Class Template ReferenceCollaboration diagram for StaticHashTable:![]() Detailed Descriptiontemplate<class T, class Key = word, class Hash = string::hash>
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| typedef Iterator< T &, StaticHashTable< T, Key, Hash > & > | iterator |
| typedef Iterator< const T &, const StaticHashTable< T, Key, Hash > & > | const_iterator |
| typedef T | value_type |
| Type of values the StaticHashTable contains. | |
| typedef T & | reference |
| Type that can be used for storing into StaticHashTable::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 StaticHashTable. | |
Public Member Functions | |
| StaticHashTable (const label size=100) | |
| Construct given initial table size. | |
| StaticHashTable (Istream &, const label size=100) | |
| Construct from Istream. | |
| StaticHashTable (const StaticHashTable< T, Key, Hash > &) | |
| Construct as copy. | |
| ~StaticHashTable () | |
| 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 (StaticHashTable< 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 StaticHashTable< T, Key, Hash > &) |
| Assignment. | |
| iterator | begin () |
| iterator set to the begining of the StaticHashTable | |
| const iterator & | end () |
| iterator set to beyond the end of the StaticHashTable | |
| const_iterator | begin () const |
| const_iterator set to the begining of the StaticHashTable | |
| const const_iterator & | end () const |
| const_iterator set to beyond the end of the StaticHashTable | |
Friends | |
| class | Iterator< T &, StaticHashTable< T, Key, Hash > & > |
| class | Iterator< const T &, const StaticHashTable< T, Key, Hash > & > |
| Istream & | operator>> (Istream &, StaticHashTable< T, Key, Hash > &) |
| Ostream & | operator (Ostream &, const StaticHashTable< T, Key, Hash > &) |
Classes | |
| class | Iterator |
| typedef Iterator< T&, StaticHashTable<T, Key, Hash>& > iterator |
Definition at line 113 of file StaticHashTable.H.
| typedef Iterator< const T&, const StaticHashTable<T, Key, Hash>& > const_iterator |
Definition at line 125 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 231 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 238 of file StaticHashTable.H.
The type that can represent the size of a StaticHashTable.
Definition at line 241 of file StaticHashTable.H.
| StaticHashTable | ( | const label | size = 100 |
) |
Construct given initial table size.
| StaticHashTable | ( | Istream & | , | |
| const label | size = 100 | |||
| ) |
Construct from Istream.
| StaticHashTable | ( | const StaticHashTable< T, Key, Hash > & | ) |
Construct as copy.
| ~StaticHashTable | ( | ) |
| label size | ( | ) | const [inline] |
Return number of elements in table.
Definition at line 52 of file StaticHashTableI.H.
References StaticHashTable::end(), and StaticHashTable::find().
Here is the call graph for this function:

| 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.
If not found iterator = end()
Referenced by StaticHashTable::size().
Here is the caller graph for this function:

| const_iterator find | ( | const Key & | key | ) | const |
Find and return an const_iterator set at the hashedEntry.
If not found iterator = end()
| List<Key> toc | ( | ) | const |
Return the table of contents.
Referenced by StaticHashTable::operator[]().
Here is the caller graph for this function:

| 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 | ( | StaticHashTable< T, Key, Hash > & | ) |
Transfer the contents of the argument table into this table.
and annull the argument table.
| T & operator[] | ( | const Key & | key | ) | [inline] |
Find and return an hashedEntry.
Definition at line 61 of file StaticHashTableI.H.
References Foam::exit(), Foam::FatalError, FatalErrorIn, and StaticHashTable::toc().
Here is the call graph for this function:

| const T & operator[] | ( | const Key & | key | ) | const [inline] |
Find and return an hashedEntry.
Definition at line 77 of file StaticHashTableI.H.
References Foam::exit(), Foam::FatalError, FatalErrorIn, and StaticHashTable::toc().
Here is the call graph for this function:

| void operator= | ( | const StaticHashTable< T, Key, Hash > & | ) |
Assignment.
| StaticHashTable< T, Key, Hash >::iterator begin | ( | ) | [inline] |
iterator set to the begining of the StaticHashTable
Definition at line 264 of file StaticHashTableI.H.
| const StaticHashTable< T, Key, Hash >::iterator & end | ( | ) | [inline] |
iterator set to beyond the end of the StaticHashTable
Definition at line 288 of file StaticHashTableI.H.
References forAll.
Referenced by StaticHashTable::size().
Here is the caller graph for this function:

| StaticHashTable< T, Key, Hash >::const_iterator begin | ( | ) | const [inline] |
const_iterator set to the begining of the StaticHashTable
Definition at line 296 of file StaticHashTableI.H.
| const StaticHashTable< T, Key, Hash >::const_iterator & end | ( | ) | const [inline] |
const_iterator set to beyond the end of the StaticHashTable
Definition at line 320 of file StaticHashTableI.H.
friend class Iterator< T &,StaticHashTable< T, Key, Hash > & > [friend] |
Definition at line 134 of file StaticHashTable.H.
friend class Iterator< const T &,const StaticHashTable< T, Key, Hash > & > [friend] |
Definition at line 140 of file StaticHashTable.H.
| Istream& operator>> | ( | Istream & | , | |
| StaticHashTable< T, Key, Hash > & | ||||
| ) | [friend] |
| Ostream& operator | ( | Ostream & | , | |
| const StaticHashTable< T, Key, Hash > & | ||||
| ) | [friend] |