IModelObject::GetNumberOfParentModels 메서드(dbgmodel.h)

GetNumberOfParentModels 메서드는 지정된 개체 instance 연결된 부모 모델 수를 반환합니다. 부모 모델은 부모 모델 체인의 선형 순서에서 깊이 우선 속성을 검색합니다.

구문

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.
}

요구 사항

요구 사항
헤더 dbgmodel.h

추가 정보

IModelObject 인터페이스