Unsorted map container.
More...
#include <UT_Map.h>
|
typedef hboost::unordered_map
< K, V, H, P > | Base |
|
typedef Base::key_type | key_type |
|
typedef Base::mapped_type | mapped_type |
|
typedef Base::value_type | value_type |
|
typedef Base::hasher | hasher |
|
typedef Base::key_equal | key_equal |
|
typedef Base::iterator | iterator |
|
typedef Base::const_iterator | const_iterator |
|
typedef H | Hasher |
|
typedef P | Equal |
|
using | const_key_iterator = partial_iterator_base< const_iterator, const key_type, deref_pair_first< const_iterator, const key_type >> |
|
using | mapped_iterator = partial_iterator_base< iterator, mapped_type, deref_pair_second< iterator, mapped_type >> |
|
using | const_mapped_iterator = partial_iterator_base< const_iterator, const mapped_type, deref_pair_second< const_iterator, const mapped_type >> |
|
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
class UT_Map< K, V, H, P >
Unsorted map container.
- Examples:
- DM/DM_OverdrawHook.C, SIM/SNOW_Solver.C, and SOP/SOP_CustomBrush.C.
Definition at line 107 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
typedef hboost::unordered_map<K, V, H, P> UT_Map< K, V, H, P >::Base |
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
Initialize an empty map, and optionally a custom hasher and equal compare functions.
Definition at line 124 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
template<typename InputIt >
Initialize the map from an iterator pair, and optionally a custom hasher and equal compare functions.
Definition at line 131 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
Initialize the map using an initializer list. The initializer list is a list of pairs of items to add to the map. E.g:
Definition at line 142 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
The implementation of clear() is O(bucket_count()), not O(size()), which can cause unexpected performance issues if the map has a large capacity. For std::unordered_map this was defect 2550 (http://cplusplus.github.io/LWG/lwg-defects.html#2550) When updating or changing the underlying implemention, verify if this is still necessary.
Definition at line 184 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
Returns true
if a value with the key
is contained in the map.
Definition at line 159 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
V UT_Map< K, V, H, P >::get |
( |
const key_type & |
key, |
|
|
const V & |
defval |
|
) |
| const |
|
inline |
Returns the value at the key if it exists, or the provided default value if it does not. NOTE: Considering making this return const V&? Don't. Lifetime extension rules likely can't be used to make that safe. eg. const Foo &foo = get(key, Foo()) will return a stale reference.
Definition at line 169 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
int64 UT_Map< K, V, H, P >::getMemoryUsage |
( |
bool |
inclusive | ) |
const |
|
inline |
Returns the approximate size, in bytes, of the memory consumed by this map or, optionally, only the data contained within.
Definition at line 151 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
Returns a range object that iterates over the map but returns only the key values. Example:
std::cout << key << "\n";
Definition at line 262 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
Returns a range object that iterates over the map but returns only the mapped values.
Definition at line 268 of file UT_Map.h.
template<typename K, typename V, typename H = hboost::hash<K>, typename P = std::equal_to<K>>
Returns a const range object that iterates over the map but returns only the mapped values.
Definition at line 274 of file UT_Map.h.
The documentation for this class was generated from the following file: