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

Utilsexc.hh

Go to the documentation of this file.
00001 #ifndef UTILSEXC_HEADER
00002 #define UTILSEXC_HEADER
00003 
00004 // ==== Utilsexc.hh ====
00005 
00012 // 8-Oct-2001. Andras Aszodi
00013 
00014 // ---- STANDARD HEADERS ----
00015 
00016 #include <stdlib.h>
00017 
00018 #ifdef _STANDARD_C_PLUS_PLUS
00019 #include <iostream>
00020 #include <iomanip>
00021 #include <sstream>
00022 #else
00023 #include <iostream.h>
00024 #include <iomanip.h>
00025 #include <strstream.h>
00026 #define istringstream istrstream 
00027 #define ostringstream ostrstream 
00028 #endif
00029 
00030 #include <string>
00031 using namespace std;
00032 #ifndef NPOS
00033 #define NPOS string::npos
00034 #endif
00035 
00036 // ==== CLASSES ====
00037 
00038 namespace RazorBack {
00039     
00045 class Utilsexc_
00046 {
00047     // data
00048     private:
00049     string Throwname;    
00050     bool Fatal;     
00051     
00052     protected:
00053     string Message;     
00054     
00055     // methods
00056     public:
00057     
00066     explicit Utilsexc_(const char *Thnm, bool F=false, const char *Msg=NULL);
00067     
00069     const string& throw_name() const { return Throwname; }
00070     
00072     const string& error_message() const { return Message; }
00073     
00075     bool is_fatal() const { return Fatal; }
00076     
00077     // hidden methods
00078     protected:
00079     
00080     void print_prefix(ostringstream& Ost) const;
00081     
00082     private:
00083     Utilsexc_();    // disallow default ctor
00084 };
00085 // END OF CLASS Utilsexc_
00086 
00092 class Emptyexc_: public Utilsexc_
00093 {
00094     // methods
00095     public:
00096         
00098     explicit Emptyexc_(const char *Thnm, bool F=false);
00099     
00100     private:
00101     Emptyexc_();    // disallow default ctor
00102 };
00103 // END OF CLASS Emptyexc_
00104 
00105 } // RazorBack
00106 
00107 // ==== END OF HEADER Utilsexc.hh ====
00108 
00109 #endif  // UTILSEXC_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