ReactOS 0.4.16-dev-340-g0540c21
unordered_set< _Value,,, > Class Template Reference

#include <_unordered_set.h>

Collaboration diagram for unordered_set< _Value,,, >:

Public Types

typedef hashtable< _Value, _Value, _HashFcn, _UnorderedSetTraits, _STLP_PRIV _Identity< _Value >, _EqualKey, _Alloc_Ht
 
typedef _Ht::key_type key_type
 
typedef _Ht::value_type value_type
 
typedef _Ht::hasher hasher
 
typedef _Ht::key_equal key_equal
 
typedef _Ht::size_type size_type
 
typedef _Ht::difference_type difference_type
 
typedef _Ht::pointer pointer
 
typedef _Ht::const_pointer const_pointer
 
typedef _Ht::reference reference
 
typedef _Ht::const_reference const_reference
 
typedef _Ht::iterator iterator
 
typedef _Ht::const_iterator const_iterator
 
typedef _Ht::local_iterator local_iterator
 
typedef _Ht::const_local_iterator const_local_iterator
 
typedef _Ht::allocator_type allocator_type
 

Public Member Functions

hasher hash_function () const
 
key_equal key_eq () const
 
allocator_type get_allocator () const
 
 unordered_set (size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
 
 unordered_set (__move_source< _Self > src)
 
 unordered_set (const value_type *__f, const value_type *__l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
 
 unordered_set (const_iterator __f, const_iterator __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
 
_Selfoperator= (const _Self &__other)
 
size_type size () const
 
size_type max_size () const
 
bool empty () const
 
void swap (_Self &__hs)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
pair< iterator, boolinsert (const value_type &__obj)
 
iterator insert (const_iterator, const value_type &__obj)
 
void insert (const_iterator __f, const_iterator __l)
 
void insert (const value_type *__f, const value_type *__l)
 
_STLP_TEMPLATE_FOR_CONT_EXT iterator find (const _KT &__key)
 
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator find (const _KT &__key) const
 
_STLP_TEMPLATE_FOR_CONT_EXT size_type count (const _KT &__key) const
 
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iteratorequal_range (const _KT &__key)
 
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iteratorequal_range (const _KT &__key) const
 
size_type erase (const key_type &__key)
 
void erase (const_iterator __it)
 
void erase (const_iterator __f, const_iterator __l)
 
void clear ()
 
size_type bucket_count () const
 
size_type max_bucket_count () const
 
size_type bucket_size (size_type __n) const
 
_STLP_TEMPLATE_FOR_CONT_EXT size_type bucket (const _KT &__k) const
 
local_iterator begin (size_type __n)
 
local_iterator end (size_type __n)
 
const_local_iterator begin (size_type __n) const
 
const_local_iterator end (size_type __n) const
 
float load_factor () const
 
float max_load_factor () const
 
void max_load_factor (float __val)
 
void rehash (size_type __hint)
 

Private Types

typedef unordered_set< _Value, _HashFcn, _EqualKey, _Alloc_Self
 
typedef _STLP_PRIV _UnorderedSetTraitsT< _Value_UnorderedSetTraits
 

Private Attributes

_Ht _M_ht
 

Detailed Description

template<class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn, hash< _Value >), _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to< _Value >), _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Value >)>
class unordered_set< _Value,,, >

Definition at line 37 of file _unordered_set.h.

Member Typedef Documentation

◆ _Ht

Definition at line 47 of file _unordered_set.h.

◆ _Self

typedef unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> unordered_set< _Value,,, >::_Self
private

Definition at line 42 of file _unordered_set.h.

◆ _UnorderedSetTraits

typedef _STLP_PRIV _UnorderedSetTraitsT<_Value> unordered_set< _Value,,, >::_UnorderedSetTraits
private

Definition at line 44 of file _unordered_set.h.

◆ allocator_type

Definition at line 66 of file _unordered_set.h.

◆ const_iterator

Definition at line 62 of file _unordered_set.h.

◆ const_local_iterator

Definition at line 64 of file _unordered_set.h.

◆ const_pointer

Definition at line 57 of file _unordered_set.h.

◆ const_reference

Definition at line 59 of file _unordered_set.h.

◆ difference_type

Definition at line 55 of file _unordered_set.h.

◆ hasher

Definition at line 51 of file _unordered_set.h.

◆ iterator

◆ key_equal

Definition at line 52 of file _unordered_set.h.

◆ key_type

Definition at line 49 of file _unordered_set.h.

◆ local_iterator

Definition at line 63 of file _unordered_set.h.

◆ pointer

◆ reference

◆ size_type

Definition at line 54 of file _unordered_set.h.

◆ value_type

Definition at line 50 of file _unordered_set.h.

Constructor & Destructor Documentation

◆ unordered_set() [1/4]

unordered_set< _Value,,, >::unordered_set ( size_type  __n = 0,
const hasher __hf = hasher(),
const key_equal __eql = key_equal(),
const allocator_type __a = allocator_type() 
)
inlineexplicit

Definition at line 77 of file _unordered_set.h.

80 : _M_ht(__n, __hf, __eql, __a) {}
return __n
Definition: _algo.h:75

◆ unordered_set() [2/4]

Definition at line 83 of file _unordered_set.h.

84 : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {}
GLenum src
Definition: glext.h:6340

◆ unordered_set() [3/4]

Definition at line 96 of file _unordered_set.h.

100 : _M_ht(__n, __hf, __eql, __a)
101 { _M_ht.insert_unique(__f, __l); }
pair< iterator, bool > insert_unique(const value_type &__obj)
Definition: _hashtable.h:407

◆ unordered_set() [4/4]

Definition at line 103 of file _unordered_set.h.

107 : _M_ht(__n, __hf, __eql, __a)
108 { _M_ht.insert_unique(__f, __l); }

Member Function Documentation

◆ begin() [1/4]

Definition at line 122 of file _unordered_set.h.

122{ return _M_ht.begin(); }
iterator begin()
Definition: _hashtable.h:376

◆ begin() [2/4]

Definition at line 124 of file _unordered_set.h.

124{ return _M_ht.begin(); }

◆ begin() [3/4]

Definition at line 166 of file _unordered_set.h.

166{ return _M_ht.begin(__n); }

◆ begin() [4/4]

Definition at line 168 of file _unordered_set.h.

168{ return _M_ht.begin(__n); }

◆ bucket()

Definition at line 165 of file _unordered_set.h.

165{ return _M_ht.bucket(__k); }
_STLP_TEMPLATE_FOR_CONT_EXT size_type bucket(const _KT &__k) const
Definition: _hashtable.h:397

◆ bucket_count()

size_type unordered_set< _Value,,, >::bucket_count ( ) const
inline

Definition at line 161 of file _unordered_set.h.

161{ return _M_ht.bucket_count(); }
size_type bucket_count() const
Definition: _hashtable.h:391

Referenced by UnorderedTest::buckets(), and UnorderedTest::hash_policy().

◆ bucket_size()

size_type unordered_set< _Value,,, >::bucket_size ( size_type  __n) const
inline

Definition at line 163 of file _unordered_set.h.

163{ return _M_ht.elems_in_bucket(__n); }
size_type elems_in_bucket(size_type __bucket) const
Definition: _hashtable.h:393

Referenced by UnorderedTest::buckets().

◆ clear()

Definition at line 159 of file _unordered_set.h.

159{ _M_ht.clear(); }
void clear()
Definition: _hashtable.c:501

◆ count()

Definition at line 147 of file _unordered_set.h.

147{ return _M_ht.count(__key); }
_STLP_TEMPLATE_FOR_CONT_EXT size_type count(const _KT &__key) const
Definition: _hashtable.h:516

◆ empty()

bool unordered_set< _Value,,, >::empty ( ) const
inline

Definition at line 116 of file _unordered_set.h.

116{ return _M_ht.empty(); }
bool empty() const
Definition: _hashtable.h:365

◆ end() [1/4]

Definition at line 123 of file _unordered_set.h.

123{ return _M_ht.end(); }
iterator end()
Definition: _hashtable.h:377

◆ end() [2/4]

Definition at line 125 of file _unordered_set.h.

125{ return _M_ht.end(); }

◆ end() [3/4]

Definition at line 167 of file _unordered_set.h.

167{ return _M_ht.end(__n); }

◆ end() [4/4]

Definition at line 169 of file _unordered_set.h.

169{ return _M_ht.end(__n); }

◆ equal_range() [1/2]

Definition at line 150 of file _unordered_set.h.

151 { return _M_ht.equal_range(__key); }
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator > equal_range(const _KT &__key)
Definition: _hashtable.h:534

◆ equal_range() [2/2]

Definition at line 153 of file _unordered_set.h.

154 { return _M_ht.equal_range(__key); }

◆ erase() [1/3]

Definition at line 156 of file _unordered_set.h.

156{return _M_ht.erase(__key); }
size_type erase(const key_type &__key)
Definition: _hashtable.c:263

◆ erase() [2/3]

Definition at line 158 of file _unordered_set.h.

158{ _M_ht.erase(__f, __l); }

◆ erase() [3/3]

Definition at line 157 of file _unordered_set.h.

157{ _M_ht.erase(__it); }
_STLP_MOVE_TO_PRIV_NAMESPACE const _InputIterator const input_iterator_tag &_InputIterator __it(__first)

◆ find() [1/2]

Definition at line 142 of file _unordered_set.h.

142{ return _M_ht.find(__key); }
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__key)
Definition: _hashtable.h:511

◆ find() [2/2]

Definition at line 144 of file _unordered_set.h.

144{ return _M_ht.find(__key); }

◆ get_allocator()

allocator_type unordered_set< _Value,,, >::get_allocator ( ) const
inline

Definition at line 70 of file _unordered_set.h.

70{ return _M_ht.get_allocator(); }
allocator_type get_allocator() const
Definition: _hashtable.h:300

◆ hash_function()

hasher unordered_set< _Value,,, >::hash_function ( ) const
inline

Definition at line 68 of file _unordered_set.h.

68{ return _M_ht.hash_funct(); }
hasher hash_funct() const
Definition: _hashtable.h:246

Referenced by UnorderedTest::hash_policy().

◆ insert() [1/4]

◆ insert() [2/4]

void unordered_set< _Value,,, >::insert ( const value_type __f,
const value_type __l 
)
inline

Definition at line 137 of file _unordered_set.h.

139 { _M_ht.insert_unique(__f,__l); }

◆ insert() [3/4]

Definition at line 135 of file _unordered_set.h.

136 {_M_ht.insert_unique(__f, __l); }

◆ insert() [4/4]

Definition at line 129 of file _unordered_set.h.

130 { return _M_ht.insert_unique(__obj); }

◆ key_eq()

key_equal unordered_set< _Value,,, >::key_eq ( ) const
inline

Definition at line 69 of file _unordered_set.h.

69{ return _M_ht.key_eq(); }
key_equal key_eq() const
Definition: _hashtable.h:247

Referenced by UnorderedTest::hash_policy().

◆ load_factor()

float unordered_set< _Value,,, >::load_factor ( ) const
inline

Definition at line 171 of file _unordered_set.h.

171{ return _M_ht.load_factor(); }
float load_factor() const
Definition: _hashtable.h:400

Referenced by UnorderedTest::hash_policy().

◆ max_bucket_count()

size_type unordered_set< _Value,,, >::max_bucket_count ( ) const
inline

Definition at line 162 of file _unordered_set.h.

162{ return _M_ht.max_bucket_count(); }
size_type max_bucket_count() const
Definition: _hashtable.h:392

Referenced by UnorderedTest::buckets().

◆ max_load_factor() [1/2]

float unordered_set< _Value,,, >::max_load_factor ( ) const
inline

Definition at line 172 of file _unordered_set.h.

172{ return _M_ht.max_load_factor(); }
float max_load_factor() const
Definition: _hashtable.h:401

Referenced by UnorderedTest::hash_policy().

◆ max_load_factor() [2/2]

void unordered_set< _Value,,, >::max_load_factor ( float  __val)
inline

Definition at line 173 of file _unordered_set.h.

_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656

◆ max_size()

size_type unordered_set< _Value,,, >::max_size ( ) const
inline

Definition at line 115 of file _unordered_set.h.

115{ return _M_ht.max_size(); }
size_type max_size() const
Definition: _hashtable.h:364

◆ operator=()

Definition at line 111 of file _unordered_set.h.

112 { _M_ht = __other._M_ht; return *this; }

◆ rehash()

void unordered_set< _Value,,, >::rehash ( size_type  __hint)
inline

Definition at line 174 of file _unordered_set.h.

174{ _M_ht.rehash(__hint); }
void rehash(size_type __num_buckets_hint)
Definition: _hashtable.c:365

Referenced by UnorderedTest::hash_policy().

◆ size()

Definition at line 114 of file _unordered_set.h.

114{ return _M_ht.size(); }
size_type size() const
Definition: _hashtable.h:363

Referenced by UnorderedTest::buckets(), and UnorderedTest::hash_policy().

◆ swap()

void unordered_set< _Value,,, >::swap ( _Self __hs)
inline

Definition at line 117 of file _unordered_set.h.

117{ _M_ht.swap(__hs._M_ht); }
void swap(_Self &__ht)
Definition: _hashtable.h:367

Member Data Documentation

◆ _M_ht


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