CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2022 开发者帮助

AcAxOleLinkManager

2024-5-18 18:50| 发布者: admin| 查看: 122| 评论: 0|原作者: admin|来自: AutoCAD

AcAxOleLinkManager

AcAxOleLinkManager用于管理从驻留数据库对象到其 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;
};

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1   苏公网安备32011402011833)

GMT+8, 2025-3-14 06:08

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部