00001 /* 00002 * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved. 00003 * This software is released under the modified BSD license. 00004 * See the file LICENSE in the top-level directory for details. 00005 */ 00006 // 00007 // $Id: Event.h,v 1.4 2005/01/21 19:44:16 mmarsh Exp $ 00008 // 00009 // $Log: Event.h,v $ 00010 // Revision 1.4 2005/01/21 19:44:16 mmarsh 00011 // Updated for compatibility with Doxygen 1.4.1 00012 // 00013 // Revision 1.3 2004/05/19 15:56:50 mmarsh 00014 // *** empty log message *** 00015 // 00016 // Revision 1.2 2003/11/04 22:31:48 mmarsh 00017 // *** empty log message *** 00018 // 00019 // 00020 00021 #ifndef __CODEX_EVENTS_EVENT_H__ 00022 #define __CODEX_EVENTS_EVENT_H__ 00023 00028 namespace CODEX_Events 00029 { 00030 class Activity; 00031 00038 class EventBase 00039 { 00040 public : 00045 EventBase( Activity* source ); 00046 00048 virtual ~EventBase(); 00049 00055 virtual bool handle() = 0; 00056 00058 Activity* source(); 00059 00060 protected : 00062 Activity* m_source; 00063 }; 00064 00071 class EventAck : public EventBase 00072 { 00073 public : 00075 EventAck( Activity* destination, bool failure=false ); 00076 00078 virtual ~EventAck(); 00079 bool handle(); 00080 00082 bool failure() const { return m_failure; } 00083 00084 private : 00085 Activity* m_destination; 00086 bool m_failure; 00087 }; 00088 00089 class DataHandler; 00090 00100 class DataEvent : public EventBase 00101 { 00102 public : 00104 DataEvent( Activity* source, DataHandler* destination ); 00105 00107 virtual ~DataEvent(); 00108 bool handle(); 00109 00110 private : 00111 DataHandler* m_destination; 00112 }; 00113 00114 class CloseHandler; 00115 00123 class CloseEvent : public EventBase 00124 { 00125 public : 00127 CloseEvent( Activity* source, CloseHandler* destination ); 00128 00130 virtual ~CloseEvent(); 00131 bool handle(); 00132 00133 private : 00134 CloseHandler* m_destination; 00135 }; 00136 00137 } 00138 00139 #endif /* __CODEX_EVENTS_EVENT_H__ */
1.4.1