152 lines
3.4 KiB
C++
152 lines
3.4 KiB
C++
#ifndef _TINTERFACEMODIFYMSG_H__
|
|
#define _TINTERFACEMODIFYMSG_H__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#ifndef TCHPIPEBASE_DBXSERVICE
|
|
#define TCHPIPEBASE_DBXSERVICE _T("TCHPIPEBASE_DBXSERVICE")
|
|
#endif
|
|
|
|
#include "TDb.h"
|
|
|
|
#ifdef _TCHPIPEBASE_
|
|
#define DLLIMPEXP __declspec(dllexport)
|
|
#else
|
|
#ifdef _TCHPIPEBASE_COM_
|
|
#define DLLIMPEXP
|
|
#else
|
|
#define DLLIMPEXP __declspec(dllimport)
|
|
#endif
|
|
#endif
|
|
|
|
class DLLIMPEXP TInterfaceModifyMsg
|
|
{
|
|
public:
|
|
TInterfaceModifyMsg();
|
|
TInterfaceModifyMsg(const TInterfaceModifyMsg& iMsg);
|
|
virtual ~TInterfaceModifyMsg();
|
|
|
|
public:
|
|
|
|
void SetMsgPoint(const AcGePoint3d& ptGe);
|
|
AcGePoint3d GetMsgPoint() const;
|
|
|
|
void SetGripPosition(int nIndex);
|
|
int GetGripPosition();
|
|
int GetGripPosition() const;
|
|
|
|
void SetSize(double dWidth,double dHeight);
|
|
void GetSize(double& dWidth,double& dHeight);
|
|
void GetSize(double& dWidth,double& dHeight) const;
|
|
|
|
void SetSizeDir(const AcGeVector3d& vtW,const AcGeVector3d& vtH);
|
|
void GetSizeDir(AcGeVector3d& vtW,AcGeVector3d& vtH);
|
|
void GetSizeDir(AcGeVector3d& vtW,AcGeVector3d& vtH) const;
|
|
|
|
void SetElevation(double dEl);
|
|
double GetElevation();
|
|
double GetElevation() const;
|
|
|
|
void SetMoveGripOffset(const AcGeVector3d& vtOffset);
|
|
AcGeVector3d GetMoveGripOffset();
|
|
AcGeVector3d GetMoveGripOffset() const;
|
|
|
|
void SetMsgValidate(BOOL bValidate);
|
|
BOOL IsMsgValidate();
|
|
BOOL IsMsgValidate() const;
|
|
|
|
void SetInterfaceOper(TDb::InterfaceOper iOper);
|
|
TDb::InterfaceOper GetInterfaceOper();
|
|
TDb::InterfaceOper GetInterfaceOper() const;
|
|
|
|
void SetTransform(const AcGeMatrix3d& xform);
|
|
void SetTransform(const AcGeVector3d& vtMove);
|
|
AcGeMatrix3d GetTransform();
|
|
AcGeMatrix3d GetTransform() const;
|
|
|
|
void SetMsgOperateOn(const AcDbObjectId& id);
|
|
AcDbObjectId GetMsgOperateOn();
|
|
AcDbObjectId GetMsgOperateOn() const;
|
|
|
|
void SetPreviewObjToCreate(int nKind,int nSubKind);
|
|
BOOL GetPreviewObjToCreate(int& nKind,int& nSubKind);
|
|
|
|
TInterfaceModifyMsg& operator = (const TInterfaceModifyMsg& iMsg);
|
|
|
|
Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* pFiler) const;
|
|
Acad::ErrorStatus dxfInFields(AcDbDxfFiler* pFiler);
|
|
Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
|
|
Acad::ErrorStatus dwgInFields(AcDbDwgFiler* pFiler);
|
|
|
|
private:
|
|
|
|
// 消息的决策点,接口的连接点
|
|
AcGePoint3d m_ptGePos;
|
|
// Grip 的索引
|
|
Adesk::UInt16 m_nGripIndex;
|
|
// 截面宽度,对于管子为半径
|
|
double m_dWidth;
|
|
// 截面高度
|
|
double m_dHeight;
|
|
|
|
AcGeVector3d m_vtW;
|
|
AcGeVector3d m_vtH;
|
|
|
|
// 中心标高
|
|
double m_dEl;
|
|
// movegrip向量
|
|
AcGeVector3d m_vtOffset;
|
|
// 消息是否有效
|
|
BOOL m_bValidate;
|
|
// 消息操作类型
|
|
TDb::InterfaceOper m_eOperation;
|
|
// 变换矩阵
|
|
AcGeMatrix3d m_matXform;
|
|
|
|
//消息的来源
|
|
AcDbSoftPointerId m_idOperateOn;
|
|
|
|
//大类型
|
|
Adesk::UInt32 m_nKind;
|
|
|
|
//小类型
|
|
Adesk::UInt32 m_nSubKind;
|
|
};
|
|
|
|
class DLLIMPEXP TInterfaceModifyMsgs
|
|
{
|
|
public:
|
|
|
|
TInterfaceModifyMsgs();
|
|
~TInterfaceModifyMsgs();
|
|
|
|
int append(const TInterfaceModifyMsg& value);
|
|
|
|
TInterfaceModifyMsg at(int index) const;
|
|
|
|
int length() const;
|
|
|
|
void removeAt(int iIndex);
|
|
|
|
TInterfaceModifyMsg operator[](int nIndex) const;
|
|
TInterfaceModifyMsg& operator[](int nIndex);
|
|
|
|
//[回流处理],新消息是把处理过的对象再处理一遍
|
|
void SetFlowBackFlag(BOOL bFlowBack);
|
|
|
|
//是否回流处理消息
|
|
BOOL IsFlowBackFlag();
|
|
|
|
private:
|
|
|
|
BOOL m_bFlowBack;
|
|
CArray<TInterfaceModifyMsg,TInterfaceModifyMsg> m_arModifyMsgs;
|
|
};
|
|
|
|
|
|
DLLIMPEXP void PickInterfaceModifyMsgs(TInterfaceModifyMsgs& msgs,AcDbDatabase* pDb = NULL /*null = curdwg*/);
|
|
|
|
#endif //_TInterfaceModifyMsg_H__
|