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


member function for event manipulation | |
| PsEvent (const PsEvent &originalEvent) | |
| copy constructor | |
| PsEvent & | operator= (const PsEvent &originalEvent) |
| assignement | |
| virtual PsEvent * | clone () const |
| cloning | |
| virtual void | insertInStream (ostream &out=cout) const |
| insert in a stream | |
| virtual void | extract (istream &in=cin) |
| extract from a stream | |
| virtual void | unpack (PsIncomingSynchronisationMessage &) |
| unpack from a message when this member function is called, the 4 base fields (eventId, date, sender and receiver) have allready been unpacked. | |
| virtual void | pack (PsOutgoingSynchronisationMessage &) const |
| pack in a message | |
| PsEvent (const PsEventIdentifier &event, const PsDate &date, const PsName &sender, const PsName &receiver) | |
| the constructor | |
| virtual | ~PsEvent () |
| the destructor. | |
| virtual bool | isSystem () const |
| is the event a system event | |
| PsEvent * | insertInList (list< PsEvent * > *alist, PsEvent *) |
| insert an event in an event list, so that events are ordered from oldest to most recent | |
Public Attributes | |
The four base fields | |
| PsEventIdentifier | eventId |
| the event identifier | |
| PsDate | date |
| date of sending | |
| PsName | sender |
| sender of the event | |
| PsName | receiver |
| intended receiver | |
Static Protected Attributes | |
| PsEventCreator * | _myEventCreator = new PsEventCreator ("PsEvent") |
Definition at line 35 of file PsEvent.h.
|
|
copy constructor
Definition at line 28 of file PsEvent.cxx. Referenced by clone().
|
|
||||||||||||||||||||
|
the constructor
Definition at line 89 of file PsEvent.cxx. References PsDate.
00089 : 00090 eventId ( eventId ), 00091 date ( date ), 00092 sender ( sender ), 00093 receiver (receiver ) 00094 { 00095 #ifdef _DEBUGEVT 00096 cerr<<"PsEvent::PsEvent(const PsEventIdentifier & eventId, const PsDate & date, const PsName & sender, const PsName & receiver )"<<endl; 00097 #endif 00098 } |
|
|
the destructor.
Definition at line 100 of file PsEvent.cxx.
00101 {
00102 //cerr<<"PsEvent::~PsEvent() "<<*this<<endl;
00103 }
|
|
|
cloning
Reimplemented in PsValuedEvent< UserType >. Definition at line 47 of file PsEvent.cxx. References PsEvent(). Referenced by PsMomeController::actOnSystemEvent(), PsController::actOnSystemEvent(), PsnPvmDuplicatedObjectHandle::broadcastEvent(), PsDistributedController::broadcastEventsForSignal(), PsnReferenceObjectHandle::receiveEvent(), and PsSimulatedObject::sendEvent().
00047 {
00048 return new PsEvent (*this) ;
00049 }
|
|
|
extract from a stream
Implements PsFlowable. Reimplemented in PsValuedEvent< UserType >. Definition at line 81 of file PsEvent.cxx. References date, eventId, receiver, and sender. Referenced by PsValuedEvent< UserType >::extract().
|
|
||||||||||||
|
insert an event in an event list, so that events are ordered from oldest to most recent
Definition at line 112 of file PsEvent.cxx. References date, list< T, Alloc >::rbegin(), and list< T, Alloc >::rend(). Referenced by PsController::actOnSystemEvent(), and PsnReferenceObjectHandle::receiveEvent().
00112 {
00113
00114 list<PsEvent *>::reverse_iterator i = aList->rbegin () ;
00115
00116 while ( i != aList->rend() &&
00117 (event->date < (*i)->date ) )
00118 {
00119 ++i ;
00120 }
00121 aList-> insert (i.base(),event) ;
00122 return event ;
00123 }
|
|
|
insert in a stream
Implements PsFlowable. Reimplemented in PsValuedEvent< UserType >. Definition at line 74 of file PsEvent.cxx. References date, eventId, receiver, and sender. Referenced by PsValuedEvent< UserType >::insertInStream().
|
|
|
is the event a system event
Definition at line 106 of file PsEvent.cxx. References eventId, and PsEventIdentifier::isSystemEvent(). Referenced by PsnReferenceObjectHandle::receiveEvent().
00106 {
00107 return eventId.isSystemEvent () ;
00108 }
|
|
|
assignement
Definition at line 38 of file PsEvent.cxx. References date, eventId, receiver, and sender. Referenced by PsValuedEvent< UserType >::operator=().
|
|
|
pack in a message
Reimplemented from PsFlowable. Reimplemented in PsValuedEvent< UserType >. Definition at line 59 of file PsEvent.cxx. References date, eventId, receiver, and sender.
|
|
|
unpack from a message when this member function is called, the 4 base fields (eventId, date, sender and receiver) have allready been unpacked. This is necessary to enable correct un packing of valuedEvents Reimplemented from PsFlowable. Reimplemented in PsValuedEvent< UserType >. Definition at line 53 of file PsEvent.cxx. Referenced by PsValuedEvent< UserType >::unpack(), PsnPvmReferenceObjectHandle::unpack(), and PsnPvmDuplicatedObjectHandle::unpack().
00054 {
00055 //do nothing : all usefull information has allready been unpacked
00056 }
|
|
|
Definition at line 24 of file PsEvent.cxx. |
|
|
date of sending
Definition at line 46 of file PsEvent.h. Referenced by extract(), insertInList(), insertInStream(), operator=(), PsValuedEvent< UserType >::pack(), pack(), PsDistributedController::processEvent(), PsController::processEvent(), PsnReferenceObjectHandle::receiveEvent(), and PsSimulatedObject::sendEvent(). |
|
|
|
|
sender of the event
Definition at line 50 of file PsEvent.h. Referenced by extract(), insertInStream(), operator=(), PsValuedEvent< UserType >::pack(), pack(), PsInputConnectionEventListener< Type >::processEvent(), and PsnMomeReferenceObjectHandle::receiveEvent(). |
| Documentation generated on Mon Nov 25 15:25:59 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |