HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_SortedMap< K, V, C > Class Template Reference

Sorted map container. More...

#include <UT_Map.h>

+ Inheritance diagram for UT_SortedMap< K, V, C >:

Classes

struct  deref_pair_first
 
struct  deref_pair_second
 
class  partial_iterator_base
 

Public Types

typedef std::map< K, V, C > Base
 
typedef Base::key_type key_type
 
typedef Base::mapped_type mapped_type
 
typedef Base::value_type value_type
 
typedef Base::key_compare key_compare
 
typedef Base::iterator iterator
 
typedef Base::const_iterator const_iterator
 
typedef C LessThan
 
using key_iterator = partial_iterator_base< iterator, key_type, deref_pair_first< iterator, key_type >>
 
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 >>
 

Public Member Functions

 UT_SortedMap ()
 
 UT_SortedMap (const LessThan &lt)
 
template<typename InputIt >
 UT_SortedMap (InputIt first, InputIt last)
 
template<typename InputIt >
 UT_SortedMap (InputIt first, InputIt last, const LessThan &lt)
 
 UT_SortedMap (const UT_SortedMap &other)
 
 UT_SortedMap (std::initializer_list< value_type > init_list)
 
int64 getMemoryUsage (bool inclusive) const
 
bool contains (const key_type &key) const
 
UT_IteratorRange< key_iteratorkey_range ()
 
UT_IteratorRange
< const_key_iterator
key_range () const
 
UT_IteratorRange< mapped_iteratormapped_range ()
 
UT_IteratorRange
< const_mapped_iterator
mapped_range () const
 

Detailed Description

template<typename K, typename V, typename C = std::less<K>>
class UT_SortedMap< K, V, C >

Sorted map container.

Definition at line 244 of file UT_Map.h.

Member Typedef Documentation

template<typename K, typename V, typename C = std::less<K>>
typedef std::map<K, V, C> UT_SortedMap< K, V, C >::Base

Definition at line 248 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
typedef Base::const_iterator UT_SortedMap< K, V, C >::const_iterator

Definition at line 254 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
using UT_SortedMap< K, V, C >::const_key_iterator = partial_iterator_base<const_iterator, const key_type, deref_pair_first<const_iterator, const key_type>>

Definition at line 351 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
using UT_SortedMap< K, V, C >::const_mapped_iterator = partial_iterator_base<const_iterator, const mapped_type, deref_pair_second<const_iterator, const mapped_type>>

Definition at line 355 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
typedef Base::iterator UT_SortedMap< K, V, C >::iterator

Definition at line 253 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
typedef Base::key_compare UT_SortedMap< K, V, C >::key_compare

Definition at line 252 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
using UT_SortedMap< K, V, C >::key_iterator = partial_iterator_base<iterator, key_type, deref_pair_first<iterator, key_type>>

Definition at line 349 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
typedef Base::key_type UT_SortedMap< K, V, C >::key_type

Definition at line 249 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
typedef C UT_SortedMap< K, V, C >::LessThan

Definition at line 256 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
using UT_SortedMap< K, V, C >::mapped_iterator = partial_iterator_base<iterator, mapped_type, deref_pair_second<iterator, mapped_type>>

Definition at line 353 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
typedef Base::mapped_type UT_SortedMap< K, V, C >::mapped_type

Definition at line 250 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
typedef Base::value_type UT_SortedMap< K, V, C >::value_type

Definition at line 251 of file UT_Map.h.

Constructor & Destructor Documentation

template<typename K, typename V, typename C = std::less<K>>
UT_SortedMap< K, V, C >::UT_SortedMap ( )
inline

Definition at line 258 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
UT_SortedMap< K, V, C >::UT_SortedMap ( const LessThan lt)
inlineexplicit

Definition at line 260 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
template<typename InputIt >
UT_SortedMap< K, V, C >::UT_SortedMap ( InputIt  first,
InputIt  last 
)
inline

Definition at line 263 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
template<typename InputIt >
UT_SortedMap< K, V, C >::UT_SortedMap ( InputIt  first,
InputIt  last,
const LessThan lt 
)
inline

Definition at line 266 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
UT_SortedMap< K, V, C >::UT_SortedMap ( const UT_SortedMap< K, V, C > &  other)
inline

Definition at line 269 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
UT_SortedMap< K, V, C >::UT_SortedMap ( std::initializer_list< value_type init_list)
inline

Initialize the map using an initializer list. The initializer list is a list of pairs of items to add to the map. E.g:

UT_Map<int, const char *> foo = {{1, "one"}, {2, "two"}};

Definition at line 276 of file UT_Map.h.

Member Function Documentation

template<typename K, typename V, typename C = std::less<K>>
bool UT_SortedMap< K, V, C >::contains ( const key_type key) const
inline

Definition at line 288 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
int64 UT_SortedMap< K, V, C >::getMemoryUsage ( bool  inclusive) const
inline

Definition at line 281 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
UT_IteratorRange<key_iterator> UT_SortedMap< K, V, C >::key_range ( )
inline

Returns a range object that iterates over the map but returns only the key values.

Definition at line 359 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
UT_IteratorRange<const_key_iterator> UT_SortedMap< K, V, C >::key_range ( ) const
inline

Returns a const range object that iterates over the map but returns only the key values.

Definition at line 365 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
UT_IteratorRange<mapped_iterator> UT_SortedMap< K, V, C >::mapped_range ( )
inline

Returns a range object that iterates over the map but returns only the mapped values.

Definition at line 371 of file UT_Map.h.

template<typename K, typename V, typename C = std::less<K>>
UT_IteratorRange<const_mapped_iterator> UT_SortedMap< K, V, C >::mapped_range ( ) const
inline

Returns a const range object that iterates over the map but returns only the mapped values.

Definition at line 377 of file UT_Map.h.


The documentation for this class was generated from the following file: