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

A vector of Cacheable objects that also extends SharedBase for smart pointers. More...

Inherits apache::geode::client::VectorT< PTR_TYPE >, and apache::geode::client::SharedBase.

Public Types

typedef _VectorOfCacheable::Iterator Iterator
 Iterator class for the vector. More...
 

Public Member Functions

PTR_TYPE at (int32_t n)
 Return the n'th element with bounds checking. More...
 
const PTR_TYPE at (int32_t n) const
 Return the n'th element with bounds checking. More...
 
PTR_TYPE back ()
 returns the last element. More...
 
const PTR_TYPE back () const
 returns the last element. More...
 
Iterator begin () const
 Get an iterator pointing to the start of vector. More...
 
int32_t capacity () const
 return the number of elements allocated for this vector. More...
 
void clear ()
 erases all elements. More...
 
bool empty () const
 return true if the vector's size is 0. More...
 
Iterator end () const
 Get an iterator pointing to the end of vector. More...
 
void erase (int32_t index)
 Removes the object at the specified index from a vector. More...
 
PTR_TYPE front ()
 returns the first element. More...
 
const PTR_TYPE front () const
 returns the first element. More...
 
void insert (int32_t index, const PTR_TYPE &t)
 insert object at the given position. More...
 
int32_t length () const
 synonym for size. More...
 
int32_t max_size () const
 return the largest possible size of the vector. More...
 
PTR_TYPE operator[] (int32_t n)
 Return the n'th element. More...
 
const PTR_TYPE operator[] (int32_t n) const
 Return the n'th element. More...
 
void pop_back ()
 removes the last element. More...
 
void preserveSB () const
 Atomically increment reference count. More...
 
void push_back (const PTR_TYPE &e)
 insert a new element at the end. More...
 
int32_t refCount ()
 
void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. More...
 
void reserve (int32_t n)
 reallocate a vector to hold n elements. More...
 
void resize (int32_t n, const PTR_TYPE &t=::apache::geode::client::NullSharedBase::s_instancePtr)
 inserts or erases elements at the end such that size becomes n. More...
 
int32_t size () const
 return the size of the vector. More...
 
void swap (VectorT &other)
 swaps the contents of two vectors. More...
 
 VectorOfCacheable ()
 Create an empty vector. More...
 
 VectorOfCacheable (int32_t n)
 Create a vector with n elements allocated. More...
 
 VectorOfCacheable (int32_t n, const CacheablePtr &t)
 Create a vector with n copies of t. More...
 
 VectorOfCacheable (const VectorOfCacheable &other)
 Copy constructor. More...
 

Detailed Description

A vector of Cacheable objects that also extends SharedBase for smart pointers.

Member Typedef Documentation

Constructor & Destructor Documentation

apache::geode::client::VectorOfCacheable::VectorOfCacheable ( )
inline

Create an empty vector.

apache::geode::client::VectorOfCacheable::VectorOfCacheable ( int32_t  n)
inline

Create a vector with n elements allocated.

apache::geode::client::VectorOfCacheable::VectorOfCacheable ( int32_t  n,
const CacheablePtr t 
)
inline

Create a vector with n copies of t.

apache::geode::client::VectorOfCacheable::VectorOfCacheable ( const VectorOfCacheable other)
inline

Copy constructor.

Member Function Documentation

template<class PTR_TYPE>
PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::at ( int32_t  n)
inlineinherited

Return the n'th element with bounds checking.

template<class PTR_TYPE>
const PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::at ( int32_t  n) const
inlineinherited

Return the n'th element with bounds checking.

template<class PTR_TYPE>
PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::back ( )
inlineinherited

returns the last element.

template<class PTR_TYPE>
const PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::back ( ) const
inlineinherited

returns the last element.

template<class PTR_TYPE>
Iterator apache::geode::client::VectorT< PTR_TYPE >::begin ( ) const
inlineinherited

Get an iterator pointing to the start of vector.

template<class PTR_TYPE>
int32_t apache::geode::client::VectorT< PTR_TYPE >::capacity ( ) const
inlineinherited

return the number of elements allocated for this vector.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::clear ( )
inlineinherited

erases all elements.

template<class PTR_TYPE>
bool apache::geode::client::VectorT< PTR_TYPE >::empty ( ) const
inlineinherited

return true if the vector's size is 0.

template<class PTR_TYPE>
Iterator apache::geode::client::VectorT< PTR_TYPE >::end ( ) const
inlineinherited

Get an iterator pointing to the end of vector.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::erase ( int32_t  index)
inlineinherited

Removes the object at the specified index from a vector.

template<class PTR_TYPE>
PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::front ( )
inlineinherited

returns the first element.

template<class PTR_TYPE>
const PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::front ( ) const
inlineinherited

returns the first element.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::insert ( int32_t  index,
const PTR_TYPE &  t 
)
inlineinherited

insert object at the given position.

template<class PTR_TYPE>
int32_t apache::geode::client::VectorT< PTR_TYPE >::length ( ) const
inlineinherited

synonym for size.

template<class PTR_TYPE>
int32_t apache::geode::client::VectorT< PTR_TYPE >::max_size ( ) const
inlineinherited

return the largest possible size of the vector.

template<class PTR_TYPE>
PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::operator[] ( int32_t  n)
inlineinherited

Return the n'th element.

template<class PTR_TYPE>
const PTR_TYPE apache::geode::client::VectorT< PTR_TYPE >::operator[] ( int32_t  n) const
inlineinherited

Return the n'th element.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::pop_back ( )
inlineinherited

removes the last element.

void apache::geode::client::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::push_back ( const PTR_TYPE &  e)
inlineinherited

insert a new element at the end.

int32_t apache::geode::client::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void apache::geode::client::SharedBase::releaseSB ( ) const
inherited

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::reserve ( int32_t  n)
inlineinherited

reallocate a vector to hold n elements.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::resize ( int32_t  n,
const PTR_TYPE &  t = ::apache::geode::client::NullSharedBase::s_instancePtr 
)
inlineinherited

inserts or erases elements at the end such that size becomes n.

Not to be confused with reserve which simply allocates the space, resize fills the space with active elements.

template<class PTR_TYPE>
int32_t apache::geode::client::VectorT< PTR_TYPE >::size ( ) const
inlineinherited

return the size of the vector.

template<class PTR_TYPE>
void apache::geode::client::VectorT< PTR_TYPE >::swap ( VectorT< PTR_TYPE > &  other)
inlineinherited

swaps the contents of two vectors.


Pivotal GemFire C++ Cache API Documentation