Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

maxvector< T > Class Template Reference

A back-insertion sequence container with fixed maximum size. More...

#include <maxvector.hpp>

Collaboration diagram for maxvector< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T value_type
typedef T * iterator
typedef const T * const_iterator

Public Member Functions

 maxvector ()
 maxvector (size_t maxsize)
 ~maxvector ()
T &DINLINE operator[] (size_t n)
const T &DINLINE operator[] (size_t n) const
iterator DINLINE begin ()
const_iterator DINLINE begin () const
iterator DINLINE end ()
const_iterator DINLINE end () const
size_t DINLINE size () const
void DINLINE push_back (const T &d)
void DINLINE pop_back ()
bool DINLINE empty () const
T &DINLINE front ()
T &DINLINE back ()
const T &DINLINE back () const
void DINLINE reserve (size_t n)
void DINLINE resize (size_t n, const T &d)
void DINLINE resize (size_t n)
void DINLINE clear ()
iterator DINLINE erase (iterator first, const iterator last)
iterator DINLINE erase (iterator pos)

Private Attributes

T * data
size_t length

Detailed Description

template<class T>
class maxvector< T >

A back-insertion sequence container with fixed maximum size.

It never copies the contents and never checks the boundaries.

The constructors and destructors are not properly called when the size of the vector changes. All elements are constructed and destructed tigether with the container.

reserve(n) reallocates the array to accommodate at most n elements, and preserves min(size(),n) elements of the array.

Definition at line 27 of file maxvector.hpp.


Member Typedef Documentation

template<class T>
typedef const T* maxvector< T >::const_iterator
 

Definition at line 57 of file maxvector.hpp.

template<class T>
typedef T* maxvector< T >::iterator
 

Definition at line 56 of file maxvector.hpp.

template<class T>
typedef T maxvector< T >::value_type
 

Definition at line 32 of file maxvector.hpp.


Constructor & Destructor Documentation

template<class T>
maxvector< T >::maxvector  )  [inline]
 

Definition at line 34 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
maxvector< T >::maxvector size_t  maxsize  )  [inline]
 

Definition at line 39 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
maxvector< T >::~maxvector  )  [inline]
 

Definition at line 44 of file maxvector.hpp.

References maxvector< T >::data.


Member Function Documentation

template<class T>
const T& DINLINE maxvector< T >::back  )  const [inline]
 

Definition at line 108 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
T& DINLINE maxvector< T >::back  )  [inline]
 

Definition at line 104 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
const_iterator DINLINE maxvector< T >::begin  )  const [inline]
 

Definition at line 63 of file maxvector.hpp.

References maxvector< T >::data.

template<class T>
iterator DINLINE maxvector< T >::begin  )  [inline]
 

Definition at line 59 of file maxvector.hpp.

References maxvector< T >::data.

template<class T>
void DINLINE maxvector< T >::clear  )  [inline]
 

Definition at line 138 of file maxvector.hpp.

References maxvector< T >::length.

template<class T>
bool DINLINE maxvector< T >::empty  )  const [inline]
 

Definition at line 96 of file maxvector.hpp.

References maxvector< T >::length.

template<class T>
const_iterator DINLINE maxvector< T >::end  )  const [inline]
 

Definition at line 72 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
iterator DINLINE maxvector< T >::end  )  [inline]
 

Definition at line 68 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
iterator DINLINE maxvector< T >::erase iterator  pos  )  [inline]
 

Definition at line 150 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
iterator DINLINE maxvector< T >::erase iterator  first,
const iterator  last
[inline]
 

Definition at line 142 of file maxvector.hpp.

template<class T>
T& DINLINE maxvector< T >::front  )  [inline]
 

Definition at line 100 of file maxvector.hpp.

References maxvector< T >::data.

template<class T>
const T& DINLINE maxvector< T >::operator[] size_t  n  )  const [inline]
 

Definition at line 52 of file maxvector.hpp.

References maxvector< T >::data.

template<class T>
T& DINLINE maxvector< T >::operator[] size_t  n  )  [inline]
 

Definition at line 48 of file maxvector.hpp.

References maxvector< T >::data.

template<class T>
void DINLINE maxvector< T >::pop_back  )  [inline]
 

Definition at line 92 of file maxvector.hpp.

References maxvector< T >::length.

template<class T>
void DINLINE maxvector< T >::push_back const T &  d  )  [inline]
 

Definition at line 88 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

template<class T>
void DINLINE maxvector< T >::reserve size_t  n  )  [inline]
 

Definition at line 113 of file maxvector.hpp.

References maxvector< T >::data, and maxvector< T >::length.

Referenced by maxvector< T >::resize().

template<class T>
void DINLINE maxvector< T >::resize size_t  n  )  [inline]
 

Definition at line 132 of file maxvector.hpp.

References maxvector< T >::data, maxvector< T >::length, and maxvector< T >::reserve().

template<class T>
void DINLINE maxvector< T >::resize size_t  n,
const T &  d
[inline]
 

Definition at line 123 of file maxvector.hpp.

References maxvector< T >::data, maxvector< T >::length, and maxvector< T >::reserve().

template<class T>
size_t DINLINE maxvector< T >::size  )  const [inline]
 

Definition at line 76 of file maxvector.hpp.

References maxvector< T >::length.


Member Data Documentation

template<class T>
T* maxvector< T >::data [private]
 

Definition at line 29 of file maxvector.hpp.

Referenced by maxvector< T >::back(), maxvector< T >::begin(), maxvector< T >::end(), maxvector< T >::erase(), maxvector< T >::front(), maxvector< T >::maxvector(), maxvector< T >::operator[](), maxvector< T >::push_back(), maxvector< T >::reserve(), maxvector< T >::resize(), and maxvector< T >::~maxvector().

template<class T>
size_t maxvector< T >::length [private]
 

Definition at line 30 of file maxvector.hpp.

Referenced by maxvector< T >::back(), maxvector< T >::clear(), maxvector< T >::empty(), maxvector< T >::end(), maxvector< T >::erase(), maxvector< T >::maxvector(), maxvector< T >::pop_back(), maxvector< T >::push_back(), maxvector< T >::reserve(), maxvector< T >::resize(), and maxvector< T >::size().


The documentation for this class was generated from the following file:
Generated on Sun Sep 17 17:55:24 2006 for FIM environment by  doxygen 1.4.4