1 #ifndef LIBFILEZILLA_EVENT_HEADER
2 #define LIBFILEZILLA_EVENT_HEADER
48 virtual size_t derived_type()
const = 0;
66 template<
typename UniqueType,
typename...Values>
70 typedef UniqueType unique_type;
71 typedef std::tuple<Values...> tuple_type;
73 using event_base::event_base;
75 template<
typename First_Value,
typename...Remaining_Values>
76 explicit simple_event(First_Value&& value, Remaining_Values&& ...values)
77 :
v_(std::forward<First_Value>(value), std::forward<Remaining_Values>(values)...)
82 inline static size_t type() {
98 mutable tuple_type
v_;
104 class event_with_source_base :
public event_base
107 using event_base::event_base;
120 template<
typename UniqueType,
typename...Values>
124 typedef UniqueType unique_type;
125 typedef std::tuple<Values...> tuple_type;
127 using event_with_source_base::event_with_source_base;
129 template<
typename First_Value,
typename...Remaining_Values>
131 : v_(std::forward<First_Value>(value), std::forward<Remaining_Values>(values)...)
135 inline static size_t type() {
148 mutable tuple_type v_;
159 typedef unsigned long long timer_id;
162 struct timer_event_type{};
Events with associated source.
Definition: event.hpp:121
simple_event< timer_event_type, timer_id > timer_event
All timer events have this type.
Definition: event.hpp:168
tuple_type v_
The event value, gets built from the arguments passed in the constructor.
Definition: event.hpp:98
static size_t type()
Returns a unique id for the type such that can be used directly in derived_type.
Definition: event.hpp:82
virtual size_t derived_type() const =0
This is the recommended event class.
Definition: event.hpp:67
Definition: event.hpp:101
bool same_type(event_base const &ev)
Definition: event.hpp:154
The namespace used by libfilezilla.
Definition: apply.hpp:17
virtual size_t derived_type() const override
Simply returns type()
Definition: event.hpp:90
Sets some global macros and further includes string.hpp.
virtual size_t derived_type() const override
Definition: event.hpp:140
size_t get_unique_type_id(std::type_info const &id)
Common base class for all events.
Definition: event.hpp:22