#include <Pt/Event.h>
Base class for all event types. More...
Inherited by BasicEvent< T >.
Public Member Functions | |
virtual | ~Event () |
Destructor. | |
Event & | clone (Allocator &allocator) const |
Clones this event using an allocator. | |
void | destroy (Allocator &allocator) |
Destroys this event using an allocator. | |
const std::type_info & | typeInfo () const |
Returns the type info for this class of events. | |
Static Public Member Functions | |
template<typename EventT > | |
static Event & | copyConstruct (const EventT &ev, Allocator &allocator) |
Copies an event using an allocator. | |
template<typename EventT > | |
static void | destruct (EventT &ev, Allocator &allocator) |
Destructs an event using an allocator. | |
Protected Member Functions | |
Event () | |
Constructor. | |
virtual Event & | onClone (Allocator &allocator) const =0 |
Clones this event using an allocator. | |
virtual void | onDestroy (Allocator &allocator)=0 |
Destroys this event using an allocator. | |
virtual const std::type_info & | onTypeInfo () const =0 |
Returns the type info for this class of events. | |
Specific event objects, subclass from Event and implement the onClone(), onDestroy() and onTypeInfo() methods. The first two are used to copy event objects for example in an EventLoop and the latter one is used to dispatch events by type.