AmEvent.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028 #ifndef AmEvent_h
00029 #define AmEvent_h
00030
00031 #include "AmArg.h"
00032
00033 #include <string>
00034 using std::string;
00035
00036 #define E_PLUGIN 100
00037
00039 struct AmEvent
00040 {
00041 int event_id;
00042 bool processed;
00043
00044 AmEvent(int event_id);
00045 virtual ~AmEvent();
00046 };
00047
00053 struct AmPluginEvent: public AmEvent
00054 {
00055 string name;
00056 AmArg data;
00057
00058 AmPluginEvent(const string& n)
00059 : AmEvent(E_PLUGIN), name(n), data() {}
00060
00061 AmPluginEvent(const string& n, const AmArg& d)
00062 : AmEvent(E_PLUGIN), name(n), data(d) {}
00063 };
00064
00065
00067 class AmEventHandler
00068 {
00069 public:
00070 virtual void process(AmEvent*)=0;
00071 virtual ~AmEventHandler() { };
00072 };
00073
00074 #endif
Generated on Fri May 16 12:02:05 2008 for SEMS by
1.5.1