IModelObject::GetNumberOfParentModels 方法 (dbgmodel.h)
GetNumberOfParentModels 方法返回附加到给定对象实例的父模型的数量。 父模型在父模型链的线性排序中搜索属性深度优先。
语法
HRESULT GetNumberOfParentModels(
ULONG64 *numModels
);
参数
numModels
此处返回给定对象的父模型数。
返回值
此方法返回指示成功或失败的 HRESULT。
注解
代码示例
ComPtr<IModelObject> spObject; /* get an object */
ULONG64 numModels;
if (SUCCEEDED(spObject->GetNumberOfParentModels(&numModels)))
{
// numModels contains the number of immediate parent models (does not include
// grand-parents and further generations up). If a key is queried on spObject and
// that instance does not have it, the query will be passed in turn to each of the
// 'numModels' models which are attached to spObject.
}
要求
要求 | 值 |
---|---|
Header | dbgmodel.h |