Though at the surface, this may seem like an unnecessary abstraction of std::multimap, it has the purpose of limiting the implementation to features found only in common to LinearMap implementation.
More...
#include <StlMultiMap.hxx>
|
| typedef std::pair< Key, Value > | Pair |
| | This translation is done for consistency with SysMap and LinearMap.
|
| |
| typedef std::multimap< Key, Value >::iterator | Iterator |
| | Short hand for the iterator type of a given instance.
|
| |
|
| | StlMultiMap () |
| | Default Constructor which with no mapping entry limit.
|
| |
| | StlMultiMap (size_t entries) |
| | Constructor that limits the number of mappings to a static pool.
|
| |
| | ~StlMultiMap () |
| | Destructor.
|
| |
| size_t | erase (Key key) |
| | Remove an element from the tree.
|
| |
| void | erase (Iterator it) |
| | Remove a node from the tree.
|
| |
| Iterator | insert (const Iterator pos, const Pair &val) |
| | Insert (create) a new key value pair.
|
| |
| Iterator | insert (const Pair &val) |
| | Insert (create) a new key value pair.
|
| |
| size_t | size () |
| | Number of elements currently in the map.
|
| |
| size_t | max_size () |
| | Maximum theoretical number of elements in the map.
|
| |
| Iterator | find (const Key &key) |
| | Find an element matching the given key.
|
| |
| Iterator | lower_bound (const Key &key) |
| | Get an iterator pointing the the first element in the map with the provided key, else iterator end() if not found.
|
| |
| Iterator | upper_bound (const Key &key) |
| | Get an iterator pointing the the first element in the map after the provided key.
|
| |
| Iterator | end () |
| | Get an iterator index pointing one past the last element in mapping.
|
| |
| Iterator | begin () |
| | Get an iterator index pointing one past the last element in mapping.
|
| |
| size_t | count (const Key &key) const |
| | Get the count of elements with a givin Key.
|
| |
|
| typedef std::multimap< Key, Value, std::less< Key >, Allocator< std::pair< const Key, Value > > > | MappingAllocator |
| | short hand for the custom allocator std::map type
|
| |
| typedef std::multimap< Key, Value > | Mapping |
| | short hand for the default allocator std::map type
|
| |
template<typename Key, typename Value>
class StlMultiMap< Key, Value >
Though at the surface, this may seem like an unnecessary abstraction of std::multimap, it has the purpose of limiting the implementation to features found only in common to LinearMap implementation.
In this way, one can use MultiMap and based on compile time settings choose to use any one of StlMultiMap or LinearMap from the same source usage of MultiMap.
Definition at line 49 of file StlMultiMap.hxx.
◆ Iterator
template<typename Key , typename Value >
| typedef std::multimap<Key,Value>::iterator StlMultiMap< Key, Value >::Iterator |
Short hand for the iterator type of a given instance.
Definition at line 87 of file StlMultiMap.hxx.
◆ Mapping
template<typename Key , typename Value >
| typedef std::multimap<Key, Value> StlMultiMap< Key, Value >::Mapping |
|
private |
short hand for the default allocator std::map type
Definition at line 200 of file StlMultiMap.hxx.
◆ MappingAllocator
template<typename Key , typename Value >
| typedef std::multimap<Key, Value, std::less<Key>, Allocator<std::pair<const Key, Value> > > StlMultiMap< Key, Value >::MappingAllocator |
|
private |
short hand for the custom allocator std::map type
Definition at line 197 of file StlMultiMap.hxx.
◆ Pair
template<typename Key , typename Value >
| typedef std::pair<Key, Value> StlMultiMap< Key, Value >::Pair |
◆ StlMultiMap() [1/2]
template<typename Key , typename Value >
Default Constructor which with no mapping entry limit.
Definition at line 54 of file StlMultiMap.hxx.
◆ StlMultiMap() [2/2]
template<typename Key , typename Value >
Constructor that limits the number of mappings to a static pool.
- Parameters
-
| entries | number of nodes to statically create and track |
Definition at line 63 of file StlMultiMap.hxx.
◆ ~StlMultiMap()
template<typename Key , typename Value >
◆ begin()
template<typename Key , typename Value >
Get an iterator index pointing one past the last element in mapping.
- Returns
- iterator index pointing to one past the last element in mapping
Definition at line 181 of file StlMultiMap.hxx.
◆ count()
template<typename Key , typename Value >
| size_t StlMultiMap< Key, Value >::count |
( |
const Key & |
key | ) |
const |
|
inline |
Get the count of elements with a givin Key.
- Parameters
-
| key | key for the elements to count |
- Returns
- number of elements with a givin key
Definition at line 190 of file StlMultiMap.hxx.
◆ end()
template<typename Key , typename Value >
Get an iterator index pointing one past the last element in mapping.
- Returns
- iterator index pointing to one past the last element in mapping
Definition at line 173 of file StlMultiMap.hxx.
◆ erase() [1/2]
template<typename Key , typename Value >
Remove a node from the tree.
- Parameters
-
| it | iterator index for the element to remove |
Definition at line 101 of file StlMultiMap.hxx.
◆ erase() [2/2]
template<typename Key , typename Value >
Remove an element from the tree.
- Parameters
-
| key | key for the element to remove |
- Returns
- number of elements removed
Definition at line 93 of file StlMultiMap.hxx.
◆ find()
template<typename Key , typename Value >
Find an element matching the given key.
- Parameters
-
- Returns
- iterator index pointing to key, else iterator end() if not found
Definition at line 145 of file StlMultiMap.hxx.
◆ insert() [1/2]
template<typename Key , typename Value >
Insert (create) a new key value pair.
- Parameters
-
| pos | hint as to the position to which to place the new mapping |
| val | Key, Value Pair to insert into the mapping |
- Returns
- Iterator pointing to new or exising Key, Value Pair
Definition at line 111 of file StlMultiMap.hxx.
◆ insert() [2/2]
template<typename Key , typename Value >
Insert (create) a new key value pair.
- Parameters
-
| val | Key, Value Pair to insert into the mapping |
- Returns
- Iterator pointing to new or exising Key, Value Pair
Definition at line 120 of file StlMultiMap.hxx.
◆ lower_bound()
template<typename Key , typename Value >
Get an iterator pointing the the first element in the map with the provided key, else iterator end() if not found.
- Parameters
-
| key | key for the elements to lower bound |
- Returns
- iterator pointing to first element with the provided key
Definition at line 155 of file StlMultiMap.hxx.
◆ max_size()
template<typename Key , typename Value >
Maximum theoretical number of elements in the map.
- Returns
- maximum theoretical number of elements in the map
Definition at line 136 of file StlMultiMap.hxx.
◆ size()
template<typename Key , typename Value >
Number of elements currently in the map.
- Returns
- number of elements in the map
Definition at line 128 of file StlMultiMap.hxx.
◆ upper_bound()
template<typename Key , typename Value >
Get an iterator pointing the the first element in the map after the provided key.
- Parameters
-
| key | key for the elements to upper bound |
- Returns
- iterator pointing to first element after the provided key
Definition at line 165 of file StlMultiMap.hxx.
◆ mapping
template<typename Key , typename Value >
pointer to an std::map instance with a default allocator
Definition at line 206 of file StlMultiMap.hxx.
◆ mappingAllocator
template<typename Key , typename Value >
pointer to an std::map instance with a custom allocator
Definition at line 203 of file StlMultiMap.hxx.
The documentation for this class was generated from the following file: