AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
命名空间 | 宏定义
APIObjectDef.h 文件参考
#include "APIClassPtrDef.h"

浏览源代码.

命名空间

 AnyCAD
 
 AnyCAD::API
 

宏定义

#define DECLARE_APIOBJECT(className)
 
#define IMPLEMENT_APIOBJECT(className)
 
#define DECLARE_APISUPER(className, super)
 
#define IMPLEMENT_APISUPER(className)
 

宏定义说明

#define DECLARE_APIOBJECT (   className)
值:
public:\
typedef AnyCore::A##className##Ptr ObjectPtr;\
static className Null;\
className();\
className(int, bool);\
className(const className::ObjectPtr& implObject)\
{\
SetImpl(implObject);\
}\
virtual ~className(){}\
virtual bool IsNull() const { return className##Impl_ == 0; }\
bool IsValid() const { return !IsNull(); }\
private:\
ObjectPtr className##Impl_;\
public:\
const ObjectPtr& GetImpl() const { return className##Impl_; }\
void SetImpl(const ObjectPtr& impl) { className##Impl_ = impl; }
#define DECLARE_APISUPER (   className,
  super 
)
值:
typedef super Super;\
public:\
static className Null;\
typedef AnyCore::A##className##Ptr ObjectPtr;\
className();\
className(int, bool);\
className(const className::ObjectPtr& implObject)\
{\
SetImpl(implObject);\
}\
virtual ~className(){}\
virtual bool IsNull() const { return className##Impl_ == 0; }\
bool IsValid() const { return !IsNull(); }\
private:\
ObjectPtr className##Impl_;\
public:\
const ObjectPtr& GetImpl() const { return className##Impl_; }\
void SetImpl(const ObjectPtr& impl);
#define IMPLEMENT_APIOBJECT (   className)
值:
className className::Null(1,true);\
className::className(int, bool){}
#define IMPLEMENT_APISUPER (   className)
值:
className className::Null(1,true);\
className::className(int aa,bool bb):Super(aa,bb){}\
void className::SetImpl(const ObjectPtr& impl) { Super::SetImpl(impl); className##Impl_ = impl; }