gemfire::VectorOfSharedBase Class Reference


Detailed Description

Represents a vector of gemfire::SharedBasePtr.

Public Member Functions

SharedBasePtrat (int32_t n) const
 Return the n'th element with bounds checking.
SharedBasePtrat (int32_t n)
 Return the n'th element with bounds checking.
const SharedBasePtrback () const
 returns the last element.
SharedBasePtrback ()
 returns the last element.
Iterator begin () const
 Get an iterator pointing to the start of vector.
int32_t capacity () const
 return the number of elements allocated for this vector.
void clear ()
 erases all elements.
bool empty () const
 return true if the vector's size is 0.
Iterator end () const
 Get an iterator pointing to the end of vector.
void erase (int32_t index)
 removes the object at the specified index from a vector
const SharedBasePtrfront () const
 returns the first element.
SharedBasePtrfront ()
 returns the first element.
void insert (int32_t index, const SharedBasePtr &t)
 insert object at the given index.
int32_t max_size () const
 return the largest possible size of the vector.
VectorOfSharedBaseoperator= (const VectorOfSharedBase &other)
 assignment operator
const SharedBasePtroperator[] (int32_t n) const
 Return the n'th element.
SharedBasePtroperator[] (int32_t n)
 Return the n'th element.
void pop_back ()
 removes the last element.
void push_back (const SharedBasePtr &e)
 insert a new element at the end.
void reserve (int32_t n)
 reallocate a vector to hold n elements.
void resize (int32_t n, const SharedBasePtr &t=gemfire::NullSharedBase::s_instancePtr)
 inserts or erases elements at the end such that size becomes n.
int32_t size () const
 return the size of the vector.
void swap (VectorOfSharedBase &other)
 swaps the contents of two vectors.
 VectorOfSharedBase (const VectorOfSharedBase &other)
 copy constructor
 VectorOfSharedBase (int32_t n, const SharedBasePtr &t)
 Create a vector with n copies of t.
 VectorOfSharedBase (int32_t n)
 Create a vector with n elements allocated.
 VectorOfSharedBase ()
 Create an empty vector.
 ~VectorOfSharedBase ()
 destructor, sets all SharedPtr elements to NULLPTR

Data Structures

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

Constructor & Destructor Documentation

gemfire::VectorOfSharedBase::VectorOfSharedBase (  ) 

Create an empty vector.

gemfire::VectorOfSharedBase::VectorOfSharedBase ( int32_t  n  ) 

Create a vector with n elements allocated.

gemfire::VectorOfSharedBase::VectorOfSharedBase ( int32_t  n,
const SharedBasePtr t 
)

Create a vector with n copies of t.

gemfire::VectorOfSharedBase::VectorOfSharedBase ( const VectorOfSharedBase other  ) 

copy constructor

gemfire::VectorOfSharedBase::~VectorOfSharedBase (  ) 

destructor, sets all SharedPtr elements to NULLPTR


Member Function Documentation

SharedBasePtr& gemfire::VectorOfSharedBase::at ( int32_t  n  )  const

Return the n'th element with bounds checking.

SharedBasePtr& gemfire::VectorOfSharedBase::at ( int32_t  n  ) 

Return the n'th element with bounds checking.

const SharedBasePtr& gemfire::VectorOfSharedBase::back (  )  const

returns the last element.

SharedBasePtr& gemfire::VectorOfSharedBase::back (  ) 

returns the last element.

Iterator gemfire::VectorOfSharedBase::begin (  )  const

Get an iterator pointing to the start of vector.

int32_t gemfire::VectorOfSharedBase::capacity (  )  const

return the number of elements allocated for this vector.

void gemfire::VectorOfSharedBase::clear (  ) 

erases all elements.

bool gemfire::VectorOfSharedBase::empty (  )  const

return true if the vector's size is 0.

Iterator gemfire::VectorOfSharedBase::end (  )  const

Get an iterator pointing to the end of vector.

void gemfire::VectorOfSharedBase::erase ( int32_t  index  ) 

removes the object at the specified index from a vector

const SharedBasePtr& gemfire::VectorOfSharedBase::front (  )  const

returns the first element.

SharedBasePtr& gemfire::VectorOfSharedBase::front (  ) 

returns the first element.

void gemfire::VectorOfSharedBase::insert ( int32_t  index,
const SharedBasePtr t 
)

insert object at the given index.

int32_t gemfire::VectorOfSharedBase::max_size (  )  const

return the largest possible size of the vector.

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

assignment operator

const SharedBasePtr& gemfire::VectorOfSharedBase::operator[] ( int32_t  n  )  const

Return the n'th element.

SharedBasePtr& gemfire::VectorOfSharedBase::operator[] ( int32_t  n  ) 

Return the n'th element.

void gemfire::VectorOfSharedBase::pop_back (  ) 

removes the last element.

void gemfire::VectorOfSharedBase::push_back ( const SharedBasePtr e  ) 

insert a new element at the end.

void gemfire::VectorOfSharedBase::reserve ( int32_t  n  ) 

reallocate a vector to hold n elements.

void gemfire::VectorOfSharedBase::resize ( int32_t  n,
const SharedBasePtr t = gemfire::NullSharedBase::s_instancePtr 
)

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.

int32_t gemfire::VectorOfSharedBase::size (  )  const

return the size of the vector.

void gemfire::VectorOfSharedBase::swap ( VectorOfSharedBase other  ) 

swaps the contents of two vectors.


GemFire C++ Cache API Documentation