Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

RazorBack::Indexrangexc_ Class Reference

Indexrangexc_: index range exception. More...

#include <Rangedimexc.hh>

Inheritance diagram for RazorBack::Indexrangexc_:

Inheritance graph
[legend]
Collaboration diagram for RazorBack::Indexrangexc_:

Collaboration graph
[legend]
List of all members.

Public Methods

 Indexrangexc_ (const char *Thnm, unsigned int Bidx, unsigned int Idx, bool F=false)
 Constructs an index range exception thrown in a function called Thnm. More...

int bad_idx () const
 bad_idx(): returns the "bad" index that caused the exception.

int max_idx () const
 max_idx(): returns the maximal index that was violated.


Protected Attributes

unsigned int Badidx
 data.

unsigned int Maxidx
 bad index causing the exception, max.range.


Private Methods

 Indexrangexc_ ()

Detailed Description

Indexrangexc_: index range exception.

Stores the bad index and the max. size both of which must be specified (no empty default ctor). Index should have been in the range [0..Maxsize]. Usage: throw Indexrangexc_("wrong_function", BadIdx, Maxsize)

Definition at line 42 of file Rangedimexc.hh.


Constructor & Destructor Documentation

RazorBack::Indexrangexc_::Indexrangexc_ ( const char * Thnm,
unsigned int Bidx,
unsigned int Idx,
bool F = false )
 

Constructs an index range exception thrown in a function called Thnm.

Bidx is the out-of-range index, Idx is the maximal allowed index. F is the fatality indicator (default false).

RazorBack::Indexrangexc_::Indexrangexc_ ( ) [private]
 


Member Function Documentation

int RazorBack::Indexrangexc_::bad_idx ( ) const [inline]
 

bad_idx(): returns the "bad" index that caused the exception.

Definition at line 61 of file Rangedimexc.hh.

int RazorBack::Indexrangexc_::max_idx ( ) const [inline]
 

max_idx(): returns the maximal index that was violated.

Definition at line 64 of file Rangedimexc.hh.


Member Data Documentation

unsigned int RazorBack::Indexrangexc_::Badidx [protected]
 

data.

Definition at line 47 of file Rangedimexc.hh.

unsigned int RazorBack::Indexrangexc_::Maxidx [protected]
 

bad index causing the exception, max.range.

Definition at line 47 of file Rangedimexc.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:38 2002 for The Razorback C++ Library: Exceptions by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001