Pivotal GemFire Native Client Cache Reference  9.0.6
gemfire::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

gemfire::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.

gemfire::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.

gemfire::HashSetOfSharedBase::HashSetOfSharedBase ( const HashSetOfSharedBase other)

Copy constructor.

gemfire::HashSetOfSharedBase::~HashSetOfSharedBase ( )

Destructor, sets all SharedPtr elements to NULLPTR.

Member Function Documentation

Iterator gemfire::HashSetOfSharedBase::begin ( ) const

Get an iterator pointing to the start of hash_set.

int32_t gemfire::HashSetOfSharedBase::bucket_count ( ) const

Returns the number of buckets used by the hash_set.

void gemfire::HashSetOfSharedBase::clear ( )

Erases all of the elements.

bool gemfire::HashSetOfSharedBase::contains ( const SharedBasePtr k) const

Check if a given key k exists in the hash_set.

int32_t gemfire::HashSetOfSharedBase::count ( const SharedBasePtr k) const

Counts the number of elements whose key is k.

bool gemfire::HashSetOfSharedBase::empty ( ) const

true if the hash_set's size is 0.

Iterator gemfire::HashSetOfSharedBase::end ( ) const

Get an iterator pointing to the end of hash_set.

int32_t gemfire::HashSetOfSharedBase::erase ( const SharedBasePtr k)

Erases the element whose key is k.

bool gemfire::HashSetOfSharedBase::insert ( const SharedBasePtr k)

Inserts the key k into the hash_set.

int32_t gemfire::HashSetOfSharedBase::max_size ( ) const

Returns the largest possible size of the hash_set.

HashSetOfSharedBase& gemfire::HashSetOfSharedBase::operator= ( const HashSetOfSharedBase other)

Assignment operator.

void gemfire::HashSetOfSharedBase::resize ( int32_t  n)

Increases the bucket count to at least n.

int32_t gemfire::HashSetOfSharedBase::size ( ) const

Returns the size of the hash_set.

void gemfire::HashSetOfSharedBase::swap ( HashSetOfSharedBase other)

Swaps the contents of two hash_sets.


GemFire C++ Cache API Documentation