20 template<
typename object_t,
typename handler_t>
21 class event :
protected handler_t {
30 return handler_t::is_empty();
41 return handler_t::operator +=(handler);
47 handler_t&
operator +=(
const typename handler_t::function_t& function)
noexcept {
48 return handler_t::operator +=(function);
54 template<
typename fn_t>
56 return handler_t::operator +=(function);
63 return handler_t::operator -=(handler);
69 handler_t&
operator -=(
const typename handler_t::function_t& function)
noexcept {
70 return handler_t::operator -=(function);
76 template<
typename fn_t>
78 return handler_t::operator -=(function);
Represents an event.
Definition event.h:21
void clear() noexcept
Clear event.
Definition event.h:82
handler_t & operator+=(const handler_t &handler) noexcept
Adds an handler to the event.
Definition event.h:40
handler_t & operator-=(const handler_t &handler) noexcept
Removes an handler to the event.
Definition event.h:62
bool is_empty() const noexcept
Gets a value indicate if the event is empty.
Definition event.h:29
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10