|
Util--
1.1
|
Hashing based table. More...
#include <utilmm/hash/bits/table.hh>

Public Types | |
| typedef Value | value_type |
| Value type for cells. More... | |
| typedef Key | key_type |
| Key type. More... | |
| typedef size_t | size_type |
| Size type. More... | |
| 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 More... | |
| typedef const_iter< Key, Value, Extract, Hash, Equal > | const_iterator |
| const iterator type More... | |
Public Member Functions | |
| table () | |
| Default constructor. More... | |
| table (table const &) | |
| Copy constructor. More... | |
| ~table () | |
| Copy destructor. More... | |
| void | swap (table &other) |
| swapping values function More... | |
| table & | operator= (table const &other) |
| Copy operator. More... | |
| size_type | size () const |
| element count More... | |
| size_type | max_size () const |
| max elmement number More... | |
| bool | empty () const |
| Emptyness test. More... | |
| iterator | begin () |
| Beginning of table. More... | |
| iterator | end () |
| End of table. More... | |
| const_iterator | begin () const |
| Beginning of table. More... | |
| const_iterator | end () const |
| End of table. More... | |
| std::pair< iterator, iterator > | equal_range (key_arg key) |
| equality range More... | |
| std::pair< const_iterator, const_iterator > | equal_range (key_arg key) const |
| equality range. More... | |
| void | erase (iterator const &first, iterator const &last) |
| Remove elements. More... | |
| std::pair< iterator, bool > | insert_unique (value_arg v) |
| Unique key insertion. More... | |
| iterator | insert_multiple (value_arg v) |
| multiple insertion More... | |
| void | clear () |
| remove all elements More... | |
Friends | |
| template<typename K , typename V , class Ex , class H , class Eq > | |
| class | iter |
| template<typename K , typename V , class Ex , class H , class Eq > | |
| class | const_iter |
Hashing based table.
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 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
| 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 arg_traits<key_type>::type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::key_arg |
| 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 Value utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::value_type |
Value type for cells.
| 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.
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) |
Beginning of table.
Referenced by utilmm::hash_set< Key, Hash, Equal >::begin(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::begin().
| const_iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) | const |
Beginning of table.
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::clear | ( | ) |
remove all elements
This function is strictly equivelent to erase(begin(), end())
Referenced by utilmm::hash_set< Key, Hash, Equal >::clear(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::clear().
| bool utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::empty | ( | ) | const |
Emptyness test.
| true | if this instance has no element |
| false | else |
Referenced by utilmm::hash_set< Key, Hash, Equal >::empty(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::empty().
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::end | ( | ) |
End of table.
Referenced by utilmm::hash_set< Key, Hash, Equal >::end(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::end().
| 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 |
This function tries to fuind all the elements of this table with a key equal to key
Referenced by utilmm::hash_set< Key, Hash, Equal >::find(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::find().
| 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 |
This function tries to fuind all the elements of this table with a key equal to 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 |
removes all the element of the table in the range [first, last [
Referenced by utilmm::hash_set< Key, Hash, Equal >::erase(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::erase().
| 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
| 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 |
This function tries to insert v in the table except if there's already an element whose keys is equal to the key of v
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 Referenced by utilmm::hash_set< Key, Hash, Equal >::insert(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::insert().
| size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::max_size | ( | ) | const |
max elmement number
Referenced by utilmm::hash_set< Key, Hash, Equal >::max_size(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::max_size().
| 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
Referenced by utilmm::hash_set< Key, Hash, Equal >::size(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::size().
| 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 |
Referenced by utilmm::hash_set< Key, Hash, Equal >::swap(), and utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::swap().
|
friend |
|
friend |
1.8.13