139 |
new_event InstanciateEvent; |
new_event InstanciateEvent; |
140 |
|
|
141 |
/// Types of events registered with the event subsystem by name |
/// Types of events registered with the event subsystem by name |
142 |
static std::hash_map<std::string, event_type*> NamedTypes; |
static std::hash_map<std::string, event_type*>& NamedTypes (); |
143 |
|
|
144 |
/// Types of events by id |
/// Types of events by id |
145 |
static std::vector<event_type*> Types; |
static std::vector<event_type*>& Types (); |
146 |
}; |
}; |
147 |
|
|
148 |
#ifndef SWIG |
#ifndef SWIG |
149 |
/** |
/** |
150 |
* A function that returns a new instance of an %event. |
* Macro for functions that return a new instance of an %event. |
151 |
|
* @param nsp namespace the event class lives in |
152 |
|
* @param evt the event class to instanciate |
153 |
*/ |
*/ |
154 |
#define NEW_EVENT(nsp, evt)\ |
#define NEW_EVENT(nsp, evt)\ |
155 |
events::event* new_ ## evt () { return (events::event*) new nsp::evt; } |
events::event* new_ ## evt () { return (events::event*) new nsp::evt; } |