65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
#if !defined(__KTENTITYDUMB_H__)
|
|
#define __KTENTITYDUMB_H__
|
|
|
|
// Description:
|
|
// 类CKTEntityDumb用于在AcEdJig中管理多个实体一起拖动是的操作.
|
|
// 作为哑元类使用
|
|
// Company: Kingtouch Software Corporation. Copyright 2002-2005
|
|
// Author: WangYongguang
|
|
// Date: 2002.05.01
|
|
|
|
#ifdef EARTHWORM_EXPORT
|
|
#define DLLIMPEXP __declspec(dllexport)
|
|
#else
|
|
#define DLLIMPEXP __declspec(dllimport)
|
|
#endif
|
|
|
|
#include "KTObjLifeMgr.h"
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
class DLLIMPEXP CKTEntityDumb : public AcDbEntity, CKTObjLifeMgr
|
|
{
|
|
public:
|
|
ACRX_DECLARE_MEMBERS(CKTEntityDumb);
|
|
|
|
// 默认构造函数
|
|
CKTEntityDumb(BOOL bAutoRelease = TRUE);
|
|
// 构造函数, 加入管理实体
|
|
CKTEntityDumb(AcDbEntity* pEnt, BOOL bAutoRelease = FALSE);
|
|
// 构造函数, 加入管理实体
|
|
CKTEntityDumb(const AcDbVoidPtrArray& arpEnts, BOOL bAutoRelease = FALSE);
|
|
// 构造函数, 加入管理实体
|
|
CKTEntityDumb(const AcDbObjectId& idEnt, BOOL bAutoRelease = TRUE);
|
|
// 构造函数, 加入管理实体
|
|
CKTEntityDumb(const AcDbObjectIdArray& aridEnts, BOOL bAutoRelease = TRUE);
|
|
// 析构函数
|
|
virtual ~CKTEntityDumb();
|
|
|
|
// 判断是否自动close/delete管理的实体
|
|
BOOL IsAutoRelease();
|
|
// 设置自动close/delete标志
|
|
void EnableAutoRelease(BOOL bEnable = TRUE);
|
|
|
|
protected:
|
|
// 实体被添加
|
|
virtual void OnObjectAdded(AcDbObject* pObj);
|
|
// 重载函数
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual void subViewportDraw(AcGiViewportDraw* mode);
|
|
virtual Adesk::Boolean subWorldDraw(AcGiWorldDraw* mode);
|
|
|
|
// 析构时处理标志
|
|
BOOL m_bAutoRelease;
|
|
|
|
void *operator new[](size_t nSize) {return 0;}
|
|
void operator delete[](void *p) {};
|
|
void *operator new[](size_t nSize, const char *file, int line) {return 0;}
|
|
|
|
friend class CKTEntityDragMgr;
|
|
};
|
|
|
|
#endif // !defined(__KTENTITYDUMB_H__)
|