#include <PolymorphEvent.hh>
Public Methods | |
| virtual void | send () const=0 | 
Protected Methods | |
| virtual | ~PolymorphEvent () | 
| Need virtual destructor for polymorphic queues. | |
Static Protected Methods | |
| template<typename EvType> void | sendTypedEvent (const EvType &event) | 
struct ConcreteEvent: public PolymorphEvent { // ... your event-specific data and methods ... // ... and the override: virtual void send() const { sendTypedEvent(*this); } };
Definition at line 38 of file PolymorphEvent.hh.
      
  | 
  
| 
 Causes this event to be sent out to all listeners. The subclass must provide an override so the event can be used polymorphically. This allows you to have a container of PolymorphEvent's of unknown concrete types, e.g. to queue events of different types. Referenced by EventSender< PolymorphEvent >::send().  | 
  
      
  | 
  ||||||||||
| 
 The class derived from PolymorphEvent must override send() to make it call EventSender<EvType>::send(). It can also simply override it by making it call this method, sendTypedEvent, with *this. This method is really just a helper to simplify the syntax required for overriding send(). Definition at line 62 of file PolymorphEvent.hh.  | 
  
1.2.18