Collection interfaces

Description

The collection interfaces provide a convenient way for client code to iterate over various types of objects. All CAL collections are numbered beginning at 1, not 0.

Inheritance

ICC items inherit from IDispatch.

Read-only properties

Count

Gets the count of items in the collection

InitErrors

Gets any errors encountered while initializing the collection

Item (default property)

Gets an item from the collection (using the 1-based index)

Methods

Add

Adds an item to the end of the collection

Remove

Removes an item from the collection (using the 1-based index)

Examples

Creation

You can get a collection object from various methods, including the empty collection properties of IClearCase.

Add

Adds an item to the end of the collection

Category

Method

VB syntax

Sub Add(pItem As CCitem)

Visual C++ syntax

HRESULT Add(CCItem* pItem);
Parameter
Description
pItem
Must be of the type of one of these CCitem names.

Member of: Collection interfaces

Count

Gets the count of items in the collection

Category

Read-only property

VB syntax

Property Count As Long

Visual C++ syntax

long GetCount();

Member of: Collection interfaces

InitErrors

Gets any errors encountered while initializing the collection

Category

Read-only property

VB syntax

Property InitErrors As String

Visual C++ syntax

_bstr_t GetInitErrors();

Remarks

This property is applicable only to some collections. To enable this property for the ICCVersions, ICCViews, and ICCVOBs collections, set to False the FailIfErrors parameter of IClearCase::VOBs, IClearCase::Views, or ICCActivity::ChangeSet .

For the ICCBaselines, ICCComponents, ICCFolders, ICCProjects, ICCPolicies, and ICCStreams collections, there is no corresponding FailIfErrors parameter to set. Initialization of these collections always proceed in the face of errors.

Member of: Collection interfaces

Item

Gets an item from the collection (using the 1-based index)

Category

Read-only property

VB syntax

Property Item(Index As Long) As CCitem

Visual C++ syntax

CCitemPtr GetItem(long Index);
Parameter
Description
Index
The 1-based index of the item in the collection to get.

Return value

One of the CCitem name types.

Member of: Collection interfaces

Remove

Removes an item from the collection (using the 1-based index)

Category

Method

VB syntax

Sub Remove(Index As Long)

Visual C++ syntax

HRESULT Remove(long Index);
Parameter
Description
Index
The 1-based index of the item in the collection to remove.

Member of: Collection interfaces


Feedback