# baseTypes.hh

Go to the documentation of this file.

    00001 // HLA 1.3 Header "baseTypes.hh"
    00002
    00003 typedef unsigned short UShort ;
    00004 typedef short Short ;
    00005 #if defined(__alpha) || (defined(__sgi) && _MIPS_SZLONG == 64)
    00006 typedef unsigned int ULong ;
    00007 typedef int Long ;
    00008 #else
    00009 typedef unsigned long ULong ;
    00010 typedef long Long ;
    00011 #endif
    00012 typedef double Double ;
    00013 typedef float Float ;
    00014
    00015 enum Boolean {
    00016     RTI_FALSE = 0,
    00017     RTI_TRUE
    00018 };
    00019
    00020 class RTI_EXPORT Exception
    00021 {
    00022 public:
    00023     ULong _serial ;
    00024     char *_reason ;
    00025     const char *_name ;
    00026     Exception(const char *reason);
    00027     Exception(ULong serial, const char *reason);
    00028     Exception(const Exception &toCopy);
    00029     virtual ~Exception();
    00030     Exception &operator=(const Exception &);
    00031     virtual Exception *cloneSelf() const throw() = 0 ;
    00032     virtual void throwSelf() const = 0 ;
    00033     const std::string displayMe() const;
    00034     virtual long getType() = 0;
    00035 };
    00036
    00037 #define RTI_EXCEPT(A) \
    00038 class A : public Exception { \
    00039 public: \
    00040     static RTI_EXPORT const char *_ex ; \
    00041     static RTI_EXPORT long type ; \
    00042     A (const char *reason) : Exception(reason) { _name = #A ; this->displayMe();} \
    00043     A (ULong serial, const char *reason = 0) \
    00044         : Exception(serial, reason) { _name = #A ; this->displayMe(); } \
    00045     A (A const &toCopy) : Exception(toCopy) { _name = #A ; this->displayMe();} \
    00046     Exception *cloneSelf() const throw() { return (new A(_reason)); } \
    00047     void throwSelf() const { throw *this ; } \
    00048     long getType() {return type;}; \
    00049 };