#include <utilmm/hash/bits/table.hh>
Public Types | |
| typedef Value | value_type |
| Value type for cells. | |
| typedef Key | key_type |
| Key type. | |
| typedef size_t | size_type |
| Size type. | |
| typedef arg_traits < value_type >::type | value_arg |
| typedef arg_traits < key_type >::type | key_arg |
| typedef iter< Key, Value, Extract, Hash, Equal > | iterator |
| iterator type | |
| typedef const_iter < Key, Value, Extract, Hash, Equal > | const_iterator |
| const iterator type | |
Public Member Functions | |
| table () | |
| Default constructor. | |
| table (table const &) | |
| Copy constructor. | |
| ~table () | |
| Copy destructor. | |
| void | swap (table &other) |
| swapping values function | |
| table & | operator= (table const &other) |
| Copy operator. | |
| size_type | size () const |
| element count | |
| size_type | max_size () const |
| max elmement number | |
| bool | empty () const |
| Emptyness test. | |
| iterator | begin () |
| Beginning of table. | |
| iterator | end () |
| End of table. | |
| const_iterator | begin () const |
| Beginning of table. | |
| const_iterator | end () const |
| End of table. | |
| std::pair< iterator, iterator > | equal_range (key_arg key) |
| equality range | |
| std::pair < const_iterator, const_iterator > | equal_range (key_arg key) const |
| equality range. | |
| void | erase (iterator const &first, iterator const &last) |
| Remove elements. | |
| std::pair< iterator, bool > | insert_unique (value_arg v) |
| Unique key insertion. | |
| iterator | insert_multiple (value_arg v) |
| multiple insertion | |
| void | clear () |
| remove all elements | |
Friends | |
| class | iter |
| class | const_iter |
This class is used as internal basis for all hashing based containers presented here. It is mainly insdpired on SGI STL implementation
| Key | the entry type for this table | |
| Value | The value type for cells in table | |
| Extract | Key extractor from Value | |
| Hash | hashing functor for Key | |
| Equal | equality functor for Key |
| typedef Value utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::value_type |
Value type for cells.
| typedef Key utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::key_type |
Key type.
| typedef size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::size_type |
Size type.
| typedef arg_traits<value_type>::type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::value_arg |
| typedef arg_traits<key_type>::type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::key_arg |
| typedef iter<Key, Value, Extract, Hash, Equal> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::iterator |
iterator type
The type used to iterate through and manipulate this class
| typedef const_iter<Key, Value, Extract, Hash, Equal> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::const_iterator |
const iterator type
The type used to iterate through this class without any modification
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::table | ( | ) |
Default constructor.
Create an empty table
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::table | ( | table< Key, Value, Extract, Hash, Equal > const & | ) |
Copy constructor.
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::~table | ( | ) |
Copy destructor.
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::swap | ( | table< Key, Value, Extract, Hash, Equal > & | other | ) |
swapping values function
This function exchange the value of current instance with the value of another instance.
| other | The other instance |
| table& utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::operator= | ( | table< Key, Value, Extract, Hash, Equal > const & | other | ) |
Copy operator.
| size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::size | ( | ) | const |
element count
| size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::max_size | ( | ) | const |
max elmement number
| bool utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::empty | ( | ) | const |
Emptyness test.
| true | if this instance has no element | |
| false | else |
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) |
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::end | ( | ) |
| const_iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) | const |
Beginning of table.
| const_iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::end | ( | ) | const |
| std::pair<iterator, iterator> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::equal_range | ( | key_arg | key | ) |
equality range
| key | a Key |
| std::pair< const_iterator, const_iterator > utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::equal_range | ( | key_arg | key | ) | const |
equality range.
equality range
| key | a Key |
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::erase | ( | iterator const & | first, | |
| iterator const & | last | |||
| ) |
Remove elements.
| first | an iterator | |
| last | an iterator |
| std::pair<iterator, bool> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert_unique | ( | value_arg | v | ) |
Unique key insertion.
| v | The value to insert |
first is an iterator pointing to the element whose key is equal to the key of v and second is true if we have inserted v | iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert_multiple | ( | value_arg | v | ) |
multiple insertion
param v The value to insert
Thsi function insert v in table
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::clear | ( | ) |
friend class iter [friend] |
friend class const_iter [friend] |
1.5.3