1 #ifndef LIBFILEZILLA_EVENT_HEADER 2 #define LIBFILEZILLA_EVENT_HEADER 46 virtual size_t derived_type()
const = 0;
50 size_t FZ_PUBLIC_SYMBOL get_unique_type_id(std::type_info
const&
id);
62 template<
typename UniqueType,
typename...Values>
66 typedef UniqueType unique_type;
67 typedef std::tuple<Values...> tuple_type;
71 template<
typename First_Value,
typename...Remaining_Values>
72 explicit simple_event(First_Value&& value, Remaining_Values&& ...values)
73 :
v_(std::forward<First_Value>(value), std::forward<Remaining_Values>(values)...)
81 inline static size_t type() {
84 static size_t const v = get_unique_type_id(
typeid(UniqueType*));
97 mutable tuple_type
v_;
108 typedef unsigned long long timer_id;
111 struct timer_event_type{};
simple_event< timer_event_type, timer_id > timer_event
All timer events have this type.
Definition: event.hpp:117
virtual size_t derived_type() const
Simply returns type()
Definition: event.hpp:89
tuple_type v_
The event value, gets built from the arguments passed in the constructur.
Definition: event.hpp:97
static size_t type()
Returns a unique id for the type such that can be used directly in derived_type.
Definition: event.hpp:81
virtual size_t derived_type() const =0
This is the recommended event class.
Definition: event.hpp:63
bool same_type(event_base const &ev)
Definition: event.hpp:103
The namespace used by libfilezilla.
Definition: apply.hpp:17
Sets some global macros and further includes string.hpp.
Common base class for all events.
Definition: event.hpp:22