|
Util--
1.1
|
map with hashing access More...
#include <utilmm/hash/hash_map.hh>

Public Types | |
| typedef Key | key_type |
| Key type. More... | |
| typedef Data | data_type |
| Data type. More... | |
| typedef std::pair< Key const, Data > | value_type |
| Value type for cells. More... | |
| typedef container_type::iterator | iterator |
| iterator type More... | |
| typedef container_type::const_iterator | const_iterator |
| const iterator type More... | |
Public Member Functions | |
| void | swap (hash_map &other) |
| swapping function More... | |
| size_t | size () const |
| element count More... | |
| size_t | max_size () const |
| max element 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... | |
| iterator | find (key_arg key) |
| Search for key. More... | |
| const_iterator | find (key_arg key) const |
| Search key. More... | |
| std::pair< iterator, bool > | insert (value_arg val) |
| Cell insertion. More... | |
| void | erase (iterator const &first, iterator const &last) |
| Remove range. More... | |
| void | erase (iterator const &i) |
| Remove element. More... | |
| void | erase (key_arg key) |
| remove element More... | |
| void | clear () |
| Remove all elements. More... | |
map with hashing access
This is an unsorted map where keys are accessed using a hash function
| Key | the key |
| Data | The data associated to Key |
| Hash | hashing functor fo Key |
| Eqaul | equality functor for Key |
| typedef container_type::const_iterator utilmm::hash_map< Key, Data, Hash, Equal >::const_iterator |
const iterator type
const iterator type The type used to iterate through this class without any modification
| typedef Data utilmm::hash_map< Key, Data, Hash, Equal >::data_type |
Data type.
This is the type of the data asociated to the key
| typedef container_type::iterator utilmm::hash_map< Key, Data, Hash, Equal >::iterator |
iterator type
iterator type The type used to iterate through and manipulate this class
| typedef Key utilmm::hash_map< Key, Data, Hash, Equal >::key_type |
Key type.
| typedef std::pair<Key const, Data> utilmm::hash_map< Key, Data, Hash, Equal >::value_type |
Value type for cells.
Value type for cells.
For hash_map value_type is a std::pair containing the key and the associated data.
|
inline |
beginning of table
Beginning of table.
|
inline |
beginning of table
Beginning of table.
|
inline |
Remove all elements.
remove all elements This function is strictly equivelent to erase(begin(), end())
Referenced by utilmm::cached_fn< Arg, Ret, Hash, Equal >::empty_cache().
|
inline |
Emptyness test.
Emptyness test.
| true | if this instance has no element |
| false | else |
|
inline |
end of table
End of table.
Referenced by utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::erase(), and utilmm::smart::ref_count::uniq_memory< Ty, Hash, Equal >::null_cell().
|
inline |
|
inline |
Remove range.
Remove elements.
| first | an iterator |
| last | an iterator |
removes all the element of the table in the range [first, last [
Referenced by utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::erase().
|
inline |
Remove element.
| i | The lement to remove |
This function removes the element pointed by i form the table
|
inline |
remove element
| key | the key of the element |
This function erase, if any, the element whose key is key
|
inline |
Search for key.
| key | the key to find. |
This function tries to search in table an element with key key
end() if not found. Referenced by utilmm::hash_map< base_type *, size_t, hash_ptr< Ty, Hash >, eq_ptr< Ty, Equal > >::erase().
|
inline |
Search key.
Search for key.
| key | the key to find. |
This function tries to search in table an element with key key
end() if not found.
|
inline |
Cell insertion.
| val | The value to insert |
This function tries to insert val in current instance. It will not insert it if ther's already a cell with the same key as val
first is an iterator pointing to cell with the same key as val and second is true if and only if val was inserted.
|
inline |
max element number
max elmement number
|
inline |
element count
element count
Referenced by utilmm::cached_fn< Arg, Ret, Hash, Equal >::cache_size().
|
inline |
swapping function
swapping values function This function exchange the value of current instance with the value of another instance.
| other | The other instance |
1.8.13