growable_vector< T > Class Template Reference

A simple growable vector template. More...

#include <growable_vector.h>

Inheritance diagram for growable_vector< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::vector< T > container_type
typedef container_type::size_type size_type

Public Member Functions

operator[] (size_type index) const
 Index into the vector for a value.
T & operator[] (size_type index)
 Index into the vector for a value.
growable_vector< T > & operator+= (growable_vector< T > const &rhs)
 vectorized += operator
growable_vector< T > & operator-= (growable_vector< T > const &rhs)
 vectorized -= operator, overflow shouldn't occur during substraction (iow: for each components lhs[i] >= rhs[i]
size_type size () const
 return current size of vector
void fill (size_type size, T const &value)
 fill container with given value
bool zero () const
 return true if all elements have the default constructed value

Detailed Description

template<typename T>
class growable_vector< T >

A simple growable vector template.


Member Typedef Documentation

template<typename T>
typedef std::vector<T> growable_vector< T >::container_type
template<typename T>
typedef container_type::size_type growable_vector< T >::size_type

Member Function Documentation

template<typename T>
void growable_vector< T >::fill ( size_type  size,
T const &  value 
) [inline]

fill container with given value

template<typename T>
growable_vector<T>& growable_vector< T >::operator+= ( growable_vector< T > const &  rhs  )  [inline]

vectorized += operator

template<typename T>
growable_vector<T>& growable_vector< T >::operator-= ( growable_vector< T > const &  rhs  )  [inline]

vectorized -= operator, overflow shouldn't occur during substraction (iow: for each components lhs[i] >= rhs[i]

template<typename T>
T& growable_vector< T >::operator[] ( size_type  index  )  [inline]

Index into the vector for a value.

If the index is larger than the current max index, the array is expanded, default-filling any intermediary gaps.

template<typename T>
T growable_vector< T >::operator[] ( size_type  index  )  const [inline]

Index into the vector for a value.

An out of bounds index will return a default-constructed value.

template<typename T>
size_type growable_vector< T >::size (  )  const [inline]

return current size of vector

template<typename T>
bool growable_vector< T >::zero (  )  const [inline]

return true if all elements have the default constructed value


The documentation for this class was generated from the following file:

Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1