AcAxOleLinkManager用于管理从驻留在数据库的对象到其 COM 对象的链接。这是通过将瞬态反应器连接到该反应堆来完成的。瞬态反应器有一个变量,其中包含指向 COM 对象的指针。这个瞬态反应器也用于调用何时修改。AcDbObjectIUnknownIAcadBaseObject::OnModified()AcDbObject AutoCAD 在每个会话中维护一个实例。若要获取指向 OLE 链接管理器的指针,请使用函数。在oleaprot.h文件中声明的类描述如下:AcAxOleLinkManagerAcAxGetOleLinkManager()AcAxOleLinkManager // AcAxOleLinkManager is used to maintain the link between ARX
// objects and their respective COM wrapper.
//
class AcAxOleLinkManager
{
public:
// Given a pointer to a database-resident object, return
// the IUnknown of the COM wrapper. NULL is returned if
// no wrapper is found.
//
virtual IUnknown* GetIUnknown(AcDbObject* pObject) = 0;
// Set the link between a database-resident object and a
// COM wrapper. If the IUnknown is NULL, then the link
// is removed.
//
virtual Adesk::Boolean SetIUnknown(AcDbObject* pObject,
IUnknown* pUnknown) = 0;
// Given a pointer to a database object, return
// the IUnknown of the COM wrapper. NULL is returned if
// no wrapper is found.
//
virtual IUnknown* GetIUnknown(AcDbDatabase* pDatabase) = 0;
// Set the link between a database object and a COM wrapper.
// If the IUnknown is NULL, then the link is removed.
//
virtual Adesk::Boolean SetIUnknown(AcDbDatabase* pDatabase,
IUnknown* pUnknown) = 0;
// Given a pointer to a database object, return the
// IDispatch of the document object. NULL is returned if
// the database does not belong to a particular document.
//
virtual IDispatch* GetDocIDispatch(AcDbDatabase* pDatabase)= 0;
// Set the link between a database object and the IDispatch
// of the document it belongs to. If the IDispatch is NULL, then
// the link is removed.
//
virtual Adesk::Boolean SetDocIDispatch(AcDbDatabase* pDatabase,
IDispatch* pDispatch) = 0;
};
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-11-2 23:37
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.