FindAllOccurrences
Purpose
The CMetaObject class FindAllOccurrences function returns a list of version keys for the versions of the object that satisfy a search condition.
Description
The types of searches possible are: find a property value, find when a class contained a property, and find when a metamodel contained a class.
When a CMetaProperty object is used, two types of search are allowed:
When a class name, class GUID, or class loid is given, the calling object is assumed to be a metamodel definition and it is determined if the class exists in the metamodel (AIMHasClasses).
Requirements:
Syntax
HRESULT FindAllOccurrences(
vector<CMetaVersionedObjectKey>& returnKeys,
CMetaProperty& prop,
const TCHAR *strLabel = NULL);
HRESULT FindAllOccurrences(
vector<CMetaVersionedObjectKey>& returnKeys,
const GUID& gClassID,
const OBJECTID_t lClassID = NULLLOID,
const TCHAR *className = NULL,
const TCHAR *strLabel = NULL);
Argument |
In/Out |
Description |
returnKeys |
In/Out |
Reference to the list of CMetaVersionedObjectKeys that will hold the collection returned. The list is cleared before adding the return collection. |
prop |
In |
Specifies a property to search for. The property name must be set. |
gClassID |
In |
Class GUID. |
IClassID |
In |
Class internal ID. |
className |
In |
Class name. |
strLabel |
In |
Label string to filter the objects; only object versions with the label will be returned |