#ifndef _TINTERFACE_H__ #define _TINTERFACE_H__ #if _MSC_VER > 1000 #pragma once #endif #include #include "TInterfaceModifyMsg.h" #ifdef _TCHPIPEBASE_ #define DLLIMPEXP __declspec(dllexport) #else #ifdef _TCHPIPEBASE_COM_ #define DLLIMPEXP #else #define DLLIMPEXP __declspec(dllimport) #endif #endif class DLLIMPEXP TInterface { public: TInterface(); TInterface(const TInterface& iSrc); virtual ~TInterface(); enum CompareRule { kOnPos = 0x0010, kOnDir = 0x0020, kOnConnect = 0x0040, kOnOwner = 0x0080, }; public: void SetPosition(const AcGePoint3d& ptPos); AcGePoint3d GetPosition() const; AcGePoint3d& GetPosition(); void SetMidPoint(const AcGePoint3d& ptPos); AcGePoint3d GetMidPoint() const; AcGePoint3d& GetMidPoint(); void SetOutDir(const AcGeVector3d& vtDir); AcGeVector3d GetOutDir() const; AcGeVector3d& GetOutDir(); void SetConnectObject(const AcDbObjectId& idCon); AcDbObjectId GetConnectObject() const; void SetOwnerId(const AcDbObjectId& idOwner); AcDbObjectId GetOwnerId() const; void SetSize(double dSize,double dSize1); void GetSize(double& dSize,double& dSize1) const; void SetDescr(LPCTSTR pszDescr); void GetDescr(CString& sDescr) const; void SetType(short nType); short GetType() const; void SetCompareRule(int nCompareRule,int nNotCompareRule = 0); int GetCompareRule() const; int GetNotCompareRule() const; void Reset(); TInterface& operator = (const TInterface& iSrc); void CopyFrom(const TInterface& iSrc); void TransformBy(const AcGeMatrix3d& xform); void OtherBeforeTransformBy(const TInterfaceModifyMsg& msg); private: AcGePoint3d m_ptGePos; AcGePoint3d m_ptGeMid; AcGeVector3d m_vtOutDir; AcDbSoftPointerId m_idConnect; AcDbSoftPointerId m_idOwner; float m_dSize; float m_dSize1; TCHAR* m_pszDescr; short m_nType; private: short m_nCompareRule; //查询规则 | ,不序列化 short m_nNotCompareRule; //查询规则 ~ ,不序列化 }; class DLLIMPEXP TInterfaces { public: TInterfaces(); ~TInterfaces(); int append(TInterface& value); TInterface at(int index) const; int length() const; void removeAt(int iIndex); TInterface operator[](int nIndex) const; TInterface& operator[](int nIndex); private: CArray m_arInterfaces; }; #endif //_TInterface_H__