#include <OMKMirrorObjectHandle.h>
Inheritance diagram for OMK::MirrorObjectHandle:
Public Member Functions | |
MirrorObjectHandle (SimulatedObject &objetSimul) | |
constructor | |
virtual | ~MirrorObjectHandle () |
destructor | |
virtual void | linkToNewReferential (Name newProcessName)=0 |
CHADI. | |
virtual void | setMorphosisPhaseTrue ()=0 |
virtual void | registerToReferenceObject (bool needValues)=0 |
Register the mirror to the reference object for regular updates of outputs. | |
virtual void | cancelRegistrationToReferenceObject ()=0 |
cancel registration of the mirror object to the reference object | |
virtual void | insertInStream (std::ostream &=std::cout) const=0 |
should be obsoleted | |
virtual void | extract (std::istream &=std::cin) |
should be obsoleted | |
virtual void | unpack (IncomingSynchronisationMessage &in)=0 |
unpack update information packed in the incoming message by the reference object | |
virtual void | receiveEvent (const Event &event)=0 |
implement receive event so that the event is transfered to the reference object | |
virtual void | receiveEvent (Event *event)=0 |
implement receive event so that the event is transfered to the reference object | |
virtual void | sendEventsForSignal (Event &event, const EventIdentifier &sigId)=0 |
send events for a signal emitted by the reference object. | |
virtual bool | receiveRegistrationForSignal (const EventIdentifier &sigId, const Name ®istrant, const EventIdentifier &eventId)=0 |
receive the registration for signal sigId by registrant, and forward it to the reference object. | |
virtual bool | cancelRegistrationForSignal (const EventIdentifier &sigId, const Name ®istrant)=0 |
cancel the registration made by registrant for sigId | |
Protected Member Functions | |
virtual void | attributeRead ()=0 |
called when an attribute is read | |
virtual void | sendRequestToReferenceObject (RequestType typeMess)=0 |
send a request or an event to the reference object | |
Protected Attributes | |
bool | _registered |
boolean indicating if the mirror is presently registered to the referential | |
SvmLink * | _linkToReferencesProcess |
keep a reference to the link to the process of the reference object | |
Date | _dateOfLastUse |
date of the last time attributes of the objects were positively tested for use | |
bool | morphosisPhase |
CHADI. |
Definition at line 40 of file OMKMirrorObjectHandle.h.
MirrorObjectHandle::MirrorObjectHandle | ( | SimulatedObject & | objetSimul | ) |
constructor
Definition at line 28 of file OMKMirrorObjectHandle.cpp.
00028 : 00029 ObjectHandle (objetSimul), 00030 _registered ( false ), 00031 _dateOfLastUse ( objetSimul.getController().getSimulatedDate() ), 00032 morphosisPhase ( false ) 00033 { 00034 }
MirrorObjectHandle::~MirrorObjectHandle | ( | ) | [virtual] |
virtual void OMK::MirrorObjectHandle::linkToNewReferential | ( | Name | newProcessName | ) | [pure virtual] |
CHADI.
Implemented in OMK::PvmMirrorObjectHandle.
Referenced by OMK::DistributedController::processEvent().
virtual void OMK::MirrorObjectHandle::setMorphosisPhaseTrue | ( | ) | [pure virtual] |
Implemented in OMK::PvmMirrorObjectHandle.
Referenced by OMK::DistributedController::processEvent().
virtual void OMK::MirrorObjectHandle::registerToReferenceObject | ( | bool | needValues | ) | [pure virtual] |
Register the mirror to the reference object for regular updates of outputs.
Implemented in OMK::PvmMirrorObjectHandle.
Referenced by OMK::PvmController::createMirrorObject().
virtual void OMK::MirrorObjectHandle::cancelRegistrationToReferenceObject | ( | ) | [pure virtual] |
cancel registration of the mirror object to the reference object
Implemented in OMK::PvmMirrorObjectHandle.
Referenced by OMK::DistributedController::processEvent().
virtual void OMK::MirrorObjectHandle::insertInStream | ( | std::ostream & | = std::cout |
) | const [pure virtual] |
void MirrorObjectHandle::extract | ( | std::istream & | = std::cin |
) | [virtual] |
should be obsoleted
Implements OMK::Flowable.
Reimplemented in OMK::PvmMirrorObjectHandle.
Definition at line 43 of file OMKMirrorObjectHandle.cpp.
References OMASSERTM.
00044 { 00045 OMASSERTM( false, "use of extract deprecated" ) ; 00046 }
virtual void OMK::MirrorObjectHandle::unpack | ( | IncomingSynchronisationMessage & | in | ) | [pure virtual] |
unpack update information packed in the incoming message by the reference object
Reimplemented from OMK::Flowable.
Implemented in OMK::PvmMirrorObjectHandle.
Referenced by OMK::PvmController::parseSynchronisationMessage().
virtual void OMK::MirrorObjectHandle::receiveEvent | ( | const Event & | event | ) | [pure virtual] |
implement receive event so that the event is transfered to the reference object
Implements OMK::ObjectHandle.
Implemented in OMK::PvmMirrorObjectHandle.
virtual void OMK::MirrorObjectHandle::receiveEvent | ( | Event * | event | ) | [pure virtual] |
implement receive event so that the event is transfered to the reference object
Implements OMK::ObjectHandle.
Implemented in OMK::PvmMirrorObjectHandle.
virtual void OMK::MirrorObjectHandle::sendEventsForSignal | ( | Event & | event, | |
const EventIdentifier & | sigId | |||
) | [pure virtual] |
send events for a signal emitted by the reference object.
shouldn't be called, because registration for signals are forwarded to the reference object wich fires them and sends the corresponding event to a miror of the registrant. This algorithm could be re-written to send the signam to the miror which would then fire the signals locally.
Implements OMK::ObjectHandle.
Implemented in OMK::PvmMirrorObjectHandle.
virtual bool OMK::MirrorObjectHandle::receiveRegistrationForSignal | ( | const EventIdentifier & | sigId, | |
const Name & | registrant, | |||
const EventIdentifier & | eventId | |||
) | [pure virtual] |
receive the registration for signal sigId by registrant, and forward it to the reference object.
eventId | the eventId of the event sent to registrant when sigId is fired |
Implements OMK::ObjectHandle.
Implemented in OMK::PvmMirrorObjectHandle.
virtual bool OMK::MirrorObjectHandle::cancelRegistrationForSignal | ( | const EventIdentifier & | sigId, | |
const Name & | registrant | |||
) | [pure virtual] |
cancel the registration made by registrant for sigId
Implements OMK::ObjectHandle.
Implemented in OMK::PvmMirrorObjectHandle.
virtual void OMK::MirrorObjectHandle::attributeRead | ( | ) | [protected, pure virtual] |
called when an attribute is read
Reimplemented from OMK::ObjectHandle.
Implemented in OMK::PvmMirrorObjectHandle.
virtual void OMK::MirrorObjectHandle::sendRequestToReferenceObject | ( | RequestType | typeMess | ) | [protected, pure virtual] |
bool OMK::MirrorObjectHandle::_registered [protected] |
boolean indicating if the mirror is presently registered to the referential
Definition at line 114 of file OMKMirrorObjectHandle.h.
Referenced by OMK::PvmMirrorObjectHandle::attributeRead(), OMK::PvmMirrorObjectHandle::cancelRegistrationToReferenceObject(), and OMK::PvmMirrorObjectHandle::registerToReferenceObject().
SvmLink* OMK::MirrorObjectHandle::_linkToReferencesProcess [protected] |
keep a reference to the link to the process of the reference object
Definition at line 117 of file OMKMirrorObjectHandle.h.
Referenced by OMK::PvmMirrorObjectHandle::cancelRegistrationForSignal(), OMK::PvmMirrorObjectHandle::linkToNewReferential(), OMK::PvmMirrorObjectHandle::PvmMirrorObjectHandle(), OMK::PvmMirrorObjectHandle::receiveEvent(), OMK::PvmMirrorObjectHandle::receiveRegistrationForSignal(), OMK::PvmMirrorObjectHandle::registerToReferenceObject(), and OMK::PvmMirrorObjectHandle::sendRequestToReferenceObject().
Date OMK::MirrorObjectHandle::_dateOfLastUse [protected] |
date of the last time attributes of the objects were positively tested for use
Definition at line 120 of file OMKMirrorObjectHandle.h.
Referenced by OMK::PvmMirrorObjectHandle::unpack().
bool OMK::MirrorObjectHandle::morphosisPhase [protected] |
CHADI.
Definition at line 123 of file OMKMirrorObjectHandle.h.
Referenced by OMK::PvmMirrorObjectHandle::attributeRead(), and OMK::PvmMirrorObjectHandle::setMorphosisPhaseTrue().
Documentation generated on Mon Jun 9 11:46:01 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |