IModelKeyReference 接口 (dbgmodel.h)

对数据模型对象的键的引用。

遗产

IModelKeyReference 继承自 IUnknown。

方法

IModelKeyReference 接口具有这些方法。

 
IModelKeyReference::AddRef

IModelKeyReference::AddRef 方法递增对象上接口的引用计数。
IModelKeyReference::GetContextObject

当对对象的键引用调用时,IModelKeyReference::GetContextObject 方法获取对象的上下文。
IModelKeyReference::GetKey

在密钥引用上调用 IModelKeyReference::GetKey 方法时,获取基础键的值以及与密钥关联的任何元数据。
IModelKeyReference::GetKeyName

在密钥引用上调用 IModelKeyReference::GetKeyName 方法时,获取基础密钥的名称。
IModelKeyReference::GetKeyValue

在密钥引用上调用 IModelKeyReference::GetKeyValue 方法时,获取基础键的值及其关联的任何元数据。
IModelKeyReference::GetOriginalObject

调用密钥引用时,IModelKeyReference::GetOriginalObject 方法获取创建密钥引用的实例对象。
IModelKeyReference::QueryInterface

IModelKeyReference::QueryInterface 方法检索指向对象上支持的接口的指针。
IModelKeyReference::Release

IModelKeyReference::Release 方法递减对象上接口的引用计数。
IModelKeyReference::SetKey

在键引用上调用 IModelKeyReference::SetKey 方法时,将覆盖作为基础键值的对象。
IModelKeyReference::SetKeyValue

在键引用上调用 IModelKeyReference::SetKeyValue 方法时,设置作为基础键值的对象的值。

言论

密钥引用

关键引用实质上是特定对象的键句柄。 客户端可以通过 GetKeyReference 等方法检索此类句柄,稍后使用句柄获取或设置键的值,而无需保留原始对象。 这种类型的对象是 IModelKeyReference 或 IModelKeyReference2 接口的实现,该接口被装箱到 IModelObject。 查询后,模型对象将返回一种 ObjectKeyReference,然后内部值是保证可查询 IModelKeyReference 的VT_UNKNOWN。 在此过程中,可以保证静态转换为 IModelKeyReference。

要求

要求 价值
标头 dbgmodel.h

另请参阅

调试器数据模型C++概述