Diana  0.8.3
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
DianaParameter Class Reference

#include <DianaParameter.hpp>

Inheritance diagram for DianaParameter:
ICapeParameter ICapeIdentification PetriPlace PetriTransition

List of all members.

Classes

class  PtrData

Public Member Functions

 DianaParameter (const DianaParameter &param)
DianaParameteroperator= (const DianaParameter &param)
 DianaParameter (const DianaRealParameterSpec &spec, Common::Parameter::CapeParamMode _mode, const PtrData &_ptr)
 DianaParameter (const DianaRealParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
 DianaParameter (const Diana::DianaNLPRealParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
 DianaParameter (const DianaStateSpec &spec, Common::Parameter::CapeParamMode _mode, const PtrData &_ptr)
 DianaParameter (const DianaIntegerParameterSpec &spec, Common::Parameter::CapeParamMode _mode, const PtrData &_ptr)
 DianaParameter (const DianaIntegerParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
 DianaParameter (const DianaBooleanParameterSpec &spec, Common::Parameter::CapeParamMode _mode, const PtrData &_ptr)
 DianaParameter (const DianaBooleanParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
 DianaParameter (const DianaOptionParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
 DianaParameter (const DianaPointerParameterSpec &spec, Common::Parameter::CapeParamMode _mode, const PtrData &_ptr)
 DianaParameter (const DianaArrayParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
 DianaParameter (const DianaArrayRealParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
 DianaParameter (const DianaArrayStringParameterSpec &spec, Common::Parameter::CapeParamMode _mode)
virtual ~DianaParameter ()
const Common::Types::CapeStringGetComponentName () const throw (Common::Error::ECapeUnknown)
void SetComponentName (const Common::Types::CapeString &_name) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
const Common::Types::CapeStringGetComponentDescription () const throw (Common::Error::ECapeUnknown)
void SetComponentDescription (const Common::Types::CapeString &_description) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
Common::Types::CapeVariant GetValue () throw (Common::Error::ECapeUnknown)
virtual void SetValue (const Common::Types::CapeVariant &_value) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
Common::Types::CapeValidationStatus ValStatus () const throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)
Common::Parameter::CapeParamMode GetMode () const throw (Common::Error::ECapeUnknown)
void SetMode (Common::Parameter::CapeParamMode _mode) throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument)
Common::Parameter::ICapeParameterSpecSpecification () const throw (Common::Error::ECapeUnknown)
Common::Types::CapeBoolean Validate (Common::Types::CapeString &message) throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)
void Reset () throw (Common::Error::ECapeUnknown)
Common::Identification::ICapeIdentificationclone () throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)
Common::Identification::ICapeIdentificationclone (const PtrData &_ptr) throw (Common::Error::ECapeUnknown, Common::Error::ECapeNoImpl)

Protected Member Functions

void updateValueByPointer (Common::Types::CapeBoolean bUpdateDirection) throw (Common::Error::ECapeUnknown)
void updateArrayValue (Common::Types::CapeBoolean bUpdateDirection) throw (Common::Error::ECapeUnknown)
void updateValue (Common::Types::CapeBoolean bUpdateDirection) throw (Common::Error::ECapeUnknown)

Protected Attributes

Common::Types::CapeString name
 parameter name
Common::Types::CapeString description
 parameter description
Common::Parameter::ICapeParameterSpecspecification
 parameter specification
Common::Parameter::CapeParamMode mode
 parameter I/O mode
Common::Types::CapeVariant value
 current parameter value
PtrData ptrInternal

Detailed Description

Diana realization of the ICapeParameter interface.


Constructor & Destructor Documentation

DianaParameter ( const DianaParameter param)

Copy constructor.

DianaParameter ( const DianaRealParameterSpec spec,
Common::Parameter::CapeParamMode  _mode,
const PtrData _ptr 
)

Real specification constructor.

Real specification constructor.

Real specification for nlp task constructor.

DianaParameter ( const DianaStateSpec spec,
Common::Parameter::CapeParamMode  _mode,
const PtrData _ptr 
)

State specification constructor.

Integer specification constructor.

Integer specification constructor.

Boolean specification constructor.

Boolean specification constructor.

Option specification constructor.

Pointer specification constructor.

DianaArrayParameterSpec specification constructor.

DianaArrayRealParameterSpec specification constructor.

DianaArrayStringParameterSpec specification constructor.

virtual ~DianaParameter ( ) [virtual]

Parameter destructor.


Member Function Documentation

Creates a new copy in the memory of the DianaParameter object.

Reimplemented from ICapeIdentification.

Creates a new copy in the memory of the DianaParameter object with new internal parameter data.

This method is special for the DianaParameter only.

gets the description of the component.

Implements ICapeIdentification.

gets the name of the component.

Implements ICapeIdentification.

Gets the mode in which the unit will interpret the parameter. It allows the following values:

  • Input (CAPE_INPUT): the Unit(or whichever owner component) will use its value to calculate.
  • Output (CAPE_OUTPUT): the Unit will place in the parameter a result of its calculations.
  • Input-Output (CAPE_INPUT_OUTPUT): the user inputs an initial estimation value and the user outputs a calculated value.

Implements ICapeParameter.

Gets the value of this parameter. Passed as a CapeVariant that should be the same type as the Parameter type.

Implements ICapeParameter.

DianaParameter& operator= ( const DianaParameter param)

Assignment constructor.

void Reset ( ) throw (Common::Error::ECapeUnknown) [virtual]

Sets the value of the parameter to its default value.

Implements ICapeParameter.

sets the description of the component.

Parameters:
_descriptionthe description of the component

Implements ICapeIdentification.

sets the name of the component.

Parameters:
_namethe name of the component

Implements ICapeIdentification.

Sets the mode in which the unit will interpret the parameter. It allows the following values:

  • Input (CAPE_INPUT): the Unit(or whichever owner component) will use its value to calculate.
  • Output (CAPE_OUTPUT): the Unit will place in the parameter a result of its calculations.
  • Input-Output (CAPE_INPUT_OUTPUT): the user inputs an initial estimation value and the user outputs a calculated value.
    Parameters:
    _modethe flag that indicates whether the Unit should take the parameter as input or as output

Implements ICapeParameter.

Sets the value of this parameter. Passed as a CapeVariant that should be the same type as the Parameter type, if not this is an error (invalid argument).

Parameters:
_valuethe value of this parameter.

Implements ICapeParameter.

Reimplemented in PetriPlace.

Referenced by SingAnalyser::calcTestCondition().

Gets the specification of the parameter. The Get method returns the specification as an interface to the correct specification type.

Implements ICapeParameter.

void updateValueByPointer ( Common::Types::CapeBoolean  bUpdateDirection) throw (Common::Error::ECapeUnknown) [protected]

Updates parameter value.

Parameters:
bUpdateDirectionupdate direction:
  • true updates internal CapeVariant value and value specified by pointer with desired CapeVariant value.
  • false updates value specified by pointer

Checks if the value of the parameter is valid in specification terms and in any other terms that are specialised.

Parameters:
messagemessage conveying information regarding the validation

Implements ICapeParameter.

Gets the flag to indicate parameter validation status (currently not implemented). It has three possible values:

  • notValidated(CAPE_NOT_VALIDATED): its validate() method has not been called after the last time that its value had been changed.
  • invalid(CAPE_INVALID): the last time that its validate() method was called it returned false.
  • valid(CAPE_VALID): the last time that its validate() method was called it returned true.

Implements ICapeParameter.


Member Data Documentation

PtrData ptrInternal [protected]

internal pointer on the ICapeUtility parameter. to avoid such type of parameter value access should be changed functions Get(Set)Value.


The documentation for this class was generated from the following file: