Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <EventRouter.h>
Actually only stores void*'s, so it's more general than just Listeners or Trappers
Definition at line 188 of file EventRouter.h.
Public Member Functions | |
EventMapper () | |
constructor | |
void | addMapping (void *el, EventBase::EventGeneratorID_t egid) |
Adds a listener for all events from a given event generator. | |
void | addMapping (void *el, EventBase::EventGeneratorID_t egid, unsigned int sid, EventBase::EventTypeID_t etid) |
Adds a listener for a specific source id and type from a given event generator. | |
void | removeMapping (void *el, EventBase::EventGeneratorID_t egid) |
Removes a listener for all events from a given event generator. | |
void | removeMapping (void *el, EventBase::EventGeneratorID_t egid, unsigned int sid, EventBase::EventTypeID_t etid) |
Removes a listener for a specific source id and type from a given event generator. | |
void | clean () |
compresses empty data structures | |
void | clear () |
Resets the mapping. | |
template<class T> void | getMapping (const EventBase &e, std::vector< T * > &listeners) |
builds a list of all listeners which should receive the event, templated to typecast the pointers for you | |
bool | verifyMapping (void *listener, const EventBase &e) |
Used to make sure that the specified listener exists for the given event. | |
bool | verifyMapping (void *listener, EventBase::EventGeneratorID_t egid, unsigned int sid, EventBase::EventTypeID_t etid) |
Used to make sure that the specified listener exists for the given event. | |
bool | hasMapping (EventBase::EventGeneratorID_t egid) |
so stuff can tell if it even needs to bother generating an event... | |
bool | hasMapping (EventBase::EventGeneratorID_t egid, unsigned int sid) |
so stuff can tell if it even needs to bother generating an event... | |
bool | hasMapping (EventBase::EventGeneratorID_t egid, unsigned int sid, EventBase::EventTypeID_t etid) |
so stuff can tell if it even needs to bother generating an event... | |
Protected Types | |
typedef std::map< unsigned int, std::vector< void * >, std::less< unsigned int > > | SIDtoListenerVectorMap_t |
a mapping from source IDs (unsigned ints), each to a vector of pointers to listeners | |
Protected Attributes | |
std::vector< void * > | allevents [EventBase::numEGIDs] |
an array of vectors of pointers to listeners... in other words, a vector of listener pointers for each generator | |
SIDtoListenerVectorMap_t * | filteredevents [EventBase::numEGIDs][EventBase::numETIDs] |
not for the faint of heart: a matrix of mappings to vectors of pointers to listeners | |
Private Member Functions | |
EventMapper (const EventMapper &) | |
this shouldn't be called... | |
EventMapper | operator= (const EventMapper &) |
this shouldn't be called... |
|
a mapping from source IDs (unsigned ints), each to a vector of pointers to listeners main use in filteredevents
Definition at line 241 of file EventRouter.h. Referenced by addMapping(), clean(), clear(), getMapping(), hasMapping(), removeMapping(), and verifyMapping(). |
|
constructor
Definition at line 164 of file EventRouter.cc. |
|
this shouldn't be called...
|
|
Adds a listener for a specific source id and type from a given event generator.
Definition at line 170 of file EventRouter.cc. |
|
Adds a listener for all events from a given event generator.
Definition at line 193 of file EventRouter.h. Referenced by EventRouter::addListener(), and EventRouter::addTrapper(). |
|
compresses empty data structures
Definition at line 214 of file EventRouter.cc. Referenced by EventRouter::removeListener(), and EventRouter::removeTrapper(). |
|
Resets the mapping.
Definition at line 249 of file EventRouter.cc. Referenced by EventRouter::reset(). |
|
builds a list of all listeners which should receive the event, templated to typecast the pointers for you
Definition at line 304 of file EventRouter.cc. Referenced by EventRouter::doSendEvent(). |
|
so stuff can tell if it even needs to bother generating an event...
... if a tree falls in a forest, and there's no one around to see it, does it make a sound?
Definition at line 291 of file EventRouter.cc. |
|
so stuff can tell if it even needs to bother generating an event...
... if a tree falls in a forest, and there's no one around to see it, does it make a sound?
Definition at line 277 of file EventRouter.cc. |
|
so stuff can tell if it even needs to bother generating an event...
... if a tree falls in a forest, and there's no one around to see it, does it make a sound?
Definition at line 262 of file EventRouter.cc. Referenced by EventRouter::hasListeners(). |
|
this shouldn't be called...
|
|
Removes a listener for a specific source id and type from a given event generator. Doesn't necessarily remove the vector or mapping if this was the last listener, use clean() to do that Definition at line 203 of file EventRouter.cc. |
|
Removes a listener for all events from a given event generator. Doesn't necessarily remove the vector or mapping if this was the last listener, use clean() to do that Definition at line 186 of file EventRouter.cc. Referenced by EventRouter::removeListener(), and EventRouter::removeTrapper(). |
|
Used to make sure that the specified listener exists for the given event. This is needed because after we call processEvent on a lister, we can't assume that no other listeners have been modified - one listener could cause another to turn off. If that has happened, we shouldn't send the event, even if it was in the queue originally. Definition at line 322 of file EventRouter.cc. |
|
Used to make sure that the specified listener exists for the given event. This is needed because after we call processEvent on a lister, we can't assume that no other listeners have been modified - one listener could cause another to turn off. If that has happened, we shouldn't send the event, even if it was in the queue originally. Definition at line 230 of file EventRouter.h. Referenced by EventRouter::doSendEvent(). |
|
an array of vectors of pointers to listeners... in other words, a vector of listener pointers for each generator
Definition at line 244 of file EventRouter.h. Referenced by addMapping(), getMapping(), hasMapping(), removeMapping(), and verifyMapping(). |
|
not for the faint of heart: a matrix of mappings to vectors of pointers to listeners
Definition at line 246 of file EventRouter.h. Referenced by addMapping(), clean(), clear(), EventMapper(), getMapping(), hasMapping(), removeMapping(), and verifyMapping(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:10 2004 by Doxygen 1.3.4 |