00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __ROP_FBXErrorManager_h__
00021 #define __ROP_FBXErrorManager_h__
00022
00023 #include "ROP_FBXCommon.h"
00024 #include <UT/UT_String.h>
00025
00026
00027 enum ROP_FBXErrorType
00028 {
00029 ROP_FBXErrorGeneric = 0,
00030 ROP_FBXErrorIncorrectPassword,
00031 ROP_FBXErrorLights
00032 };
00033
00034 class ROP_API ROP_FBXError
00035 {
00036 public:
00037 ROP_FBXError(const char* pMessage, bool bIsCritical, ROP_FBXErrorType eType);
00038 virtual ~ROP_FBXError();
00039
00040 bool getIsCritical(void) const;
00041 const char* getMessage(void) const;
00042 ROP_FBXErrorType getType(void) const;
00043
00044 private:
00045 string myMessage;
00046 bool myIsCritical;
00047 ROP_FBXErrorType myType;
00048 };
00049 typedef vector<ROP_FBXError*> TROPErrorVector;
00050
00051 class ROP_API ROP_FBXErrorManager
00052 {
00053 public:
00054 ROP_FBXErrorManager();
00055 virtual ~ROP_FBXErrorManager();
00056
00057 void addError(const char* pcsError, bool bIsCritical = false, ROP_FBXErrorType eType = ROP_FBXErrorGeneric);
00058 void addError(const char* pcsErrorPart1, const char* pcsErrorPart2, const char* pcsErrorPart3, bool bIsCritical = false, ROP_FBXErrorType eType = ROP_FBXErrorGeneric);
00059
00060 ROP_FBXError* getError(int err_index);
00061 int getNumItems(void) const;
00062
00063 bool getDidReportCriticalErrors(void) const;
00064
00065 void reset(void);
00066
00067 void appendAllErrors(UT_String& string_out) const;
00068 void appendAllWarnings(UT_String& string_out) const;
00069
00070 private:
00071
00072 TROPErrorVector myErrors;
00073 bool myDidReportCricialErrors;
00074 };
00075
00076
00077 #endif // __ROP_FBXErrorManager_h__
00078