Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxGlobalError.h

00001 /*
00002  *  Copyright (c) 2002, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *  Author(s):
00006  *  Carlo de Boer            (cdeboer@science.uva.nl)
00007  */
00008 
00009 #ifndef HxGlobalError_h
00010 #define HxGlobalError_h
00011 
00012 #include "HxImageRep.h"
00013 
00014 // #include "HxEnvironment.h"
00015 // #include "HxString.h"
00016 
00017 class L_HXIMAGEREP HxGlobalError {
00018 public:
00019     enum HX_GLOBAL_ERRORS {HX_GE_OK, HX_GE_UNEQUAL_IMAGES, HX_GE_OUTOFRANGE, HX_GE_INVALID,
00020                         HX_GE_UNEQUAL_DIMS};
00021     enum HX_GLOBAL_WARNINGS {HX_GW_OK, HX_GW_OVERFLOW};
00022 
00023 public:
00024     virtual                 ~HxGlobalError();
00025     static HxGlobalError*   instance();
00026     static void             setGlobalError(HxGlobalError* err);
00027 
00028     virtual void reset();
00029     virtual HX_GLOBAL_ERRORS getErrorStatus();
00030     virtual HX_GLOBAL_WARNINGS getWarningStatus();
00031     virtual HxString getErrorInfo();
00032     virtual HxString getWarningInfo();
00033     virtual void reportError(HxString gfname, HxString message, HX_GLOBAL_ERRORS errorCode);
00034     virtual void reportError(HxString gfname, HxString arguments, HxString message, HX_GLOBAL_ERRORS errorCode);
00035     virtual void reportWarning(HxString gfname, HxString message, HX_GLOBAL_WARNINGS warningCode);
00036     virtual void reportWarning(HxString gfname, HxString arguments, HxString message, HX_GLOBAL_WARNINGS warningCode);
00037 protected:
00038     HxGlobalError();
00039 private:
00040     static HxGlobalError*   _inst;
00041     static HX_GLOBAL_ERRORS errorStatus; // = HX_GE_OK;
00042     static HX_GLOBAL_WARNINGS warningStatus; // = HX_GW_OK;
00043 
00044     static HxString errorInfo;
00045     static HxString warningInfo;
00046 
00047 };
00048 
00049 #endif

Generated on Tue Feb 3 14:18:35 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001