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

Rangedimexc.hh

Go to the documentation of this file.
00001 #ifndef RANGEDIMEXC_HEADER
00002 #define RANGEDIMEXC_HEADER
00003 
00004 // ==== Rangedimexc.hh ====
00005 
00012 // 8-Oct-2001. Andras Aszodi
00013 
00014 // ---- STANDARD HEADERS ----
00015 
00016 #include <stdlib.h>
00017 #include <string.h>
00018 
00019 #ifdef _STANDARD_C_PLUS_PLUS
00020 #include <iostream>
00021 #include <iomanip>
00022     using namespace std;
00023 #else
00024 #include <iostream.h>
00025 #include <iomanip.h>
00026 #endif
00027 
00028 // ---- MODULE HEADERS ----
00029 
00030 #include"Utilsexc.hh"
00031 
00032 // ==== CLASSES ====
00033 
00034 namespace RazorBack {
00035 
00042 class Indexrangexc_: public Utilsexc_
00043 {
00045     protected:
00046     
00047     unsigned int Badidx, Maxidx; 
00048     
00049     // methods
00050     public:
00051     
00057     Indexrangexc_(const char *Thnm,
00058             unsigned int Bidx, unsigned int Idx, bool F=false);
00059 
00061     int bad_idx() const { return Badidx; }
00062     
00064     int max_idx() const { return Maxidx; }
00065     
00066     private:
00067     Indexrangexc_();     // disallow default ctor
00068 };
00069 // END OF CLASS Indexrangexc_
00070 
00075 class Badvalexc_: public Utilsexc_
00076 {
00077     // data
00078     protected:
00079     
00080     double Badval;          
00081     
00082     // methods
00083     public:
00084     
00089     Badvalexc_(const char *Thnm, double Bad, bool F=false);
00090 
00092     double bad_val() const { return(Badval); }
00093     
00094     private:
00095     Badvalexc_();           // disallow default ctor
00096 };
00097 // END OF CLASS Badvalexc_
00098 
00106 class Argexc_: public Badvalexc_
00107 {
00108     // data
00109     public:
00110     static const double NEG_INFINITY, POS_INFINITY;
00111     
00112     protected:
00113     double Minval, Maxval; 
00114     
00115     // methods
00116     public:
00117     
00124     Argexc_(const char *Thnm, double Bad, double Min, double Max, bool F=false);
00125 
00127     double min_val() const { return Minval; }
00128     
00130     double max_val() const { return Maxval; }
00131     
00132     private:
00133     Argexc_();      // disallow default ctor
00134 };
00135 // END OF CLASS Argexc_
00136 
00143 class Dimexc_: public Utilsexc_
00144 {
00145     //data
00146     protected:
00147     
00148     unsigned int Dim1, Dim2; 
00149     
00151     public:
00152     
00157     Dimexc_(const char *Thnm, unsigned int D1, unsigned int D2, bool F=false);
00158     
00160     unsigned int bad_dim(int i) const
00161     {
00162         return(i<=1? Dim1: Dim2);
00163     }
00164     
00165     private:
00166     Dimexc_();      // disallow default ctor
00167 };
00168 // END OF CLASS Dimexc_
00169 
00170 } // RazorBack
00171 
00172 // ==== END OF HEADER Rangedimexc.hh ====
00173 
00174 #endif  // RANGEDIMEXC_HEADER

Generated at Wed Aug 21 09:33:37 2002 for The Razorback C++ Library: Exceptions by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001