All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STL-like API

Typedefs

typedef PointerIterator
< ElementType > 
iterator
 Iterator type. More...
 
typedef PointerIterator< const
ElementType > 
const_iterator
 Const iterator type. More...
 
typedef
boost::reverse_iterator
< iterator > 
reverse_iterator
 Reverse iterator type. More...
 
typedef
boost::reverse_iterator
< const_iterator > 
const_reverse_iterator
 Reverse const iterator type. More...
 
typedef PointerIterator
< ElementType >::reference 
reference
 Reference type. More...
 
typedef PointerIterator< const
ElementType >::reference 
const_reference
 Const reference type. More...
 
typedef PointerIterator
< ElementType >::pointer 
pointer
 Pointer type. More...
 
typedef PointerIterator< const
ElementType >::pointer 
const_pointer
 Const pointer type. More...
 

Functions

iterator begin ()
 Return a non-const iterator to the start of the array. More...
 
iterator end ()
 Returns a non-const iterator to the end of the array. More...
 
const_iterator begin () const
 Return a const iterator to the start of the array. More...
 
const_iterator end () const
 Return a const iterator to the end of the array. More...
 
const_iterator cbegin () const
 Return a const iterator to the start of the array. More...
 
const_iterator cend () const
 Return a const iterator to the end of the array. More...
 
reverse_iterator rbegin ()
 Return a non-const reverse iterator to the end of the array. More...
 
reverse_iterator rend ()
 Return a reverse iterator to the start of the array. More...
 
const_reverse_iterator rbegin () const
 Return a const reverse iterator to the end of the array. More...
 
const_reverse_iterator rend () const
 Return a const reverse iterator to the start of the array. More...
 
const_reverse_iterator crbegin () const
 Return a const reverse iterator to the end of the array. More...
 
const_reverse_iterator crend () const
 Return a const reverse iterator to the start of the array. More...
 
pointer data ()
 Return a non-const pointer to this array's data. More...
 
const_pointer data () const
 Return a const pointer to this array's data. More...
 
const_pointer cdata () const
 Return a const pointer to the data held by this array. More...
 
void push_back (ElementType const &elem)
 Append an element to array. More...
 
void pop_back ()
 Remove the last element of an array. More...
 
size_t size () const
 Return the total number of elements in this array. More...
 
size_t capacity () const
 Return the number of items this container can grow to hold without triggering a (re)allocation. More...
 
bool empty () const
 Return true if this array contains no elements, false otherwise. More...
 
void reserve (size_t num)
 Ensure enough memory is allocated to hold num elements. More...
 
reference front ()
 Return a non-const reference to the first element in this array. More...
 
const_reference front () const
 Return a const reference to the first element in this array. More...
 
reference back ()
 Return a reference to the last element in this array. More...
 
const_reference back () const
 Return a const reference to the last element in this array. More...
 
void resize (size_t newSize)
 Resize this array. More...
 
void clear ()
 Equivalent to resize(0). More...
 
template<class ForwardIter >
void assign (ForwardIter first, ForwardIter last)
 Assign array contents. More...
 
void assign (size_t n, const value_type &fill)
 Assign array contents. More...
 
void assign (std::initializer_list< ELEM > initializerList)
 Assign array contents via intializer list Equivalent to: More...
 
void swap (VtArray &other)
 Swap the contents of this array with other. More...
 

Detailed Description

Typedef Documentation

typedef PointerIterator<const ElementType> const_iterator

Const iterator type.

Definition at line 223 of file array.h.

typedef PointerIterator<const ElementType>::pointer const_pointer

Const pointer type.

Definition at line 238 of file array.h.

typedef PointerIterator<const ElementType>::reference const_reference

Const reference type.

Definition at line 234 of file array.h.

typedef boost::reverse_iterator<const_iterator> const_reverse_iterator

Reverse const iterator type.

Definition at line 227 of file array.h.

typedef PointerIterator<ElementType> iterator

Iterator type.

Definition at line 221 of file array.h.

typedef PointerIterator<ElementType>::pointer pointer

Pointer type.

Definition at line 236 of file array.h.

typedef PointerIterator<ElementType>::reference reference

Reference type.

Definition at line 231 of file array.h.

typedef boost::reverse_iterator<iterator> reverse_iterator

Reverse iterator type.

Definition at line 225 of file array.h.

Function Documentation

void assign ( ForwardIter  first,
ForwardIter  last 
)
inline

Assign array contents.

Equivalent to:

* array.resize(std::distance(first, last));
* std::copy(first, last, array.begin());
*

Definition at line 559 of file array.h.

void assign ( size_t  n,
const value_type &  fill 
)
inline

Assign array contents.

Equivalent to:

* array.resize(n);
* std::fill(array.begin(), array.end(), fill);
*

Definition at line 570 of file array.h.

void assign ( std::initializer_list< ELEM >  initializerList)
inline

Assign array contents via intializer list Equivalent to:

* array.assign(list.begin(), list.end());
*

Definition at line 580 of file array.h.

reference back ( )
inline

Return a reference to the last element in this array.

The underlying data is copied if it is not uniquely owned. Invokes undefined behavior if the array is empty.

Definition at line 471 of file array.h.

const_reference back ( ) const
inline

Return a const reference to the last element in this array.

Invokes undefined behavior if the array is empty.

Definition at line 474 of file array.h.

iterator begin ( )
inline

Return a non-const iterator to the start of the array.

The underlying data is copied if it is not uniquely owned.

Definition at line 345 of file array.h.

const_iterator begin ( ) const
inline

Return a const iterator to the start of the array.

Definition at line 351 of file array.h.

size_t capacity ( ) const
inline

Return the number of items this container can grow to hold without triggering a (re)allocation.

Note that if the underlying data is not uniquely owned, a reallocation can occur upon object insertion even if there is remaining capacity.

Definition at line 434 of file array.h.

const_iterator cbegin ( ) const
inline

Return a const iterator to the start of the array.

Definition at line 356 of file array.h.

const_pointer cdata ( ) const
inline

Return a const pointer to the data held by this array.

Definition at line 387 of file array.h.

const_iterator cend ( ) const
inline

Return a const iterator to the end of the array.

Definition at line 358 of file array.h.

void clear ( )
inline

Equivalent to resize(0).

Definition at line 536 of file array.h.

const_reverse_iterator crbegin ( ) const
inline

Return a const reverse iterator to the end of the array.

Definition at line 377 of file array.h.

const_reverse_iterator crend ( ) const
inline

Return a const reverse iterator to the start of the array.

Definition at line 379 of file array.h.

pointer data ( )
inline

Return a non-const pointer to this array's data.

The underlying data is copied if it is not uniquely owned.

Definition at line 383 of file array.h.

const_pointer data ( ) const
inline

Return a const pointer to this array's data.

Definition at line 385 of file array.h.

bool empty ( ) const
inline

Return true if this array contains no elements, false otherwise.

Definition at line 444 of file array.h.

iterator end ( )
inline

Returns a non-const iterator to the end of the array.

The underlying data is copied if it is not uniquely owned.

Definition at line 348 of file array.h.

const_iterator end ( ) const
inline

Return a const iterator to the end of the array.

Definition at line 353 of file array.h.

reference front ( )
inline

Return a non-const reference to the first element in this array.

The underlying data is copied if it is not uniquely owned. Invokes undefined behavior if the array is empty.

Definition at line 463 of file array.h.

const_reference front ( ) const
inline

Return a const reference to the first element in this array.

Invokes undefined behavior if the array is empty.

Definition at line 466 of file array.h.

void pop_back ( )
inline

Remove the last element of an array.

The underlying data is first copied if it is not uniquely owned.

Definition at line 414 of file array.h.

void push_back ( ElementType const &  elem)
inline

Append an element to array.

The underlying data is first copied if it is not uniquely owned.

Definition at line 391 of file array.h.

reverse_iterator rbegin ( )
inline

Return a non-const reverse iterator to the end of the array.

The underlying data is copied if it is not uniquely owned.

Definition at line 362 of file array.h.

const_reverse_iterator rbegin ( ) const
inline

Return a const reverse iterator to the end of the array.

Definition at line 368 of file array.h.

reverse_iterator rend ( )
inline

Return a reverse iterator to the start of the array.

The underlying data is copied if it is not uniquely owned.

Definition at line 365 of file array.h.

const_reverse_iterator rend ( ) const
inline

Return a const reverse iterator to the start of the array.

Definition at line 372 of file array.h.

void reserve ( size_t  num)
inline

Ensure enough memory is allocated to hold num elements.

Note that this currently does not ensure that the underlying data is uniquely owned. If that is desired, invoke a method like data() first.

Definition at line 449 of file array.h.

void resize ( size_t  newSize)
inline

Resize this array.

Preserve existing elements that remain, value-initialize any newly added elements. For example, calling resize(10) on an array of size 5 would change the size to 10, the first 5 elements would be left unchanged and the last 5 elements would be value-initialized.

Definition at line 481 of file array.h.

size_t size ( ) const
inline

Return the total number of elements in this array.

Definition at line 428 of file array.h.

void swap ( VtArray< ELEM > &  other)
inline

Swap the contents of this array with other.

Definition at line 585 of file array.h.