30 |
#ifndef EVENT_TYPES_H |
#ifndef EVENT_TYPES_H |
31 |
#define EVENT_TYPES_H |
#define EVENT_TYPES_H |
32 |
|
|
33 |
#include <event/manager_base.h> |
#include "event/event.h" |
34 |
#include <base/hash_map.h> |
#include <base/hash_map.h> |
35 |
|
|
36 |
namespace events { |
namespace events { |
37 |
|
|
38 |
|
class manager_base; |
39 |
|
|
40 |
#ifndef SWIG |
#ifndef SWIG |
41 |
/** |
/** |
42 |
* Pointer to a function returning a newly allocated %event |
* Pointer to a function returning a newly allocated %event |
56 |
class event_type |
class event_type |
57 |
{ |
{ |
58 |
public: |
public: |
|
/** |
|
|
* Destructor |
|
|
*/ |
|
|
~event_type () |
|
|
{ |
|
|
delete Manager; |
|
|
} |
|
59 |
|
|
60 |
/** |
/** |
61 |
* Register a certain type of %event with the %event subsystem. |
* Register a certain type of %event with the %event subsystem. |
149 |
/** |
/** |
150 |
* A function that returns a new instance of an %event. |
* A function that returns a new instance of an %event. |
151 |
*/ |
*/ |
152 |
#define NEW_EVENT(evt)\ |
#define NEW_EVENT(nsp, evt)\ |
153 |
events::event* new_ ## evt () { return (events::event*) new events::evt; } |
events::event* new_ ## evt () { return (events::event*) new nsp::evt; } |
154 |
#endif // SWIG |
#endif // SWIG |
155 |
|
|
156 |
} |
} |