STLdoc
STLdocumentation
|
#include <internal_concurrent_hash.h>
Public Types | |
typedef _Concurrent_hash< _Traits > | _Mytype |
typedef _Split_ordered_list< typename _Traits::value_type, typename _Traits::allocator_type > | _Mylist |
typedef _Traits::_Key_compare | _Key_compare |
typedef _Traits::_Value_compare | _Value_compare |
typedef _Traits::value_type | value_type |
typedef _Traits::key_type | key_type |
typedef _Traits::allocator_type | allocator_type |
typedef allocator_type::pointer | pointer |
typedef allocator_type::const_pointer | const_pointer |
typedef allocator_type::reference | reference |
typedef allocator_type::const_reference | const_reference |
typedef allocator_type::size_type | size_type |
typedef allocator_type::difference_type | difference_type |
typedef std::conditional< std::is_same< key_type, value_type >::value, typename _Mylist::const_iterator, typename _Mylist::iterator >::type | iterator |
typedef _Mylist::const_iterator | const_iterator |
typedef iterator | local_iterator |
typedef const_iterator | const_local_iterator |
typedef _Mylist::_Nodeptr | _Nodeptr |
typedef _Mylist::_Full_iterator | _Full_iterator |
typedef _Mylist::_Full_const_iterator | _Full_const_iterator |
Public Member Functions | |
_Concurrent_hash (size_type _Number_of_buckets=_Initial_bucket_number, const _Key_compare &_Parg=_Key_compare(), const allocator_type &_Allocator=allocator_type()) | |
_Concurrent_hash (const _Concurrent_hash &_Right, const allocator_type &_Allocator) | |
_Concurrent_hash (const _Concurrent_hash &_Right) | |
_Concurrent_hash (_Concurrent_hash &&_Right) | |
_Concurrent_hash & | operator= (const _Concurrent_hash &_Right) |
_Concurrent_hash & | operator= (_Concurrent_hash &&_Right) |
~_Concurrent_hash () | |
allocator_type | get_allocator () const |
Returns the stored allocator object for this concurrent container. This method is concurrency safe. More... | |
bool | empty () const |
Tests whether no elements are present. This method is concurrency safe. More... | |
size_type | size () const |
Returns the number of elements in this concurrent container. This method is concurrency safe. More... | |
size_type | max_size () const |
Returns the maximum size of the concurrent container, determined by the allocator. This method is concurrency safe. More... | |
iterator | begin () |
Returns an iterator pointing to the first element in the concurrent container. This method is concurrency safe. More... | |
const_iterator | begin () const |
Returns an iterator pointing to the first element in the concurrent container. This method is concurrency safe. More... | |
iterator | end () |
Returns an iterator pointing to the location succeeding the last element in the concurrent container. This method is concurrency safe. More... | |
const_iterator | end () const |
Returns a const_iterator pointing to the location succeeding the last element in the concurrent container. This method is concurrency safe. More... | |
const_iterator | cbegin () const |
Returns a const iterator pointing to the first element in the concurrent container. This method is concurrency safe. More... | |
const_iterator | cend () const |
Returns a const iterator pointing to the location succeeding the last element in the concurrent container. This method is concurrency safe. More... | |
iterator | unsafe_erase (const_iterator _Where) |
Removes elements from the container at specified positions. This method is not concurrency-safe. More... | |
iterator | unsafe_erase (const_iterator _First, const_iterator _Last) |
Removes elements from the container at specified positions. This method is not concurrency-safe. More... | |
size_type | unsafe_erase (const key_type &_Keyval) |
Removes elements from the container at specified positions. This method is not concurrency-safe. More... | |
void | swap (_Concurrent_hash &_Right) |
Swaps the contents of two concurrent containers. This function is not concurrency safe. More... | |
void | clear () |
Erases all the elements in the concurrent container. This function is not concurrency safe. More... | |
iterator | find (const key_type &_Keyval) |
Finds an element that matches a specified key. This function is concurrency safe. More... | |
const_iterator | find (const key_type &_Keyval) const |
Finds an element that matches a specified key. This function is concurrency safe. More... | |
size_type | count (const key_type &_Keyval) const |
Counts the number of elements matching a specified key. This function is concurrency safe. More... | |
std::pair< iterator, iterator > | equal_range (const key_type &_Keyval) |
Finds a range that matches a specified key. This function is concurrency safe. More... | |
std::pair< const_iterator, const_iterator > | equal_range (const key_type &_Keyval) const |
Finds a range that matches a specified key. This function is concurrency safe. More... | |
size_type | unsafe_bucket_count () const |
Returns the current number of buckets in this container. More... | |
size_type | unsafe_max_bucket_count () const |
Returns the maximum number of buckets in this container. More... | |
size_type | unsafe_bucket_size (size_type _Bucket) |
Returns the number of items in a specific bucket of this container. More... | |
size_type | unsafe_bucket (const key_type &_Keyval) const |
Returns the bucket index that a specific key maps to in this container. More... | |
local_iterator | unsafe_begin (size_type _Bucket) |
Returns an iterator to the first element in this container for a specific bucket. More... | |
const_local_iterator | unsafe_begin (size_type _Bucket) const |
Returns an iterator to the first element in this container for a specific bucket. More... | |
local_iterator | unsafe_end (size_type _Bucket) |
Returns an iterator to the last element in this container for a specific bucket. More... | |
const_local_iterator | unsafe_end (size_type _Bucket) const |
Returns an iterator to the last element in this container for a specific bucket. More... | |
const_local_iterator | unsafe_cbegin (size_type) const |
Returns an iterator to the first element in this container for a specific bucket. More... | |
const_local_iterator | unsafe_cend (size_type) const |
Returns an iterator to the first element in this container for a specific bucket. More... | |
float | load_factor () const |
Computes and returns the current load factor of the container. The load factor is the number of elements in the container divided by the number of buckets. More... | |
float | max_load_factor () const |
Gets or sets the maximum load factor of the container. The maximum load factor is the largest number of elements than can be in any bucket before the container grows its internal table. More... | |
void | max_load_factor (float _Newmax) |
Gets or sets the maximum load factor of the container. The maximum load factor is the largest number of elements than can be in any bucket before the container grows its internal table. More... | |
void | rehash (size_type _Buckets) |
Rebuilds the hash table. More... | |
Static Public Member Functions | |
static size_type __cdecl | _Segment_index_of (size_type _Index) |
static size_type | _Segment_base (size_type _K) |
static size_type | _Segment_size (size_type _K) |
Static Public Attributes | |
static const size_type | _Initial_bucket_number = 8 |
static const size_type | _Initial_bucket_load = 4 |
static size_type const | _Pointers_per_table = sizeof(size_type) * 8 |
Protected Member Functions | |
template<typename _ValTy > | |
std::pair< iterator, bool > | _Insert (_ValTy &&_Value) |
template<class _Iterator > | |
void | _Insert (_Iterator _First, _Iterator _Last) |
Private Attributes | |
_Full_iterator * | _M_buckets [_Pointers_per_table] |
_Mylist | _M_split_ordered_list |
allocator_type::template rebind< _Full_iterator >::other | _M_allocator |
size_type | _M_number_of_buckets |
float | _M_maximum_bucket_size |
typedef _Mylist::_Full_const_iterator Concurrency::details::_Concurrent_hash< _Traits >::_Full_const_iterator |
typedef _Mylist::_Full_iterator Concurrency::details::_Concurrent_hash< _Traits >::_Full_iterator |
typedef _Traits::_Key_compare Concurrency::details::_Concurrent_hash< _Traits >::_Key_compare |
typedef _Split_ordered_list<typename _Traits::value_type, typename _Traits::allocator_type> Concurrency::details::_Concurrent_hash< _Traits >::_Mylist |
typedef _Concurrent_hash<_Traits> Concurrency::details::_Concurrent_hash< _Traits >::_Mytype |
typedef _Mylist::_Nodeptr Concurrency::details::_Concurrent_hash< _Traits >::_Nodeptr |
typedef _Traits::_Value_compare Concurrency::details::_Concurrent_hash< _Traits >::_Value_compare |
typedef _Traits::allocator_type Concurrency::details::_Concurrent_hash< _Traits >::allocator_type |
typedef _Mylist::const_iterator Concurrency::details::_Concurrent_hash< _Traits >::const_iterator |
typedef const_iterator Concurrency::details::_Concurrent_hash< _Traits >::const_local_iterator |
typedef allocator_type::const_pointer Concurrency::details::_Concurrent_hash< _Traits >::const_pointer |
typedef allocator_type::const_reference Concurrency::details::_Concurrent_hash< _Traits >::const_reference |
typedef allocator_type::difference_type Concurrency::details::_Concurrent_hash< _Traits >::difference_type |
typedef std::conditional<std::is_same<key_type, value_type>::value, typename _Mylist::const_iterator, typename _Mylist::iterator>::type Concurrency::details::_Concurrent_hash< _Traits >::iterator |
typedef _Traits::key_type Concurrency::details::_Concurrent_hash< _Traits >::key_type |
typedef iterator Concurrency::details::_Concurrent_hash< _Traits >::local_iterator |
typedef allocator_type::pointer Concurrency::details::_Concurrent_hash< _Traits >::pointer |
typedef allocator_type::reference Concurrency::details::_Concurrent_hash< _Traits >::reference |
typedef allocator_type::size_type Concurrency::details::_Concurrent_hash< _Traits >::size_type |
typedef _Traits::value_type Concurrency::details::_Concurrent_hash< _Traits >::value_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprotected |
|
inlineprotected |
|
inlineprivate |
|
inlineprivate |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
Returns an iterator pointing to the first element in the concurrent container. This method is concurrency safe.
|
inline |
Returns an iterator pointing to the first element in the concurrent container. This method is concurrency safe.
|
inline |
Returns a const iterator pointing to the first element in the concurrent container. This method is concurrency safe.
|
inline |
Returns a const iterator pointing to the location succeeding the last element in the concurrent container. This method is concurrency safe.
|
inline |
Erases all the elements in the concurrent container. This function is not concurrency safe.
|
inline |
Counts the number of elements matching a specified key. This function is concurrency safe.
_Keyval | The key to search for. |
|
inline |
Tests whether no elements are present. This method is concurrency safe.
In the presence of concurrent inserts, whether or not the concurrent container is empty may change immediately after calling this function, before the return value is even read.
true
if the concurrent container is empty, false
otherwise.
|
inline |
Returns an iterator pointing to the location succeeding the last element in the concurrent container. This method is concurrency safe.
|
inline |
Returns a const_iterator pointing to the location succeeding the last element in the concurrent container. This method is concurrency safe.
|
inline |
Finds a range that matches a specified key. This function is concurrency safe.
_Keyval | The key value to search for. |
It is possible for concurrent inserts to cause additional keys to be inserted after the begin iterator and before the end iterator.
|
inline |
Finds a range that matches a specified key. This function is concurrency safe.
_Keyval | The key value to search for. |
It is possible for concurrent inserts to cause additional keys to be inserted after the begin iterator and before the end iterator.
|
inline |
Finds an element that matches a specified key. This function is concurrency safe.
_Keyval | The key value to search for. |
end()
if no such element exists.
|
inline |
Finds an element that matches a specified key. This function is concurrency safe.
_Keyval | The key value to search for. |
end()
if no such element exists.
|
inline |
Returns the stored allocator object for this concurrent container. This method is concurrency safe.
|
inline |
Computes and returns the current load factor of the container. The load factor is the number of elements in the container divided by the number of buckets.
|
inline |
Gets or sets the maximum load factor of the container. The maximum load factor is the largest number of elements than can be in any bucket before the container grows its internal table.
|
inline |
Gets or sets the maximum load factor of the container. The maximum load factor is the largest number of elements than can be in any bucket before the container grows its internal table.
|
inline |
Returns the maximum size of the concurrent container, determined by the allocator. This method is concurrency safe.
This upper bound value may actually be higher than what the container can actually hold.
|
inline |
|
inline |
|
inline |
Rebuilds the hash table.
_Buckets | The desired number of buckets. |
The member function alters the number of buckets to be at least _Buckets and rebuilds the hash table as needed. The number of buckets must be a power of 2. If not a power of 2, it will be rounded up to the next largest power of 2.
It throws an out_of_range exception if the number of buckets is invalid (either 0 or greater than the maximum number of buckets).
|
inline |
Returns the number of elements in this concurrent container. This method is concurrency safe.
In the presence of concurrent inserts, the number of elements in the concurrent container may change immediately after calling this function, before the return value is even read.
|
inline |
Swaps the contents of two concurrent containers. This function is not concurrency safe.
_Right | The container to swap elements from. |
The member function throws an invalid_argument exception if the swap is being performed on unequal allocators.
|
inline |
Returns an iterator to the first element in this container for a specific bucket.
_Bucket | The bucket index. |
|
inline |
Returns an iterator to the first element in this container for a specific bucket.
_Bucket | The bucket index. |
|
inline |
Returns the bucket index that a specific key maps to in this container.
_Keyval | The element key being searched for. |
|
inline |
Returns the current number of buckets in this container.
|
inline |
Returns the number of items in a specific bucket of this container.
_Bucket | The bucket to search for. |
|
inline |
Returns an iterator to the first element in this container for a specific bucket.
_Bucket | The bucket index. |
|
inline |
Returns an iterator to the first element in this container for a specific bucket.
_Bucket | The bucket index. |
|
inline |
Returns an iterator to the last element in this container for a specific bucket.
_Bucket | The bucket index. |
|
inline |
Returns an iterator to the last element in this container for a specific bucket.
_Bucket | The bucket index. |
|
inline |
Removes elements from the container at specified positions. This method is not concurrency-safe.
_Where | The iterator position to erase from. |
The first member function removes the element of the controlled sequence pointed to by _Where . The second member function removes the elements in the range [_First , _Last ).
The third member function removes the elements in the range delimited by equal_range(_Keyval )
.
|
inline |
Removes elements from the container at specified positions. This method is not concurrency-safe.
_First | The position of the first element in the range of elements to be erased. |
_Last | The position of the first element beyond the range of elements to be erased. |
The first member function removes the element of the controlled sequence pointed to by _Where . The second member function removes the elements in the range [_First , _Last ).
The third member function removes the elements in the range delimited by equal_range(_Keyval )
.
|
inline |
Removes elements from the container at specified positions. This method is not concurrency-safe.
_Keyval | The key value to erase. |
The first member function removes the element of the controlled sequence pointed to by _Where . The second member function removes the elements in the range [_First , _Last ).
The third member function removes the elements in the range delimited by equal_range(_Keyval )
.
|
inline |
Returns the maximum number of buckets in this container.
|
static |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |