Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_ErrorHandler.h

Go to the documentation of this file.
00001 
00016 #ifndef CUI_ERRORHANDLER_H
00017 #define CUI_ERRORHANDLER_H
00018 
00019 #include "UI_Lib.h"
00020 #include "UI_types.h"
00021 #include "CUI_MessageBox.h"
00022 #include "CUI_Console.h"
00023 
00024 
00028 
00029 
00037 class GLGUI_ENTRY CUI_ErrorHandler
00038 {
00039 public:
00040 
00041         static const unsigned short UI_REPORT_NONE;
00042         static const unsigned short UI_REPORT_FILE;
00043         static const unsigned short UI_REPORT_CONSOLE;
00044         static const unsigned short UI_REPORT_MESSAGEBOX;
00045 
00047         typedef enum errorType {UI_WARNING, UI_ERROR, UI_FATAL};
00048 
00049         // constructor
00063         CUI_ErrorHandler( char *filename );
00064 
00065         // destructor
00067         virtual ~CUI_ErrorHandler();
00068 
00070 
00071         virtual CUI_MessageBox * ProcessError( errorType type, char *message );
00072 
00074         virtual bool SetConsole( CUI_Console *con )
00075         { m_console = con; return false; }
00076 
00078         virtual bool SetMessageBox( CUI_MessageBox *mbox )
00079         { m_messageBox = mbox; return false; }
00080 
00082         virtual bool SetReporting( unsigned short report )
00083         { m_report = report; return false; }
00084 
00085 protected:
00086 
00088         virtual bool OpenFile( char *filename );
00089         
00091         virtual bool WriteToFile( char *text );
00092         
00094         virtual bool CloseFile( );
00095 
00097         FILE *m_filep;
00098 
00100         bool m_fileOpen;
00101 
00103         unsigned short m_report;
00104 
00106         CUI_Console *m_console;
00107 
00109         CUI_MessageBox *m_messageBox;
00110 
00111 };
00112 
00113 #endif

Generated on Mon Sep 29 23:07:02 2003 for glGUI by doxygen 1.3.4