RTFX  0.3
Real time special effects collaborative visualization and production library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
RTFXError.h
Go to the documentation of this file.
1 
10 #ifndef __RTFX_ERROR__
11 #define __RTFX_ERROR__
12 
13 #include <string>
14 #include "RTFX_API.h"
15 
16 namespace RTFX
17 {
23  class RTFXAPI RTFXError
24  {
25  public:
26 
28  enum ERRORCODE
29  {
30  SUCCESSNOERROR = 0,
31  MATHASSERTIONFAILED = 1,
32  RECORDERFILEFAILEDOPEN = 2,
33  INVALIDERRORCODE = 3,
34  };
35 
38  {
39  errorMessages = new std::string[4];
40  errorMessages[0] = "No Error.";
41  errorMessages[1] = "Math assertion failed.";
42  errorMessages[2] = "Recording file failed to open.";
43  errorMessages[3] = "Unrecognized error code.";
44  }
45 
48  {
49  e = _e;
50  }
51 
53  std::string GetErrorMessage( ERRORCODE errorCode );
54 
56  std::string GetErrorMessage();
57 
59  void SetErrorCode( ERRORCODE _e )
60  {
61  e = _e;
62  }
63 
65  ERRORCODE GetErrorCode()
66  {
67  return e;
68  }
69 
70  private:
71 
74 
76  enum MAXERRORNUMBER { MAXERROR = 4, };
77 
79  std::string * errorMessages;
80  };
81 }
82 
83 #endif