00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef HxGlobalError_h
00010 #define HxGlobalError_h
00011
00012 #include "HxImageRep.h"
00013
00014
00015
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;
00042 static HX_GLOBAL_WARNINGS warningStatus;
00043
00044 static HxString errorInfo;
00045 static HxString warningInfo;
00046
00047 };
00048
00049 #endif