ICapeCollection Interface

This interface provides the behaviour for a read-only collection. It can be used for storing ports or parameters.

Definition

Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
[ComImportAttribute]
[ComVisibleAttribute(false)]
[GuidAttribute("678c099a-0093-11d2-a67d-00105a42887f")]
public interface ICapeCollection

Remarks

The aim of the Collection interface is to give a CAPE-OPEN component the possibility to expose a list of objects to any client of the component. The client will not be able to modify the collection, i.e. removing, replacing or adding elements. However, since the client will have access to any CAPE-OPEN interface exposed by the items of the collection, it will be able to modify the state of any element.

CAPE-OPEN Collections don’t allow exposing basic types such as numerical values or strings. Indeed, using CapeArrays is more convenient here.

Not all the items of a collection must belong to the same class. It is enough if they implement the same interface or set of interfaces. A CAPE-OPEN specification a component that exposes a collection interface must state clearly which interfaces must be implemented by all the items of the collection.

Reference document: Collection Common Interface

Methods

Count Gets the number of items currently stored in the collection.
Item Gets the specific item stored within the collection, identified by its ICapeIdentification.ComponentName or 1-based index passed as an argument to the method.

See Also