VMware GemFire Native C++ Reference  9.1
apache::geode::client::HashSetOfSharedBase Class Reference

Represents a HashSet of SharedBase More...

Data Structures

class  Iterator
 Interface of an iterator for HashSetOfSharedBase. 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 SharedBasePtr &k) const
 Check if a given key k exists in the hash_set. More...
 
int32_t count (const SharedBasePtr &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 SharedBasePtr &k)
 Erases the element whose key is k. More...
 
 HashSetOfSharedBase (const Hasher h, const EqualTo k)
 Creates an empty hash_set using h as the hash function and k as the key equal function. More...
 
 HashSetOfSharedBase (int32_t n, const Hasher h, const EqualTo k)
 Creates an empty hash_set with at least n buckets, using h as the hash function and k as the key equal function. More...
 
 HashSetOfSharedBase (const HashSetOfSharedBase &other)
 Copy constructor. More...
 
bool insert (const SharedBasePtr &k)
 Inserts the key k into the hash_set. More...
 
int32_t max_size () const
 Returns the largest possible size of the hash_set. More...
 
HashSetOfSharedBaseoperator= (const HashSetOfSharedBase &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 (HashSetOfSharedBase &other)
 Swaps the contents of two hash_sets. More...
 
 ~HashSetOfSharedBase ()
 Destructor, sets all SharedPtr elements to NULLPTR. More...
 

Detailed Description

Represents a HashSet of SharedBase

Constructor & Destructor Documentation

apache::geode::client::HashSetOfSharedBase::HashSetOfSharedBase ( const Hasher  h,
const EqualTo  k 
)

Creates an empty hash_set using h as the hash function and k as the key equal function.

apache::geode::client::HashSetOfSharedBase::HashSetOfSharedBase ( int32_t  n,
const Hasher  h,
const EqualTo  k 
)

Creates an empty hash_set with at least n buckets, using h as the hash function and k as the key equal function.

apache::geode::client::HashSetOfSharedBase::HashSetOfSharedBase ( const HashSetOfSharedBase other)

Copy constructor.

apache::geode::client::HashSetOfSharedBase::~HashSetOfSharedBase ( )

Destructor, sets all SharedPtr elements to NULLPTR.

Member Function Documentation

Iterator apache::geode::client::HashSetOfSharedBase::begin ( ) const

Get an iterator pointing to the start of hash_set.

int32_t apache::geode::client::HashSetOfSharedBase::bucket_count ( ) const

Returns the number of buckets used by the hash_set.

void apache::geode::client::HashSetOfSharedBase::clear ( )

Erases all of the elements.

bool apache::geode::client::HashSetOfSharedBase::contains ( const SharedBasePtr k) const

Check if a given key k exists in the hash_set.

int32_t apache::geode::client::HashSetOfSharedBase::count ( const SharedBasePtr k) const

Counts the number of elements whose key is k.

bool apache::geode::client::HashSetOfSharedBase::empty ( ) const

true if the hash_set's size is 0.

Iterator apache::geode::client::HashSetOfSharedBase::end ( ) const

Get an iterator pointing to the end of hash_set.

int32_t apache::geode::client::HashSetOfSharedBase::erase ( const SharedBasePtr k)

Erases the element whose key is k.

bool apache::geode::client::HashSetOfSharedBase::insert ( const SharedBasePtr k)

Inserts the key k into the hash_set.

int32_t apache::geode::client::HashSetOfSharedBase::max_size ( ) const

Returns the largest possible size of the hash_set.

HashSetOfSharedBase& apache::geode::client::HashSetOfSharedBase::operator= ( const HashSetOfSharedBase other)

Assignment operator.

void apache::geode::client::HashSetOfSharedBase::resize ( int32_t  n)

Increases the bucket count to at least n.

int32_t apache::geode::client::HashSetOfSharedBase::size ( ) const

Returns the size of the hash_set.

void apache::geode::client::HashSetOfSharedBase::swap ( HashSetOfSharedBase other)

Swaps the contents of two hash_sets.


Pivotal GemFire C++ Cache API Documentation