OMK::ControlParameter< T > Class Template Reference

a typed control parameter More...

#include <OMKControlParameter.h>

Inheritance diagram for OMK::ControlParameter< T >:

Inheritance graph
[legend]
Collaboration diagram for OMK::ControlParameter< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ControlParameter (SimulatedObject &owner, const Name &attributeName, const EventIdentifier &eventId)
 contructor, with the associated envent Id
const EventIdentifiergetAssociatedEventId () const
 get the event id of the sent event when a change occurs on the connected output
virtual const T & getLastExactValue () const=0
 get the last approved value of this control parameter
virtual const DategetDateOfLastExactValue () const=0
 get the last approved value of this control parameter
virtual void set (const T &val)=0
 suggest a new value to this control parameter
virtual const T & get () const=0
 read the last available value if the control parameter
virtual bool connect (const Name &objectName, const Name &inputName)=0
 connect the control parameter to a public input of another object
virtual bool connect (SimulatedObject &object, const Name &inputName)=0
 connect the control parameter to a public input of another object
virtual bool connect (SimulatedObject *pointerToObject, const Name &inputName)=0
 connect the control parameter to a public input of another object

Protected Member Functions

virtual void realSet (const T &val)=0
 really change the value in the history

Protected Attributes

EventIdentifier _associatedEventId
 event id of the sent event when a change occurs on the control parameter

Friends

class ChangedControlParameterEventListener< T >

Detailed Description

template<typename T>
class OMK::ControlParameter< T >

a typed control parameter

this class is "template <class T>" where type must derive from OMKType

Author:
Thierry Duval
Version:
3.1 (revision $revision$

Definition at line 46 of file OMKControlParameter.h.


Constructor & Destructor Documentation

template<typename T>
OMK::ControlParameter< T >::ControlParameter ( SimulatedObject owner,
const Name attributeName,
const EventIdentifier eventId 
) [inline]

contructor, with the associated envent Id

Definition at line 50 of file OMKControlParameter.h.

00050                                                                                                             :
00051       KernelAttribute( owner, attributeName ),
00052       _associatedEventId( eventId )
00053    {
00054       //cerr<<"ControlParameter: "<<_associatedEventId<<endl;
00055    }


Member Function Documentation

template<typename T>
const EventIdentifier& OMK::ControlParameter< T >::getAssociatedEventId (  )  const [inline]

get the event id of the sent event when a change occurs on the connected output

Definition at line 58 of file OMKControlParameter.h.

Referenced by OMK::GenericControlParameter< T, AncestorClass >::set().

00059    {
00060       return _associatedEventId ;
00061    }

template<typename T>
virtual const T& OMK::ControlParameter< T >::getLastExactValue (  )  const [pure virtual]

get the last approved value of this control parameter

Implemented in OMK::GenericControlParameter< T, AncestorClass >.

template<typename T>
virtual const Date& OMK::ControlParameter< T >::getDateOfLastExactValue (  )  const [pure virtual]

get the last approved value of this control parameter

Implemented in OMK::GenericControlParameter< T, AncestorClass >.

template<typename T>
virtual void OMK::ControlParameter< T >::set ( const T &  val  )  [pure virtual]

suggest a new value to this control parameter

Implemented in OMK::ControlParameterDuplique< Type >, and OMK::GenericControlParameter< T, AncestorClass >.

template<typename T>
virtual const T& OMK::ControlParameter< T >::get (  )  const [pure virtual]

read the last available value if the control parameter

Implemented in OMK::GenericControlParameter< T, AncestorClass >.

template<typename T>
virtual bool OMK::ControlParameter< T >::connect ( const Name objectName,
const Name inputName 
) [pure virtual]

connect the control parameter to a public input of another object

Parameters:
objectName the object owning inputName
inputName the name of the input to be connected to
Returns:
bool connecting successfull

Implemented in OMK::GenericControlParameter< T, AncestorClass >.

template<typename T>
virtual bool OMK::ControlParameter< T >::connect ( SimulatedObject object,
const Name inputName 
) [pure virtual]

connect the control parameter to a public input of another object

Parameters:
objectthe object owning inputName
inputName the name of the input to be connected to
Returns:
bool connecting successfull

Implemented in OMK::GenericControlParameter< T, AncestorClass >.

template<typename T>
virtual bool OMK::ControlParameter< T >::connect ( SimulatedObject pointerToObject,
const Name inputName 
) [pure virtual]

connect the control parameter to a public input of another object

Parameters:
pointerToObject the object owning inputName
inputName the name of the input to be connected to
Returns:
bool connecting successfull

Implemented in OMK::GenericControlParameter< T, AncestorClass >.

template<typename T>
virtual void OMK::ControlParameter< T >::realSet ( const T &  val  )  [protected, pure virtual]

really change the value in the history

Implemented in OMK::GenericControlParameter< T, AncestorClass >.


Friends And Related Function Documentation

template<typename T>
friend class ChangedControlParameterEventListener< T > [friend]

Definition at line 104 of file OMKControlParameter.h.


Member Data Documentation

template<typename T>
EventIdentifier OMK::ControlParameter< T >::_associatedEventId [protected]

event id of the sent event when a change occurs on the control parameter

Definition at line 111 of file OMKControlParameter.h.

Referenced by OMK::ControlParameter< Type >::getAssociatedEventId().


logo OpenMask

Documentation generated on Mon Jun 9 11:46:01 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007