Diana
0.8.3
|
#include <CapeBasic.hpp>
Public Member Functions | |
virtual | ~ICapeCollection () |
virtual Common::Types::CapeLong | Count () const =0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation) |
virtual Common::Identification::ICapeIdentification * | ItemByIndex (Common::Types::CapeLong index) const =0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfBounds) |
virtual Common::Identification::ICapeIdentification * | ItemByName (const Common::Types::CapeString &name) const =0 throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfBounds) |
Friends | |
std::ostream & | operator<< (std::ostream &out_file, ICapeCollection &coll) |
The aim of the ICapeCollection 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.
virtual ~ICapeCollection | ( | ) | [inline, virtual] |
Virtual default destructor.
virtual Common::Types::CapeLong Count | ( | ) | const throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation) [pure virtual] |
return the number of items in the collection.
Implemented in DianaCollection.
Referenced by DianaOptimizationPoint::GetParametersCount(), and DianaSensOptimizationPoint::GetParametersCount().
virtual Common::Identification::ICapeIdentification* ItemByIndex | ( | Common::Types::CapeLong | index | ) | const throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfBounds) [pure virtual] |
return an element from the collection. The requested element is identified by it's position in the collection.
index | index of item |
Implemented in DianaCollection.
Referenced by SteadyStateContinuation::GetVariableName(), HopfPointContinuation::GetVariableName(), and SingAnalyser::GetVariableName().
virtual Common::Identification::ICapeIdentification* ItemByName | ( | const Common::Types::CapeString & | name | ) | const throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfBounds) [pure virtual] |
return an element from the collection. The requested element is identified by its actual name in the collection. The name of an element is the value returned by the ComponentName() method of its ICapeIdentification interface.
name | name of item |
Implemented in DianaCollection.
Referenced by DianaContinuation::DianaContinuation().
std::ostream& operator<< | ( | std::ostream & | out_file, |
ICapeCollection & | coll | ||
) | [friend] |
ostream output operator for the ICapeCollection class.