Share via


IClusterEnumerable interface

Represents a collection of objects. Many of the CCP API methods return collections. For example, the ICluster::ListJobs method returns a collection of jobs for a specified user.

To enumerate the objects in the collection, call the IClusterEnumerable::GetEnumerator method to get an IEnumVARIANT interface pointer. Use the IEnumVARIANT::Next method to enumerate the items of the collection. Each item in the collection is a variant whose type is VT_DISPATCH. Query the pdispVal member of the variant to get the interface to the object. For example, if you called ListJobs, you would query pdispVal for the IJob interface.

This interface is also used to build a collection of objects (for example, when calling the ICluster::AddJobs method). To create an instance of this object for building a collection, call the ICluster::CreateClusterEnumerable method.

Members

The IClusterEnumerable interface inherits from the IDispatch interface. IClusterEnumerable also has these types of members:

  • Methods

Methods

The IClusterEnumerable interface has these methods.

Method Description
Add

Adds an object to the collection.

get_IsReadOnly

Indicates whether the collection is read-only.

GetEnumerator

Retrieves an enumerator that you use to enumerate the items of the collection.

Remove

Removes an object from the collection.

 

Examples

For an example that enumerates the items in a collection, see Listing Jobs. For an example that builds a collection, see the second example in Submitting a Job to the Scheduling Queue.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

CCP Interfaces