Diana
0.8.3
|
#include <DianaBasic.hpp>
Public Member Functions | |
DianaCollection (Common::Types::CapeBoolean owning=true) | |
Common::Types::CapeBoolean | getOwning () const |
void | setOwning (const Common::Types::CapeBoolean _owning) |
const Common::Types::CapeString & | GetComponentName () const throw (Common::Error::ECapeUnknown) |
void | SetComponentName (const Common::Types::CapeString &_name) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
const Common::Types::CapeString & | GetComponentDescription () const throw (Common::Error::ECapeUnknown) |
void | SetComponentDescription (const Common::Types::CapeString &_description) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Common::Types::CapeLong | Count () const throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation) |
Common::Identification::ICapeIdentification * | ItemByIndex (Common::Types::CapeLong index) const throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfBounds) |
Common::Identification::ICapeIdentification * | ItemByName (const Common::Types::CapeString &name) const throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument, Common::Error::ECapeFailedInitialisation, Common::Error::ECapeOutOfBounds) |
void | Add (Common::Identification::ICapeIdentification *item, const Common::Types::CapeString &alias=Common::Types::CapeStringUNDEFINED) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
void | AddIndexed (Common::Identification::ICapeIdentification *item, const Common::Types::CapeString &alias=Common::Types::CapeStringUNDEFINED) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
void | AddArray (Common::Identification::ICapeIdentification *item, const std::vector< Common::Identification::ICapeIdentification * > &skalItems, const Common::Types::CapeString &alias=Common::Types::CapeStringUNDEFINED) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Common::Identification::ICapeIdentification * | GetArray (Common::Types::CapeLong index) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Common::Types::CapeLong | ItemIndexByName (const Common::Types::CapeString &name) const throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Protected Types | |
typedef std::vector < Common::Identification::ICapeIdentification * > | vecident |
typedef std::vector < Common::Types::CapeLong > | vecindices |
typedef std::map< std::string, Common::Types::CapeLong > | mapindices |
Protected Member Functions | |
Common::Types::CapeLong | mapNameToPosition (const Common::Types::CapeString &name) const |
Common::Identification::ICapeIdentification * | getItemFromPool (Common::Types::CapeLong pos) const throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfBounds) |
void | addStringMapping (const Common::Types::CapeString &name, const Common::Types::CapeString &alias, Common::Types::CapeLong pos) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Protected Attributes | |
Common::Types::CapeString | strCollName |
collection name | |
Common::Types::CapeString | strCollDescription |
collection description | |
vecident | vecItemsPool |
vecindices | vecItems |
vecindices | arrayItems |
mapindices | mapItems |
mapindices | mapItemsIndexed |
Private Attributes | |
Common::Types::CapeBoolean | owning |
Diana realization of the ICapeCollection interface
typedef std::map<std::string, Common::Types::CapeLong> mapindices [protected] |
mapping from item name to item position in vecident.
typedef std::vector<Common::Identification::ICapeIdentification*> vecident [protected] |
vector of the ICapeIdentification items type
typedef std::vector<Common::Types::CapeLong> vecindices [protected] |
mapping from item index to item position in vecident
void Add | ( | Common::Identification::ICapeIdentification * | item, |
const Common::Types::CapeString & | alias = Common::Types::CapeStringUNDEFINED |
||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Add an element in the end of the collection (not defined in Python).
void AddArray | ( | Common::Identification::ICapeIdentification * | item, |
const std::vector< Common::Identification::ICapeIdentification * > & | skalItems, | ||
const Common::Types::CapeString & | alias = Common::Types::CapeStringUNDEFINED |
||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Add an arrayed element with all skalar elements in the end of the collection and update index array . The elements can be accessed as skalar or arrayed elements. Also entries in the root array are generated, to make a backward mapping from the item index to the root possible.
void AddIndexed | ( | Common::Identification::ICapeIdentification * | item, |
const Common::Types::CapeString & | alias = Common::Types::CapeStringUNDEFINED |
||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Add an element in the end of the collection and update index array (not defined in Python).
Referenced by DianaContinuation::DianaContinuation(), HopfPointContinuation::HopfPointContinuation(), SingAnalyser::SingAnalyser(), and SteadyStateContinuation::SteadyStateContinuation().
void addStringMapping | ( | const Common::Types::CapeString & | name, |
const Common::Types::CapeString & | alias, | ||
Common::Types::CapeLong | pos | ||
) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [protected] |
connects name and alias with position in the vecItemsPool.
Common::Types::CapeLong Count | ( | ) | const throw (Common::Error::ECapeUnknown, Common::Error::ECapeFailedInitialisation) [virtual] |
return the number of items in the collection.
Implements ICapeCollection.
Referenced by ParameterFittingTask::GetFixedSoughtParamsCount().
Common::Identification::ICapeIdentification* GetArray | ( | Common::Types::CapeLong | index | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
Get the array entry for some index of the indexed collection entries. If it is a skalar element, get the normal item as in ItemByIndex.
const Common::Types::CapeString& GetComponentDescription | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
gets the description of the component.
Implements ICapeIdentification.
const Common::Types::CapeString& GetComponentName | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
gets the name of the component.
Implements ICapeIdentification.
Common::Identification::ICapeIdentification* getItemFromPool | ( | Common::Types::CapeLong | pos | ) | const throw (Common::Error::ECapeUnknown, Common::Error::ECapeOutOfBounds) [protected] |
returns ICapeIdentification item by it's position in the items pool.
return an element from the collection. The requested element is identified by it's position in the collection.
index | index of item |
Implements ICapeCollection.
Referenced by SingAnalyser::addDerivativeByParameter(), DianaContinuation::packFreeParameters(), and DianaContinuation::unpackFreeParameters().
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 |
Implements ICapeCollection.
Common::Types::CapeLong ItemIndexByName | ( | const Common::Types::CapeString & | name | ) | const throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
add an element in the end of the collection and update index array (not defined in Python).
Common::Types::CapeLong mapNameToPosition | ( | const Common::Types::CapeString & | name | ) | const [protected] |
mapping from item name to item index.
void SetComponentDescription | ( | const Common::Types::CapeString & | _description | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
sets the description of the component.
_description | the description of the component |
Implements ICapeIdentification.
void SetComponentName | ( | const Common::Types::CapeString & | _name | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) [virtual] |
sets the name of the component.
_name | the name of the component |
Implements ICapeIdentification.
vecindices arrayItems [protected] |
vector with position of array or skalar element.
mapindices mapItems [protected] |
string to CapeLong mapping to get item position by it's name.
mapindices mapItemsIndexed [protected] |
string to CapeLong mapping to get item position by it's name (only for indexed variables).
Common::Types::CapeBoolean owning [private] |
Flag whether the collection owns the Paramters, or not
vecindices vecItems [protected] |
vector with item position.
vecident vecItemsPool [protected] |
vector of the ICapeIdentification items.