libfilezilla
|
Common base class for all events. More...
#include <event.hpp>
Public Member Functions | |
event_base (event_base const &)=default | |
event_base & | operator= (event_base const &)=default |
event_base (event_base &&)=default | |
event_base & | operator= (event_base &&)=default |
virtual size_t | derived_type () const =0 |
Common base class for all events.
If possible, use simple_event<> below instead of deriving from event_base directly.
Keep events as simple as possible. Avoid mutexes in your events.
|
pure virtual |
The returned pointer must be unique for the derived type such that: event_base& a = ... event_base& b = ... assert((a.derived_type() == b.derived_type()) == (typeid(a) == typeid(b)));
Best solution is to have your derived type return the address of a static data member of it, as done in simple_event.
Implemented in simple_event< UniqueType, Values >.