#include <PsnObjectHandle.h>
Inheritance diagram for PsnObjectHandle:


Public Methods | |
| PsnObjectHandle (PsSimulatedObject &objet) | |
| the contructor | |
| virtual | ~PsnObjectHandle () |
| destructor | |
| virtual void | notifyChangeInControlParameter (PsOutputNT *) |
| receive notification of a change in a control parameter the produced information could be used to synchronize control parameter data only when it's relevent | |
| virtual bool | controlParametersChanged (bool keepChanged=false) |
| has a least one control parameter changed since last query where keepChanged was false | |
| virtual void | receiveEvent (const PsEvent &event)=0 |
| receive an event a clone of that event will be stored | |
| virtual void | receiveEvent (PsEvent *event)=0 |
| receive an event responsability of deleting the evnt passed as parameter is transfered to the object handle | |
| virtual void | registerEventListenerForEvent (PsEventListener &eventListener, const PsEventIdentifier &eventId) |
| registration of an event listener for the simulation objet | |
| virtual void | sendEventsForSignal (PsEvent &event, const PsEventIdentifier &sigId)=0 |
| send events to simulated objects registered for sigId | |
| virtual bool | receiveRegistrationForSignal (const PsEventIdentifier &sigId, const PsName ®istrant, const PsEventIdentifier &eventId)=0 |
| receive the registration for signal sigId by registrant. | |
| virtual bool | cancelRegistrationForSignal (const PsEventIdentifier &sigId, const PsName ®istrant)=0 |
| cancel the registration made by registrant for sigId | |
| const PsSimulatedObject & | getSimulatedObject () const |
| get a reference to the encapsulated simulated object | |
| PsSimulatedObject & | getSimulatedObject () |
| get a reference to the encapsulated simulated object | |
Protected Methods | |
| virtual void | attributeRead () |
| called when an attribute is read | |
| virtual bool | getAttributeRead (bool keepChanged=false) |
| test to see if an attribute was read. | |
Protected Attributes | |
| bool | _attributeRead |
| a boolean indicating if an attribute of the handled object was read since last call to getAttributeRead ( true ) | |
| PsSimulatedObject & | _myObject |
| a reference to the encapsulated object | |
| bool | _aControlParameterHasChanged |
| memorise changes to a control parameter of the controlled object | |
Friends | |
| class | PsAttribute |
in particular, objects handle comme in two flavors : reference object handles and mirror handles, depending on whether the controller is manipulating a reference object or a miror of a reference object. an object handle, once created, is responsible for the destruction of the correspondong simulated object; after having obtained responsability for this destruction in the constructor.
Definition at line 49 of file PsnObjectHandle.h.
|
|
the contructor
Definition at line 24 of file PsnObjectHandle.cxx. References PsObjectDescriptor::_destroySimulatedObject, _myObject, PsSimulatedObject::getObjectDescriptor(), and PsSimulatedObject::setObjectHandle().
00024 : 00025 _myObject (objet), 00026 _aControlParameterHasChanged (false), 00027 _attributeRead ( false ) 00028 { 00029 _myObject.setObjectHandle(this) ; 00030 _myObject.getObjectDescriptor()._destroySimulatedObject = false ; 00031 } |
|
|
destructor
Definition at line 34 of file PsnObjectHandle.cxx. References _myObject, and PsSimulatedObject::getController().
00035 {
00036 // don't delete the controller when it deletes it's object handle
00037 if (& _myObject.getController() != &_myObject )
00038 {
00039 delete &_myObject ;
00040 }
00041 }
|
|
|
called when an attribute is read
Reimplemented in PsnMirrorObjectHandle. Definition at line 73 of file PsnObjectHandle.cxx. References _attributeRead. Referenced by PsnMirrorObjectHandle::attributeRead(), and PsAttribute::touch().
00074 {
00075 _attributeRead = true ;
00076 }
|
|
||||||||||||
|
cancel the registration made by registrant for sigId
Implemented in PsnMirrorObjectHandle, and PsnReferenceObjectHandle. Referenced by PsSimulatedObject::cancelRegistrationForSignalBy(). |
|
|
has a least one control parameter changed since last query where keepChanged was false
Definition at line 60 of file PsnObjectHandle.cxx. References _aControlParameterHasChanged. Referenced by PsSimulatedObject::insertInStream(), and PsSimulatedObject::pack().
00061 {
00062 bool result ;
00063 result = _aControlParameterHasChanged ;
00064 _aControlParameterHasChanged = keepChanged && _aControlParameterHasChanged ;
00065 return result;
00066 }
|
|
|
test to see if an attribute was read.
Definition at line 78 of file PsnObjectHandle.cxx. References _attributeRead. Referenced by PsnMirrorObjectHandle::unpack().
00079 {
00080 bool result = _attributeRead ;
00081 if ( _attributeRead ) _attributeRead = keepChanged ;
00082 return result ;
00083 }
|
|
|
get a reference to the encapsulated simulated object
Definition at line 49 of file PsnObjectHandle.cxx. References _myObject.
00050 {
00051 return _myObject ;
00052 }
|
|
|
|
receive notification of a change in a control parameter the produced information could be used to synchronize control parameter data only when it's relevent
Definition at line 55 of file PsnObjectHandle.cxx. References _aControlParameterHasChanged. Referenced by PsGenericControlParameter< Type, AncestorClass >::realSet().
00056 {
00057 _aControlParameterHasChanged = true;
00058 }
|
|
|
receive an event responsability of deleting the evnt passed as parameter is transfered to the object handle
Implemented in PsnDuplicatedObjectHandle, PsnMirrorObjectHandle, PsnMomeMirrorObjectHandle, PsnMomeReferenceObjectHandle, and PsnReferenceObjectHandle. |
|
|
receive an event a clone of that event will be stored
Implemented in PsnDuplicatedObjectHandle, PsnMirrorObjectHandle, PsnMomeMirrorObjectHandle, and PsnReferenceObjectHandle. Referenced by PsSimulatedObject::sendEvent(), PsnSignalDispatcher::sendEventsForSignal(), and PsSimulatedObject::sendValuedEvent(). |
|
||||||||||||||||
|
receive the registration for signal sigId by registrant.
Implemented in PsnMirrorObjectHandle, and PsnReferenceObjectHandle. Referenced by PsSimulatedObject::registerForSignalBy(). |
|
||||||||||||
|
registration of an event listener for the simulation objet
Reimplemented in PsnReferenceObjectHandle. Definition at line 68 of file PsnObjectHandle.cxx.
00069 {
00070
00071 }
|
|
||||||||||||
|
send events to simulated objects registered for sigId
Implemented in PsnMirrorObjectHandle, and PsnReferenceObjectHandle. Referenced by PsSimulatedObject::fireSignal(), and PsSimulatedObject::fireValuedSignal(). |
|
|
Definition at line 121 of file PsnObjectHandle.h. |
|
|
memorise changes to a control parameter of the controlled object
Definition at line 136 of file PsnObjectHandle.h. Referenced by controlParametersChanged(), and notifyChangeInControlParameter(). |
|
|
a boolean indicating if an attribute of the handled object was read since last call to getAttributeRead ( true )
Definition at line 130 of file PsnObjectHandle.h. Referenced by attributeRead(), and getAttributeRead(). |
|
| Documentation generated on Mon Nov 25 15:26:17 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |