RemoveAllFromOrigCollection2
Purpose
RemoveAllFromOrigCollection2 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 origin class defined in the relationship is a superclass, the origClass 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 destination class.
Syntax
HRESULT RemoveAllFromOrigCollection2(
const GUID &gRelID,
const OBJECTID_t lRelID = NULLLOID,
const OBJECTID_t origClass = NULLLOID,
const bool allClasses = false);
Argument |
In/Out |
Description |
gRelID |
In |
Relationship ID. |
lRelID |
In |
Internal Relationship ID |
origClass |
In |
If the allClasses parameter is = true, the origClass parameter is ignored. If the allClasses parameter = false: If origClass = 0, the collection for the destination class defined in the relationship is removed. if the origin class in the relationship is a superclass, origclass defines the class type of the collection that will be removed. |
allClasses |
In |
If the origin 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 origin class in the relationship is not a superclass, the collection for the origin class defined in the relationship is removed. |