VMware GemFire Native C++ Reference  9.1
apache::geode::client::HashSetT< TKEY > Class Template Reference

HashSet of TKEY. More...

Inherited by apache::geode::client::HashSetOfCacheableKey.

Data Structures

class  Iterator
 Interface of an iterator for HashSetT. More...
 

Public Member Functions

Iterator begin () const
 Get an iterator pointing to the start of hash_set. More...
 
int32_t bucket_count () const
 Returns the number of buckets used by the hash set. More...
 
void clear ()
 Erases all of the elements. More...
 
bool contains (const TKEY &k) const
 Check if a given key k exists in the hash set. More...
 
int32_t count (const TKEY &k) const
 Counts the number of elements whose key is k. More...
 
bool empty () const
 true if the hash set's size is 0. More...
 
Iterator end () const
 Get an iterator pointing to the end of hash_set. More...
 
int32_t erase (const TKEY &k)
 Erases the element whose key is k. More...
 
 HashSetT ()
 Creates an empty hash set with hash function hasher<TKEY> and equal to function equal_to<TKEY>. More...
 
 HashSetT (int32_t n)
 Creates an empty hash set with at least n buckets and hash function hasher<TKEY> and equal to function equal_to<TKEY>. More...
 
 HashSetT (const HashSetT &other)
 Copy constructor. More...
 
bool insert (const TKEY &k)
 Inserts the key k into the hash set, when k does not exist in the hash set. More...
 
int32_t max_size () const
 Returns the largest possible size of the hash set. More...
 
HashSetToperator= (const HashSetT &other)
 Assignment operator. More...
 
void resize (int32_t n)
 Increases the bucket count to at least n. More...
 
int32_t size () const
 Returns the size of the hash set. More...
 
void swap (HashSetT &other)
 Swaps the contents of two hash sets. More...
 
 ~HashSetT ()
 Destructor: the destructor of m_set would do required stuff. More...
 

Detailed Description

template<typename TKEY>
class apache::geode::client::HashSetT< TKEY >

HashSet of TKEY.

Constructor & Destructor Documentation

template<typename TKEY >
apache::geode::client::HashSetT< TKEY >::HashSetT ( )
inline

Creates an empty hash set with hash function hasher<TKEY> and equal to function equal_to<TKEY>.

template<typename TKEY >
apache::geode::client::HashSetT< TKEY >::HashSetT ( int32_t  n)
inline

Creates an empty hash set with at least n buckets and hash function hasher<TKEY> and equal to function equal_to<TKEY>.

template<typename TKEY >
apache::geode::client::HashSetT< TKEY >::HashSetT ( const HashSetT< TKEY > &  other)
inline

Copy constructor.

template<typename TKEY >
apache::geode::client::HashSetT< TKEY >::~HashSetT ( )
inline

Destructor: the destructor of m_set would do required stuff.

Member Function Documentation

template<typename TKEY >
Iterator apache::geode::client::HashSetT< TKEY >::begin ( ) const
inline

Get an iterator pointing to the start of hash_set.

template<typename TKEY >
int32_t apache::geode::client::HashSetT< TKEY >::bucket_count ( ) const
inline

Returns the number of buckets used by the hash set.

template<typename TKEY >
void apache::geode::client::HashSetT< TKEY >::clear ( )
inline

Erases all of the elements.

template<typename TKEY >
bool apache::geode::client::HashSetT< TKEY >::contains ( const TKEY &  k) const
inline

Check if a given key k exists in the hash set.

template<typename TKEY >
int32_t apache::geode::client::HashSetT< TKEY >::count ( const TKEY &  k) const
inline

Counts the number of elements whose key is k.

template<typename TKEY >
bool apache::geode::client::HashSetT< TKEY >::empty ( ) const
inline

true if the hash set's size is 0.

template<typename TKEY >
Iterator apache::geode::client::HashSetT< TKEY >::end ( ) const
inline

Get an iterator pointing to the end of hash_set.

template<typename TKEY >
int32_t apache::geode::client::HashSetT< TKEY >::erase ( const TKEY &  k)
inline

Erases the element whose key is k.

template<typename TKEY >
bool apache::geode::client::HashSetT< TKEY >::insert ( const TKEY &  k)
inline

Inserts the key k into the hash set, when k does not exist in the hash set.

template<typename TKEY >
int32_t apache::geode::client::HashSetT< TKEY >::max_size ( ) const
inline

Returns the largest possible size of the hash set.

template<typename TKEY >
HashSetT& apache::geode::client::HashSetT< TKEY >::operator= ( const HashSetT< TKEY > &  other)
inline

Assignment operator.

template<typename TKEY >
void apache::geode::client::HashSetT< TKEY >::resize ( int32_t  n)
inline

Increases the bucket count to at least n.

template<typename TKEY >
int32_t apache::geode::client::HashSetT< TKEY >::size ( ) const
inline

Returns the size of the hash set.

template<typename TKEY >
void apache::geode::client::HashSetT< TKEY >::swap ( HashSetT< TKEY > &  other)
inline

Swaps the contents of two hash sets.


Pivotal GemFire C++ Cache API Documentation