Metodo IModelObject::GetNumberOfParentModels (dbgmodel.h)

Il metodo GetNumberOfParentModels restituisce il numero di modelli padre collegati all'istanza dell'oggetto specificato. I modelli padre vengono ricercati in profondità delle proprietà nell'ordinamento lineare della catena di modelli padre.

Sintassi

HRESULT GetNumberOfParentModels(
  ULONG64 *numModels
);

Parametri

numModels

Il numero di modelli padre dell'oggetto specificato viene restituito qui.

Valore restituito

Questo metodo restituisce HRESULT che indica l'esito positivo o l'errore.

Commenti

Codice di esempio

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

Requisiti

Requisito Valore
Intestazione dbgmodel.h

Vedi anche

Interfaccia IModelObject