VMware GemFire Native C++ Reference  9.1
apache::geode::client::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

apache::geode::client::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.

apache::geode::client::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.

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

Copy constructor.

apache::geode::client::HashMapOfSharedBase::~HashMapOfSharedBase ( )

Destructor, sets all SharedPtr elements to NULLPTR.

Member Function Documentation

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

Get an iterator pointing to the start of hash_map.

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

Returns the number of buckets used by the hash_map.

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

Erases all of the elements.

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

Check if a given key k exists in the hash_map.

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

Counts the number of elements whose key is k.

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

true if the hash_map's size is 0.

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

Get an iterator pointing to the end of hash_map.

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

Erases the element whose key is k.

Iterator apache::geode::client::HashMapOfSharedBase::find ( const SharedBasePtr k) const

Finds an element whose key is k.

bool apache::geode::client::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 apache::geode::client::HashMapOfSharedBase::max_size ( ) const

Returns the largest possible size of the hash_map.

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

Assignment operator.

SharedBasePtr& apache::geode::client::HashMapOfSharedBase::operator[] ( const SharedBasePtr k)

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

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

Increases the bucket count to at least n.

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

Returns the size of the hash_map.

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

Swaps the contents of two hash_maps.


Pivotal GemFire C++ Cache API Documentation