![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 //File baseTypes13.h 00002 //Included in RTI13.h 00003 00004 #ifndef BASETYPES13_H_INCLUDED 00005 #define BASETYPES13_H_INCLUDED 00006 00007 #ifndef NULL 00008 #define NULL (0) 00009 #endif 00010 00011 namespace rti13 00012 { 00013 00014 typedef unsigned short UShort; 00015 typedef short Short; 00016 #if defined(RTI_64_BIT_LONG) 00017 typedef unsigned int ULong; 00018 typedef int Long; 00019 #else 00020 typedef unsigned long ULong; 00021 typedef long Long; 00022 #endif 00023 typedef double Double; 00024 typedef float Float; 00025 00026 enum Boolean { 00027 RTI_FALSE = 0, 00028 RTI_TRUE}; 00029 00030 class RTI_EXPORT Exception { 00031 public: 00032 ULong _serial; 00033 char *_reason; 00034 const char *_name; 00035 Exception (const char *reason); 00036 Exception (ULong serial, const char *reason=NULL); 00037 Exception (const Exception &toCopy); 00038 virtual ~Exception (); 00039 Exception & operator = (const Exception &); 00040 virtual Exception * cloneSelf() const throw() = 0; 00041 virtual void throwSelf() const = 0; 00042 }; 00043 00044 #define RTI_EXCEPT(A) \ 00045 class A : public Exception { \ 00046 public: \ 00047 static RTI_EXPORT const char *_ex; \ 00048 A (const char *reason) : Exception (reason) { _name = _ex; } \ 00049 A (ULong serial, const char *reason=NULL) \ 00050 : Exception (serial, reason) { _name = _ex; } \ 00051 A (A const & toCopy) : Exception(toCopy) { _name = _ex; } \ 00052 Exception * cloneSelf() const throw() { return (new A(_reason)); } \ 00053 void throwSelf() const { throw *this; } \ 00054 }; 00055 00056 } // End of namespace rti13 00057 00058 #endif // BASETYPES13_H_INCLUDED