Documentation


animal::vector< T, Alloc > Class Template Reference

#include <vector.h>

Inheritance diagram for animal::vector< T, Alloc >:

vector List of all members.

Detailed Description

template<class T, class Alloc = std::allocator<T>>
class animal::vector< T, Alloc >

Same as std::vector, + range checking on operator[ ].

Range checking can be turned of using compile option -DNDEBUG

Author:
Francois Faure, 1999
Examples:

odeSolver_test.cpp, and vector_test.cpp.

Definition at line 21 of file vector.h.

Public Types

typedef std::vector< T, Alloc
>::size_type 
size_type
 size_type

typedef std::vector< T, Alloc
>::reference 
reference
 reference to a value (read-write)

typedef std::vector< T, Alloc
>::const_reference 
const_reference
 const reference to a value (read only)


Public Member Functions

 vector ()
 Basic onstructor.

 vector (size_type n, const T &value)
 Constructor.

 vector (int n, const T &value)
 Constructor.

 vector (long n, const T &value)
 Constructor.

 vector (size_type n)
 Constructor.

 vector (const std::vector< T, Alloc > &x)
 Constructor.

vector< T, Alloc > & operator= (const std::vector< T, Alloc > &x)
 Constructor.

 vector (typename animal::vector< T, Alloc >::const_iterator first, typename animal::vector< T, Alloc >::const_iterator last)
 Constructor.

reference operator[] (size_type n)
 Read/write random access.

const_reference operator[] (size_type n) const
 Read-only random access.


Friends

std::ostream & operator<< (std::ostream &os, const std::vector< T, Alloc > &vec)
 Output stream.


Member Typedef Documentation

template<class T, class Alloc = std::allocator<T>>
typedef std::vector<T,Alloc>::const_reference animal::vector< T, Alloc >::const_reference
 

const reference to a value (read only)

Definition at line 30 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
typedef std::vector<T,Alloc>::reference animal::vector< T, Alloc >::reference
 

reference to a value (read-write)

Definition at line 28 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
typedef std::vector<T,Alloc>::size_type animal::vector< T, Alloc >::size_type
 

size_type

Definition at line 26 of file vector.h.


Constructor & Destructor Documentation

template<class T, class Alloc = std::allocator<T>>
animal::vector< T, Alloc >::vector  )  [inline]
 

Basic onstructor.

Definition at line 33 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
animal::vector< T, Alloc >::vector size_type  n,
const T &  value
[inline]
 

Constructor.

Definition at line 35 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
animal::vector< T, Alloc >::vector int  n,
const T &  value
[inline]
 

Constructor.

Definition at line 37 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
animal::vector< T, Alloc >::vector long  n,
const T &  value
[inline]
 

Constructor.

Definition at line 39 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
animal::vector< T, Alloc >::vector size_type  n  )  [inline, explicit]
 

Constructor.

Definition at line 41 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
animal::vector< T, Alloc >::vector const std::vector< T, Alloc > &  x  )  [inline]
 

Constructor.

Definition at line 43 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
animal::vector< T, Alloc >::vector typename animal::vector< T, Alloc >::const_iterator  first,
typename animal::vector< T, Alloc >::const_iterator  last
[inline]
 

Constructor.

Definition at line 57 of file vector.h.


Member Function Documentation

template<class T, class Alloc = std::allocator<T>>
vector<T, Alloc>& animal::vector< T, Alloc >::operator= const std::vector< T, Alloc > &  x  )  [inline]
 

Constructor.

Definition at line 45 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
const_reference animal::vector< T, Alloc >::operator[] size_type  n  )  const [inline]
 

Read-only random access.

Definition at line 70 of file vector.h.

template<class T, class Alloc = std::allocator<T>>
reference animal::vector< T, Alloc >::operator[] size_type  n  )  [inline]
 

Read/write random access.

Definition at line 62 of file vector.h.


Friends And Related Function Documentation

template<class T, class Alloc = std::allocator<T>>
std::ostream& operator<< std::ostream &  os,
const std::vector< T, Alloc > &  vec
[friend]
 

Output stream.

Definition at line 78 of file vector.h.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:52:31 2004 by doxygen 1.3.6