00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "Event.h"
00019 #include "Activity.h"
00020
00021 using namespace CODEX_Events;
00022
00023 EventBase::EventBase( Activity* source ) :
00024 m_source( source )
00025 {
00026 }
00027
00028 EventBase::~EventBase()
00029 {
00030 }
00031
00032 Activity*
00033 EventBase::source()
00034 {
00035 return m_source;
00036 }
00037
00038 EventAck::EventAck( Activity* destination, bool failure ) :
00039 EventBase( 0 ),
00040 m_destination( destination ),
00041 m_failure( failure )
00042 {
00043 }
00044
00045 EventAck::~EventAck()
00046 {
00047 }
00048
00049 bool
00050 EventAck::handle()
00051 {
00052 if ( 0 != m_destination )
00053 {
00054 return m_destination->handler( *this );
00055 }
00056 return true;
00057 }
00058
00059 DataEvent::DataEvent( Activity* source, DataHandler* destination ) :
00060 EventBase( source ),
00061 m_destination( destination )
00062 {
00063 }
00064
00065 DataEvent::~DataEvent()
00066 {
00067 }
00068
00069 bool
00070 DataEvent::handle()
00071 {
00072 return m_destination->handler( *this );
00073 }
00074
00075 CloseEvent::CloseEvent( Activity* source, CloseHandler* destination ) :
00076 EventBase( source ),
00077 m_destination( destination )
00078 {
00079 }
00080
00081 CloseEvent::~CloseEvent()
00082 {
00083 }
00084
00085 bool
00086 CloseEvent::handle()
00087 {
00088 return m_destination->handler( *this );
00089 }