Map whose keys are pointers, but are compared by their dereferenced values.
Synopsis
Declared in <indirectmap.h>
template<
class K,
class T>
class indirectmap;
Description
Differs from a plain std::map<const K*, T, DereferencingComparator<K*> > in that methods that take a key for comparison take a K rather than taking a K* (taking a K* would be confusing, since it's the value rather than the address of the object for comparison that matters due to the dereferencing comparator).
Objects pointed to by keys must not be modified in any way that changes the result of DereferencingComparator.
Type Aliases
Name |
Description |
Constant iterator over the map entries. |
|
Mutable iterator over the map entries. |
|
Unsigned integer type used for sizes and counts. |
|
The key/value pair type stored in the map. |
Member Functions
Name |
Description |
|
|
Get a const iterator to the first entry. |
|
Get a const iterator past the last entry. |
|
Remove all entries from the map. |
|
Count the entries whose key dereferences to the given value. |
|
Report whether the map has no entries. |
|
|
|
Erase the entry whose key dereferences to the given value. |
|
Find the entry whose key dereferences to the given value. |
|
Insert a key/value pair, where the key is a pointer. |
|
Find the first entry whose key is not ordered before the given value. |
|
Get the maximum number of entries the map can hold. |
|
Get the number of entries in the map. |
Non-Member Functions
Name |
Description |
Dynamic memory used by an indirectmap's tree nodes. |
|
Dynamic memory used by a single additional indirectmap node. |
Created with MrDocs