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

Sct::OutOfRangeError< T > Class Template Reference
[Exceptions]

Thrown to show that arguement value is not in the allowed range. More...

#include <OutOfRangeError.h>

Inheritance diagram for Sct::OutOfRangeError< T >:

Sct::LogicError Sct::Error Sct::AbstractThrowable Sct::Throwable exception

Public Member Functions

 OutOfRangeError (const string &msg, const string &file, int line, T val, T lo, T hi) throw ()
 Creates an Exception with message msg and no cause.

 OutOfRangeError (Throwable &cause, const string &file, int line, T val, T lo, T hi) throw ()
 Creates an Exception with a cause.

 OutOfRangeError (const string &msg, Throwable &cause, const string &file, int line, T val, T lo, T hi) throw ()
 Creates an Exception with a message and a cause.

getValue () const throw ()
 Get the value that was requested.

getLowLimit () const throw ()
 Get the lower limit for the parameter.

getHighLimit () const throw ()
 Get the upper limit for the parameter.

virtual shared_ptr< Throwableclone () const throw ()
 Necessary for chaining of exceptions unfortunately.


Protected Member Functions

 OutOfRangeError (T val, T lo, T hi) throw ()
virtual string getMessage () const throw ()
 Gets the detail message for this.


Protected Attributes

val
lo
hi

Detailed Description

template<class T = int>
class Sct::OutOfRangeError< T >

Thrown to show that arguement value is not in the allowed range.

Templated class: the type of class (e.g. int) which has gone out of range. This class must be able to << to an ostream (e.g. {int, long, short, unsigned} )

Author:
Alan Barr

Definition at line 16 of file OutOfRangeError.h.


Constructor & Destructor Documentation

template<class T>
Sct::OutOfRangeError< T >::OutOfRangeError const string &    msg,
const string &    file,
int    line,
  val,
  lo,
  hi
throw ()
 

Creates an Exception with message msg and no cause.

Parameters:
the value of the paramter (templated)
the lower limit of the parameter (templated)
the upper limit of the parameter (templated)

Definition at line 62 of file OutOfRangeError.h.

template<class T>
Sct::OutOfRangeError< T >::OutOfRangeError Throwable   cause,
const string &    file,
int    line,
  val,
  lo,
  hi
throw ()
 

Creates an Exception with a cause.

Useful for simply wrapping exceptions.

Parameters:
the value of the paramter (templated)
the lower limit of the parameter (templated)
the upper limit of the parameter (templated)

Definition at line 68 of file OutOfRangeError.h.

template<class T>
Sct::OutOfRangeError< T >::OutOfRangeError const string &    msg,
Throwable   cause,
const string &    file,
int    line,
  val,
  lo,
  hi
throw ()
 

Creates an Exception with a message and a cause.

Parameters:
the value of the paramter (templated)
the lower limit of the parameter (templated)
the upper limit of the parameter (templated)

Definition at line 74 of file OutOfRangeError.h.

template<class T = int>
Sct::OutOfRangeError< T >::OutOfRangeError   val,
  lo,
  hi
throw () [inline, protected]
 

Definition at line 53 of file OutOfRangeError.h.


Member Function Documentation

template<class T>
shared_ptr< Throwable > Sct::OutOfRangeError< T >::clone   const throw () [virtual]
 

Necessary for chaining of exceptions unfortunately.

Should return a copy of this allocated on the heap. It is necessary for sub-classes to override this if they add new data members or if they do and special processing in what() or sentToMrs()

Reimplemented from Sct::AbstractThrowable.

Definition at line 105 of file OutOfRangeError.h.

template<class T>
T Sct::OutOfRangeError< T >::getHighLimit   const throw ()
 

Get the upper limit for the parameter.

Definition at line 100 of file OutOfRangeError.h.

template<class T>
T Sct::OutOfRangeError< T >::getLowLimit   const throw ()
 

Get the lower limit for the parameter.

Definition at line 95 of file OutOfRangeError.h.

template<class T>
string Sct::OutOfRangeError< T >::getMessage   const throw () [protected, virtual]
 

Gets the detail message for this.

Reimplemented from Sct::AbstractThrowable.

Definition at line 80 of file OutOfRangeError.h.

template<class T>
T Sct::OutOfRangeError< T >::getValue   const throw ()
 

Get the value that was requested.

Definition at line 90 of file OutOfRangeError.h.


Field Documentation

template<class T = int>
T Sct::OutOfRangeError< T >::hi [protected]
 

Definition at line 56 of file OutOfRangeError.h.

template<class T = int>
T Sct::OutOfRangeError< T >::lo [protected]
 

Definition at line 56 of file OutOfRangeError.h.

template<class T = int>
T Sct::OutOfRangeError< T >::val [protected]
 

Definition at line 56 of file OutOfRangeError.h.


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