34#ifndef _UTILS_STLMULTIMAP_HXX_
35#define _UTILS_STLMULTIMAP_HXX_
84 typedef std::pair<Key, Value>
Pair;
87 typedef typename std::multimap<Key, Value>::iterator
Iterator;
This is a custom allocator that limits the number of mappings.
Though at the surface, this may seem like an unnecessary abstraction of std::multimap,...
size_t max_size()
Maximum theoretical number of elements in the map.
size_t erase(Key key)
Remove an element from the tree.
Iterator end()
Get an iterator index pointing one past the last element in mapping.
Iterator upper_bound(const Key &key)
Get an iterator pointing the the first element in the map after the provided 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() ...
std::multimap< Key, Value > Mapping
short hand for the default allocator std::map type
~StlMultiMap()
Destructor.
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.
Mapping * mapping
pointer to an std::map instance with a default allocator
size_t size()
Number of elements currently in the map.
Iterator find(const Key &key)
Find an element matching the given key.
std::pair< Key, Value > Pair
This translation is done for consistency with SysMap and LinearMap.
StlMultiMap()
Default Constructor which with no mapping entry limit.
size_t count(const Key &key) const
Get the count of elements with a givin Key.
Iterator begin()
Get an iterator index pointing one past the last element in mapping.
std::multimap< Key, Value >::iterator Iterator
Short hand for the iterator type of a given instance.
MappingAllocator * mappingAllocator
pointer to an std::map instance with a custom allocator
Iterator insert(const Pair &val)
Insert (create) a new key value pair.
std::multimap< Key, Value, std::less< Key >, Allocator< std::pair< const Key, Value > > > MappingAllocator
short hand for the custom allocator std::map type
StlMultiMap(size_t entries)
Constructor that limits the number of mappings to a static pool.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.