Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsSensitiveNotifyingInput< Type > Class Template Reference

defines what a notifying input is. More...

#include <PsSensitiveNotifyingInput.h>

Inheritance diagram for PsSensitiveNotifyingInput< Type >:

Inheritance graph
[legend]
Collaboration diagram for PsSensitiveNotifyingInput< Type >:

Collaboration graph
[legend]
List of all members.

Public Methods

 PsSensitiveNotifyingInput (const PsName &nom, PsSimulatedObject &prop, bool makeConnectable, const int requestedPrecisionLevel=PsPolatorNT::defaultPrecisionLevel)
 constructor

virtual ~PsSensitiveNotifyingInput ()
 destructor

virtual void signalChange ()
 called by the connected output when it's value changes

const PsEventIdentifiergetAssociatedEventId () const
 get the event id of the sent event when a change occurs on the connected output


Protected Attributes

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


Detailed Description

template<typename Type>
class PsSensitiveNotifyingInput< Type >

defines what a notifying input is.

a notifying input, when plugged to an output, will send an event to the owner of the notifying input. the event sent has _associatedEventId has eventId, which is constructed of the name of the notifying input, to which Changed is appended. this eventId can be querried with the getAssociatedEventId() method.

Definition at line 32 of file PsSensitiveNotifyingInput.h.


Constructor & Destructor Documentation

template<typename Type>
PsSensitiveNotifyingInput< Type >::PsSensitiveNotifyingInput const PsName   nom,
PsSimulatedObject   prop,
bool    makeConnectable,
const int    requestedPrecisionLevel = PsPolatorNT::defaultPrecisionLevel
[inline]
 

constructor

Definition at line 36 of file PsSensitiveNotifyingInput.h.

References PsSensitiveNotifyingInput< Type >::_associatedEventId, PsAttribute::_name, and PsPolatorNT::defaultPrecisionLevel.

00039                                                                                                   : 
00040       PsSensitiveInput<Type>(nom, prop, makeConnectable, requestedPrecisionLevel), 
00041       _associatedEventId (PsString(_name.getCString() )+"Changed")
00042    {
00043    }

template<typename Type>
virtual PsSensitiveNotifyingInput< Type >::~PsSensitiveNotifyingInput   [inline, virtual]
 

destructor

Definition at line 46 of file PsSensitiveNotifyingInput.h.

00046 {};


Member Function Documentation

template<typename Type>
const PsEventIdentifier& PsSensitiveNotifyingInput< Type >::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 PsSensitiveNotifyingInput.h.

References PsSensitiveNotifyingInput< Type >::_associatedEventId.

00059    {
00060       return _associatedEventId ;
00061    }

template<typename Type>
virtual void PsSensitiveNotifyingInput< Type >::signalChange   [inline, virtual]
 

called by the connected output when it's value changes

Reimplemented from PsSensitiveInput< Type >.

Definition at line 49 of file PsSensitiveNotifyingInput.h.

References PsSensitiveNotifyingInput< Type >::_associatedEventId, PsAttribute::_owner, PsSimulatedObject::sendEvent(), and PsSensitiveInput< Type >::signalChange().

00049                                {
00050 #ifdef _DEBUGALIAS
00051       cerr<<"PsSensitiveNotifyingInput::signalChange()"<<endl;
00052 #endif
00053       PsSensitiveInput<Type>::signalChange();
00054       _owner.sendEvent(&_owner,_associatedEventId);
00055    }


Member Data Documentation

template<typename Type>
PsEventIdentifier PsSensitiveNotifyingInput< Type >::_associatedEventId [protected]
 

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

Definition at line 65 of file PsSensitiveNotifyingInput.h.

Referenced by PsSensitiveNotifyingInput< Type >::getAssociatedEventId(), PsSensitiveNotifyingInput< Type >::PsSensitiveNotifyingInput(), and PsSensitiveNotifyingInput< Type >::signalChange().


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

Documentation generated on Mon Nov 25 15:26:27 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001