⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basetypes.hh

📁 基于BHRTI开发环境的简单五子棋游戏
💻 HH
字号:
//File baseTypes.hh
//Included in RTI.hh
 
#ifndef NULL
#define NULL (0)
#endif

typedef unsigned short UShort;
typedef short          Short;

typedef unsigned long  ULong;
typedef long           Long;

typedef double         Double;
typedef float          Float;

enum Boolean {
    RTI_FALSE = 0,
    RTI_TRUE};
  
class RTI_EXPORT Exception {
public:
  ULong _serial;
  char *_reason;
  const char *_name;
  Exception (const char *reason);
  Exception (ULong serial, const char *reason=NULL);
  Exception (const Exception &toCopy);
  virtual ~Exception ();
  Exception & operator = (const Exception &);

  virtual Exception * cloneSelf() const throw() = 0;
  virtual void        throwSelf() const         = 0;
};

#define RTI_EXCEPT(A)   \
class A : public Exception {       \
public: \
  static RTI_EXPORT const char *_ex;  \
  A (const char *reason = NULL) : Exception (reason)  { _name = _ex; }   \
  A (ULong serial, const char *reason=NULL)        \
    : Exception (serial, reason)  { _name = _ex; }        \
  A (const Exception &toCopy) : Exception(toCopy) { _name = _ex; } \
  Exception * cloneSelf() const throw() { return (new A(_reason)); } \
  void        throwSelf() const         { throw *this; } \
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -