IAcadBaseObject is the interface used to manage the link from a COM object to a database-resident object. It is the COM object's responsibility to reset the link from the AcDbObject to the COM object when the COM object is being destroyed. This is usually done in the destructor of the COM class, using the AcAxOleLinkManager class discussed in the following section.
Here is a description of the IAcadBaseObject interface:
interface DECLSPEC_UUID("5F3C54C0-49E1-11cf-93D5-0800099EB3B7") IAcadBaseObject : public IUnknown { // IUnknown methods // STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; STDMETHOD_(ULONG, AddRef)(THIS) PURE; STDMETHOD_(ULONG, Release)(THIS) PURE; // IAcadBaseObject methods // STDMETHOD(SetObjectId)(THIS_ AcDbObjectId& objId, AcDbObjectId ownerId = AcDbObjectId::kNull, TCHAR* keyName = NULL) PURE; STDMETHOD(GetObjectId)(THIS_ AcDbObjectId* objId) PURE; STDMETHOD(Clone)(THIS_ AcDbObjectId ownerId, LPUNKNOWN* pUnkClone) PURE; STDMETHOD(GetClassID)(THIS_ CLSID& clsid) PURE; STDMETHOD(NullObjectId)(THIS) PURE; STDMETHOD(OnModified)(THIS) PURE; };
This method is used to identify which database-resident object the COM object represents. If the objId argument is equal to AcDbObjectId::kNull, the COM object is being instructed to create a new AcDbObject-derived object and append it to the database. The ownerId and keyName arguments are specified only in this situation.
This method is used to retrieve the AcDbObjectId of the database-resident object being represented.
This method is reserved for future use.
This method returns the CLSID of the COM object.
This method is used to tell the COM object that it no longer represents a database-resident object.
This method tells the COM object that the AcDbObject it represents has been modified. This notification is explained in the section AcAxOleLinkManager. The COM object is then responsible for firing notification to all its clients through established connection points.