Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | 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 >:

Inheritance graph
[legend]

Public Member Functions

 RangedVector (string name)
 Constructor 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 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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


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().


The documentation for this class was generated from the following file:
Generated on Thu Jul 15 09:51:29 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5