|
|
|
HashTable Class Template ReferenceInheritance diagram for HashTable:![]() ![]() Detailed Descriptiontemplate<class T, class Key = word, class Hash = string::hash>
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| 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. | |
| T & | operator() (const Key &key) |
| Find and return an hashedEntry and. | |
| 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 |
| class | const_iterator |
| Istream & | operator>> (Istream &, HashTable< T, Key, Hash > &) |
| Ostream & | operator (Ostream &, const HashTable< T, Key, Hash > &) |
Classes | |
| class | const_iterator |
| struct | hashedEntry |
| class | iterator |
| typedef T value_type |
| typedef T& reference |
Type that can be used for storing into HashTable::value_type.
objects. This type is usually List::value_type&.
Definition at line 243 of file HashTable.H.
| typedef const T& const_reference |
Type that can be used for storing into constant.
HashTable::value_type objects. This type is usually const HashTable::value_type&.
Definition at line 250 of file HashTable.H.
| ~HashTable | ( | ) |
| label size | ( | ) | const [inline] |
Return number of elements in table.
Definition at line 64 of file HashTableI.H.
References HashTable::end(), and HashTable::find().
Here is the call graph for this function:

| bool found | ( | const Key & | key | ) | const |
Return true if hashedEntry is found in table.
Referenced by cellFeatures::faceMap().
Here is the caller graph for this function:

| iterator find | ( | const Key & | key | ) |
Find and return an iterator set at the hashedEntry.
If not found iterator = end()
Referenced by HashTable::operator()(), and HashTable::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 HashTable::operator[]().
Here is the caller graph for this function:

| bool insert | ( | const Key & | key, | |
| const T & | newElmt | |||
| ) |
Insert a new hashedEntry.
Referenced by HashTable::operator()().
Here is the caller graph for this function:

| 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.
Reimplemented in HashPtrTable, HashPtrTable< Foam::Fieldield< tensor > >, HashPtrTable< Foam::Fieldield< scalar > >, HashPtrTable< Foam::Fieldield< sphericalTensor > >, HashPtrTable< Foam::IOobject >, HashPtrTable< Foam::OFstream >, HashPtrTable< T, long, Foam::Hash< long > >, HashPtrTable< Foam::curve >, HashPtrTable< Foam::Fieldield< symmTensor > >, HashPtrTable< Foam::functionObject >, HashPtrTable< Foam::Fieldield< vector > >, HashPtrTable< ReactionThermo >, and HashPtrTable< Foam::sutherlandTransportutherlandTransport< specieThermo< janafThermo< perfectGas > > > >.
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 73 of file HashTableI.H.
References Foam::exit(), Foam::FatalError, FatalErrorIn, and HashTable::toc().
Here is the call graph for this function:

| const T & operator[] | ( | const Key & | key | ) | const [inline] |
Find and return an hashedEntry.
Reimplemented in NamedEnum, NamedEnum< Foam::directions::directionType, 3 >, NamedEnum< Foam::Time::stopAtControls, 4 >, NamedEnum< Foam::intersection::direction, 2 >, NamedEnum< Foam::topoSetSource::setAction, 7 >, NamedEnum< Foam::cellToFace::cellAction, 2 >, NamedEnum< Foam::slidingInterface::typeOfMatch, 2 >, NamedEnum< Foam::pointToCell::pointAction, 1 >, NamedEnum< Foam::faceToPoint::faceAction, 1 >, NamedEnum< Foam::pointToFace::pointAction, 2 >, NamedEnum< Foam::faceToCell::faceAction, 4 >, NamedEnum< Foam::Time::writeControls, 5 >, NamedEnum< Foam::intersection::algorithm, 3 >, and NamedEnum< Foam::cellToPoint::cellAction, 1 >.
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:

| T & operator() | ( | const Key & | key | ) | [inline] |
Find and return an hashedEntry and.
if it is not present create it null.
Definition at line 106 of file HashTableI.H.
References HashTable::find(), HashTable::insert(), and Foam::T().
Here is the call graph for this function:

iterator set to the begining of the HashTable
Definition at line 256 of file HashTableI.H.
References Foam::Info.
iterator set to beyond the end of the HashTable
Definition at line 282 of file HashTableI.H.
Referenced by HashTable::size().
Here is the caller graph for this function:

| HashTable< T, Key, Hash >::const_iterator begin | ( | ) | const [inline] |
const_iterator set to the begining of the HashTable
Definition at line 427 of file HashTableI.H.
References Foam::Info.
| const HashTable< T, Key, Hash >::const_iterator & end | ( | ) | const [inline] |
const_iterator set to beyond the end of the HashTable
Reimplemented in Time.
Definition at line 453 of file HashTableI.H.
friend class HashPtrTable [friend] |
friend class iterator [friend] |
Reimplemented in HashPtrTable, HashPtrTable< Foam::Fieldield< tensor > >, HashPtrTable< Foam::Fieldield< scalar > >, HashPtrTable< Foam::Fieldield< sphericalTensor > >, HashPtrTable< Foam::IOobject >, HashPtrTable< Foam::OFstream >, HashPtrTable< T, long, Foam::Hash< long > >, HashPtrTable< Foam::curve >, HashPtrTable< Foam::Fieldield< symmTensor > >, HashPtrTable< Foam::functionObject >, HashPtrTable< Foam::Fieldield< vector > >, HashPtrTable< ReactionThermo >, and HashPtrTable< Foam::sutherlandTransportutherlandTransport< specieThermo< janafThermo< perfectGas > > > >.
Definition at line 142 of file HashTable.H.
friend class const_iterator [friend] |
Reimplemented in HashPtrTable, HashPtrTable< Foam::Fieldield< tensor > >, HashPtrTable< Foam::Fieldield< scalar > >, HashPtrTable< Foam::Fieldield< sphericalTensor > >, HashPtrTable< Foam::IOobject >, HashPtrTable< Foam::OFstream >, HashPtrTable< T, long, Foam::Hash< long > >, HashPtrTable< Foam::curve >, HashPtrTable< Foam::Fieldield< symmTensor > >, HashPtrTable< Foam::functionObject >, HashPtrTable< Foam::Fieldield< vector > >, HashPtrTable< ReactionThermo >, and HashPtrTable< Foam::sutherlandTransportutherlandTransport< specieThermo< janafThermo< perfectGas > > > >.
Definition at line 145 of file HashTable.H.