Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

Sct::RangedVector< T > Class Template Reference

Class is like a vector, but checks the array bounds of the vector. More...

#include <RangedVector.h>

Inheritance diagram for Sct::RangedVector< T >:

vector

Public Member Functions

 RangedVector (string name)
 Constructor
Parameters:
the name of the vector.


T & operator[] (const unsigned i)
 over-write vector operator[]
Exceptions:
LogicException if out of range


const T & operator[] (const unsigned i) const
 over-write vector operator[] l-value
Exceptions:
LogicException if out of range


RangedVector< T > & operator= (const vector< T > &copyme)
 asignment


Protected Member Functions

 RangedVector () throw ()
 not allowed to do this

OutOfRangeError< int > createException (unsigned int i) const
 creates the message text


Protected Attributes

string name
 the name of the vector is used in the error message


Detailed Description

template<class T>
class Sct::RangedVector< T >

Class is like a vector, but checks the array bounds of the vector.

Exceptions:
LogicError if array bounds are violated.
Note:
does not range check if NDEBUG is defined

Definition at line 21 of file RangedVector.h.


Constructor & Destructor Documentation

template<class T>
Sct::RangedVector< T >::RangedVector string    name [inline]
 

Constructor

Parameters:
the name of the vector.

Definition at line 24 of file RangedVector.h.

template<class T>
Sct::RangedVector< T >::RangedVector   throw () [protected]
 

not allowed to do this


Member Function Documentation

template<class T>
OutOfRangeError< int > Sct::RangedVector< T >::createException unsigned int    i const [inline, protected]
 

creates the message text

Definition at line 44 of file RangedVector.h.

References Sct::RangedVector< T >::name.

Referenced by Sct::RangedVector< T >::operator[]().

template<class T>
RangedVector< T > & Sct::RangedVector< T >::operator= const vector< T > &    copyme [inline]
 

asignment

Definition at line 71 of file RangedVector.h.

template<class T>
const T & Sct::RangedVector< T >::operator[] const unsigned    i const [inline]
 

over-write vector operator[] l-value

Exceptions:
LogicException if out of range

Definition at line 61 of file RangedVector.h.

References Sct::RangedVector< T >::createException().

template<class T>
T & Sct::RangedVector< T >::operator[] const unsigned    i [inline]
 

over-write vector operator[]

Exceptions:
LogicException if out of range

Definition at line 51 of file RangedVector.h.

References Sct::RangedVector< T >::createException().


Field Documentation

template<class T>
string Sct::RangedVector< T >::name [protected]
 

the name of the vector is used in the error message

Definition at line 40 of file RangedVector.h.

Referenced by Sct::RangedVector< T >::createException(), and Sct::RangedVector< ChipFBResult >::RangedVector().


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:37:20 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3