21 #ifndef __MINILIB_EVENT_H__
22 #define __MINILIB_EVENT_H__
36 const char*
get_name() {
return "base_eventargs"; }
44 const char*
get_name() {
return "exit_eventargs"; }
55 const char*
get_name() {
return "handler_eventargs"; }
60 template<
class TSender,
typename TArgs = base_eventargs>
89 template<
class TSender,
typename TArgs,
123 (*itr)->emit(sender, args);
Definition: mn_lock.hpp:122
Definition: mn_mutex.hpp:37
Definition: mn_vector.hpp:117
Definition: mn_event.hpp:93
typename container_type::allocator_type allocator_type
Definition: mn_event.hpp:108
event_system(const self_type &other)
Definition: mn_event.hpp:113
TContainer container_type
Definition: mn_event.hpp:99
const TBaseEvent * const_pointer
Definition: mn_event.hpp:105
void remove(const_reference funcHandler)
Definition: mn_event.hpp:132
void operator-=(const_reference funcHandler)
Definition: mn_event.hpp:144
mutex_t m_mutex
Definition: mn_event.hpp:152
void emit(const TSender &sender, const args_type args)
Definition: mn_event.hpp:117
TBaseEvent & reference
Definition: mn_event.hpp:102
const TBaseEvent & const_reference
Definition: mn_event.hpp:103
void operator+=(const_reference funcHandler)
Definition: mn_event.hpp:141
typename container_type::size_type size_type
Definition: mn_event.hpp:107
TArgs args_type
Definition: mn_event.hpp:98
TSender sender_type
Definition: mn_event.hpp:97
event_system(size_type initialSize=4, const allocator_type &allocator=allocator_type())
Definition: mn_event.hpp:110
void operator()(const TSender &sender, const args_type args)
Definition: mn_event.hpp:147
void bind(const_reference funcHandler)
Definition: mn_event.hpp:127
TBaseEvent value_type
Definition: mn_event.hpp:101
container_type m_observers
Definition: mn_event.hpp:151
TBaseEvent * pointer
Definition: mn_event.hpp:104
Definition: mn_event.hpp:39
int get_exitcode()
Definition: mn_event.hpp:43
int m_iExitCode
Definition: mn_event.hpp:46
const char * get_name()
Definition: mn_event.hpp:44
exit_eventargs(int exitcode)
Definition: mn_event.hpp:41
Definition: mn_event.hpp:50
T * get_handler()
Definition: mn_event.hpp:54
handler_eventargs(T *handler)
Definition: mn_event.hpp:52
const char * get_name()
Definition: mn_event.hpp:55
T * m_pHandler
Definition: mn_event.hpp:57
Basic vector container This file is part of the Mini Thread Library (https://github....
struct mn::memory::detail::ptr_difference T
Definition: mn_atomic_singleton.hpp:38
Definition: mn_allocator_typetraits.hpp:25
int lock(TLOCK &m1, unsigned int timeout)
Definition: mn_autolock.hpp:70
void move(const T *src, const T *last, T *dest)
Definition: mn_algorithm.hpp:100
Definition: mn_function.hpp:34
Definition: mn_event.hpp:61
self_type & operator=(self_type &other)
Definition: mn_event.hpp:80
TSender & sender_reference
Definition: mn_event.hpp:65
base_event(function_type func)
Definition: mn_event.hpp:68
TSender sender_type
Definition: mn_event.hpp:64
bool operator==(const self_type &pOther)
Definition: mn_event.hpp:76
function_type get_function()
Definition: mn_event.hpp:84
base_event(const self_type &&other)
Definition: mn_event.hpp:70
function_type m_ptr2Func
Definition: mn_event.hpp:86
base_event(const self_type &other)
Definition: mn_event.hpp:69
void emit(const sender_type &sender, const args_type args)
Definition: mn_event.hpp:72
TArgs args_type
Definition: mn_event.hpp:63
Definition: mn_event.hpp:34
const char * get_name()
Definition: mn_event.hpp:36