ITargetObjectCol Interface

Meta Data Services Programming

Meta Data Services Programming

ITargetObjectCol Interface

A target object collection is a set of repository object versions that are attached to a particular source object version through a relationship collection. At most, one version of each repository object is present in any target object collection.

When to Use

Use the ITargetObjectCol interface to manage the repository objects that belong to a particular relationship collection. With this interface, you can:

  • Get a count of the number of objects in the collection.

  • Enumerate the objects in the collection.

  • Add and remove objects to and from the collection.

  • If the collection is sequenced, place an object in a specific spot in the collection sequence.

  • Retrieve an IRepositoryObject pointer to one of the objects in the collection.

  • Obtain the type of the collection.

  • Retrieve an interface pointer for the collection's source object.

  • Refresh the cached image of the target object collection.
Methods
IUnknown methods Description
QueryInterface Returns pointers to supported interfaces
AddRef Increments the reference count
Release Decrements the reference count

IDispatch method Description
GetIDsOfNames Maps a single member and a set of argument names to a corresponding set of dispatch identifiers
GetTypeInfo Retrieves a type information object, which can be used to get the type information for an interface
GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1)
Invoke Provides access to properties and methods exposed by an Automation object

IObjectCol method Description
get_Count Retrieves a count of the number of objects in the collection.
_NewEnum Retrieves an enumeration interface pointer for the collection. This interface is a standard Automation enumeration interface. It supports the Clone, Next, Reset, and Skip methods.
get_Item Retrieves an IRepositoryObject interface pointer for the specified collection object.
Refresh Refreshes the cached image of the target object collection.

ITargetObjectCol method Description
Add Adds an object to the collection
get_Source Retrieves an interface pointer for the collection's source object
get_Type Retrieves the object identifier for the collection's definition object
Insert Inserts an object into a specific spot in a sequenced collection
Move Moves an object from one spot to another in a sequenced collection
Remove Removes an object from the collection

Remarks

The ITargetObjectCol interface is similar to the IRelationshipCol interface. Use the ITargetObjectCol interface when you are primarily interested in working with objects. Use the IRelationshipCol interface when you are primarily interested in working with relationships between objects.

See Also

IRelationshipCol Interface

RelationshipCol Class