Pivotal GemFire Native Client Cache Reference  9.0.6
gemfire::HashMapOfSharedBase Class Reference

Represents a HashMap of SharedBase More...

Data Structures

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

Public Member Functions

Iterator begin () const
 Get an iterator pointing to the start of hash_map. More...
 
int32_t bucket_count () const
 Returns the number of buckets used by the hash_map. 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_map. 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_map's size is 0. More...
 
Iterator end () const
 Get an iterator pointing to the end of hash_map. More...
 
int32_t erase (const SharedBasePtr &k)
 Erases the element whose key is k. More...
 
Iterator find (const SharedBasePtr &k) const
 Finds an element whose key is k. More...
 
 HashMapOfSharedBase (const Hasher h, const EqualTo k)
 Creates an empty hash_map using h as the hash function and k as the key equal function. More...
 
 HashMapOfSharedBase (int32_t n, const Hasher h, const EqualTo k)
 Creates an empty hash_map with at least n buckets, using h as the hash function and k as the key equal function. More...
 
 HashMapOfSharedBase (const HashMapOfSharedBase &other)
 Copy constructor. More...
 
bool insert (const SharedBasePtr &k, const SharedBasePtr &v)
 Inserts the <k, v> pair into the hash_map, when k does not exist in the hash_map. More...
 
int32_t max_size () const
 Returns the largest possible size of the hash_map. More...
 
HashMapOfSharedBaseoperator= (const HashMapOfSharedBase &other)
 Assignment operator. More...
 
SharedBasePtroperator[] (const SharedBasePtr &k)
 Returns a reference to the object that is associated with a particular key. 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_map. More...
 
void swap (HashMapOfSharedBase &other)
 Swaps the contents of two hash_maps. More...
 
 ~HashMapOfSharedBase ()
 Destructor, sets all SharedPtr elements to NULLPTR. More...
 

Detailed Description

Represents a HashMap of SharedBase

Constructor & Destructor Documentation

gemfire::HashMapOfSharedBase::HashMapOfSharedBase ( const Hasher  h,
const EqualTo  k 
)

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

gemfire::HashMapOfSharedBase::HashMapOfSharedBase ( int32_t  n,
const Hasher  h,
const EqualTo  k 
)

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

gemfire::HashMapOfSharedBase::HashMapOfSharedBase ( const HashMapOfSharedBase other)

Copy constructor.

gemfire::HashMapOfSharedBase::~HashMapOfSharedBase ( )

Destructor, sets all SharedPtr elements to NULLPTR.

Member Function Documentation

Iterator gemfire::HashMapOfSharedBase::begin ( ) const

Get an iterator pointing to the start of hash_map.

int32_t gemfire::HashMapOfSharedBase::bucket_count ( ) const

Returns the number of buckets used by the hash_map.

void gemfire::HashMapOfSharedBase::clear ( )

Erases all of the elements.

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

Check if a given key k exists in the hash_map.

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

Counts the number of elements whose key is k.

bool gemfire::HashMapOfSharedBase::empty ( ) const

true if the hash_map's size is 0.

Iterator gemfire::HashMapOfSharedBase::end ( ) const

Get an iterator pointing to the end of hash_map.

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

Erases the element whose key is k.

Iterator gemfire::HashMapOfSharedBase::find ( const SharedBasePtr k) const

Finds an element whose key is k.

bool gemfire::HashMapOfSharedBase::insert ( const SharedBasePtr k,
const SharedBasePtr v 
)

Inserts the <k, v> pair into the hash_map, when k does not exist in the hash_map.

int32_t gemfire::HashMapOfSharedBase::max_size ( ) const

Returns the largest possible size of the hash_map.

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

Assignment operator.

SharedBasePtr& gemfire::HashMapOfSharedBase::operator[] ( const SharedBasePtr k)

Returns a reference to the object that is associated with a particular key.

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

Increases the bucket count to at least n.

int32_t gemfire::HashMapOfSharedBase::size ( ) const

Returns the size of the hash_map.

void gemfire::HashMapOfSharedBase::swap ( HashMapOfSharedBase other)

Swaps the contents of two hash_maps.


GemFire C++ Cache API Documentation