gemfire::HashSetOfSharedBase Class Reference


Detailed Description

Represents a HashSet of SharedBase.

Public Member Functions

Iterator begin () const
 Get an iterator pointing to the start of hash_set.
int32_t bucket_count () const
 Returns the number of buckets used by the hash_set.
void clear ()
 Erases all of the elements.
bool contains (const SharedBasePtr &k) const
 Check if a given key k exists in the hash_set.
int32_t count (const SharedBasePtr &k) const
 Counts the number of elements whose key is k.
bool empty () const
 true if the hash_set's size is 0.
Iterator end () const
 Get an iterator pointing to the end of hash_set.
int32_t erase (const SharedBasePtr &k)
 Erases the element whose key is k.
 HashSetOfSharedBase (const HashSetOfSharedBase &other)
 Copy constructor.
 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.
 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.
bool insert (const SharedBasePtr &k)
 Inserts the key k into the hash_set.
int32_t max_size () const
 Returns the largest possible size of the hash_set.
HashSetOfSharedBaseoperator= (const HashSetOfSharedBase &other)
 Assignment operator.
void resize (int32_t n)
 Increases the bucket count to at least n.
int32_t size () const
 Returns the size of the hash_set.
void swap (HashSetOfSharedBase &other)
 Swaps the contents of two hash_sets.
 ~HashSetOfSharedBase ()
 Destructor, sets all SharedPtr elements to NULLPTR.

Data Structures

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

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