Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

58 lines
1.3 KiB
C++

// Copyright (C), 1998-2007, Beijing Tangent Engineering Software Co. Ltd.
// = FileName: CADEnt.h
// = Version: 8.5
// = Author: lgh
// = Date: 2010-9-27 9:29:53
// = Description: 用来处理跟CAD中实体的关联。
// = Maintainers:
#pragma once
#include "commonRoad.h"
// CAD实体类,用于跟CAD中的数据做关联控制,
// id对应的数据可能会被销毁,但是其几何信息需要保留
// 因此,需要单独保留一份关于该实体的几何信息。
class CCADEnt
{
public:
CCADEnt(): m_id() {m_id.setNull();}
CCADEnt(AcDbObjectId id) : m_id(id) {}
virtual ~CCADEnt(void){}
BOOL Erase();
BOOL IsErased() const;
AcDbObjectId ObjId() const {return m_id;}
protected:
AcDbObjectId m_id;
};
class CLineCADEnt : public CCADEnt
{
public:
CLineCADEnt() : CCADEnt(){}
CLineCADEnt(AcDbObjectId id);
virtual ~CLineCADEnt(void) {};
AcGeLineSeg2d Line() const{return m_line;}
private:
AcGeLineSeg2d m_line;
};
class CArcCADEnt : public CCADEnt
{
public:
CArcCADEnt() : CCADEnt(){}
CArcCADEnt(AcDbObjectId id);
virtual ~CArcCADEnt(void){}
AcGeCircArc2d Arc() const{return m_arc;}
private:
AcGeCircArc2d m_arc;
};
typedef AcArray<CLineCADEnt*> ArLineEntPointer;
typedef AcArray<CArcCADEnt*> ArArcEntPointer;