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
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
Examples
- Displaying an activity's change set (CCVersions collection)
- Querying for checked-out files
- Using the empty collections properties to create your own collections
- Displaying information about all branches sprouting from a version (Visual Basic)
- Displaying information about all branches sprouting from a version (Perl)
- Displaying information about a user's streams
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
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.
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