RemoveAllFromDestCollection2
Purpose
RemoveAllFromDestCollection2 removes all objects in a collection.
Description
The relationship id is specified by the GUID relationship id or internal relationship id (one of which must be set). If the destination class defined in the relationship is a superclass, the destClass and allClasses parameters determine the class of objects to be removed. Only the relationships of the current version of the CMetaObject are affected.
Requirements
The internal object id must be set in the object. CMetaObject must be an object in the origin class.
Syntax
HRESULT RemoveAllFromDestCollection2(
const GUID &gRelID,
const OBJECTID_t lRelID = NULLLOID,
const OBJECTID_t destClass = NULLLOID,
const bool allClasses = false);
Argument |
In/Out |
Description |
gRelID |
In |
Relationship ID. |
lRelID |
In |
Internal Relationship ID |
destClass |
In |
If the allClasses parameter is = true, the destClass parameter is ignored. If the allClasses parameter = false: If destClass = 0, the collection for the destination class defined in the relationship is removed. If the destination class in the relationship is a superclass, destclass defines the class type of the collection that will be removed |
allClasses |
In |
If the destination class in the relationship is a superclass, setting allClasses = true will remove the collections of all class types (superclass and subclasses). If allClasses = true and the destination class in the relationship is not a superclass, the collection for the destination class defined in the relationship is removed. |