84 lines
2.6 KiB
C++
84 lines
2.6 KiB
C++
#ifndef _TDBRELINTERFACEREACTOR_H__
|
|
#define _TDBRELINTERFACEREACTOR_H__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
class TToolKitBase;
|
|
class TDbPipeMatchPropertiesReactor;
|
|
class TDbDuctStretchRactor; //add by dyw
|
|
class TDbRelInterfaceReactor : public AcEditorReactor
|
|
{
|
|
public:
|
|
TDbRelInterfaceReactor();
|
|
virtual ~TDbRelInterfaceReactor();
|
|
|
|
virtual void commandWillStart(const TCHAR* cmdStr);
|
|
virtual void commandEnded(const TCHAR* cmdStr);
|
|
virtual void commandCancelled(const TCHAR* cmdStr);
|
|
virtual void commandFailed(const TCHAR* cmdStr);
|
|
|
|
virtual void databaseConstructed(AcDbDatabase*);
|
|
virtual void databaseToBeDestroyed(AcDbDatabase* pDb);
|
|
|
|
virtual void beginDwgOpen(TCHAR* filename);
|
|
#if ADS < 17
|
|
virtual void endDwgOpen(const TCHAR* filename);
|
|
#else
|
|
virtual void endDwgOpen(const TCHAR* filename, AcDbDatabase* pDb);
|
|
#endif
|
|
virtual void beginSave(AcDbDatabase*, const TCHAR* pIntendedName);
|
|
|
|
virtual void endWblock(AcDbDatabase* pTo);
|
|
virtual void beginWblock(AcDbDatabase* pTo, AcDbDatabase* pFrom);
|
|
|
|
void AddToolKit(TToolKitBase* pToolKit);
|
|
|
|
void RemoveToolKit(TToolKitBase* pToolKit);
|
|
|
|
void commandEndedUser(const TCHAR* cmdStr);
|
|
protected:
|
|
|
|
void PickMakeObjAssocMsgs(TMakeObjAssocMsgs& msgs);
|
|
|
|
void PickInterfaceUpdateMsgs(TInterfaceModifyMsgs& msgs);
|
|
|
|
void UpdateRelInterface(const AcDbObjectIdArray& arIds);
|
|
|
|
BOOL SetInterfaceRelation(TDbInterfaceRecord* pInterfaceRec,const TInterface& pipeInterface);
|
|
|
|
BOOL Find(TDbInterfaceRecord* pInterfaceRec,TInterface& pipeInterface);
|
|
|
|
BOOL Has(TDbInterfaceRecord* pInterfaceRec,TInterface& pipeInterface);
|
|
|
|
BOOL RegisterInterface(TDbInterfaceRecord* pInterfaceRec,TInterface& pipeInterface);
|
|
|
|
void ParasUrObjectIds(CString& sUr,AcDbObjectIdArray& ids);
|
|
|
|
BOOL UpdateInterfacePoint(TInterfaceModifyMsg& msg);
|
|
|
|
BOOL UpdateInterfaceRelation(TDbInterfaceRecord* pInterfaceRec,TInterface& pipeInterface,AcGePoint3dArray& arPtsOk,int& nCount,TDbInterfacesObj* pIObj);
|
|
|
|
BOOL MakesureIsErased(const AcDbObjectId& id);
|
|
|
|
BOOL OptimizeUpdateRelInterface();
|
|
|
|
// mcl add.2010.05.20.
|
|
void OptimizeEraseRelInterface(); // 优化处理反删除
|
|
// void TagRecordUndo(Adesk::Boolean bOpen); // 开关
|
|
void DeleteOptimizeArr(); // 删除优化处理数组,用于命令非正常退出
|
|
|
|
public:
|
|
|
|
CPtrList m_lstToolKitPtrs;
|
|
TToolKitBase* m_pToolKit;
|
|
TDbPipeMatchPropertiesReactor* m_pMatchPropertiesReactor;
|
|
CMapPtrToPtr m_mapDbToIRecPtr; //数据库对接口对象的映射
|
|
BOOL m_bNestedUpdate; // 嵌套命令 处理上华拷贝等命令中含有其他命令时 更新错误的问题
|
|
|
|
TDbDuctStretchRactor *m_pDuctStretchReactor; //add by dyw 20140717 风管拉伸命令环境处理器
|
|
};
|
|
|
|
#endif //_TDbRelInterfaceReactor_H__
|