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 (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 281 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 285 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 291 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 383 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 387 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 290 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 289 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 381 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 286 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 293 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 385 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 287 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 288 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 295 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 297 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 300 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 303 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 311 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 323 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 316 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 391 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 397 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 403 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 409 of file UT_Map.h.


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