Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
EventHandler< TOwningType, TEventArgs > Class Template Reference

#include <event.h>

Public Types

typedef std::function< void(TOwningType &, const TEventArgs &)> EventFunction
 

Public Member Functions

template<typename TSubscribingType >
void bind_member_func (TSubscribingType *caller, void(TSubscribingType::*member_func)(TOwningType &, const TEventArgs &))
 
 EventHandler ()=default
 
template<typename TSubscribingType >
void unbind_member_func (TSubscribingType *caller, void(TSubscribingType::*member_func)(TOwningType &, const TEventArgs &))
 

Public Attributes

friend TOwningType
 

Private Member Functions

void invoke (TOwningType &sender, TEventArgs a)
 

Private Attributes

std::vector< std::function< void(TOwningType &, const TEventArgs &)> > callbacks_
 

Detailed Description

template<class TOwningType, class TEventArgs>
class EventHandler< TOwningType, TEventArgs >

Definition at line 31 of file event.h.

Member Typedef Documentation

template<class TOwningType, class TEventArgs>
typedef std::function<void(TOwningType&, const TEventArgs&)> EventHandler< TOwningType, TEventArgs >::EventFunction

Definition at line 34 of file event.h.

Constructor & Destructor Documentation

template<class TOwningType, class TEventArgs>
EventHandler< TOwningType, TEventArgs >::EventHandler ( )
default

Member Function Documentation

template<class TOwningType, class TEventArgs>
template<typename TSubscribingType >
void EventHandler< TOwningType, TEventArgs >::bind_member_func ( TSubscribingType *  caller,
void(TSubscribingType::*)(TOwningType &, const TEventArgs &)  member_func 
)
inline

Definition at line 41 of file event.h.

template<class TOwningType, class TEventArgs>
void EventHandler< TOwningType, TEventArgs >::invoke ( TOwningType sender,
TEventArgs  a 
)
inlineprivate

Definition at line 69 of file event.h.

template<class TOwningType, class TEventArgs>
template<typename TSubscribingType >
void EventHandler< TOwningType, TEventArgs >::unbind_member_func ( TSubscribingType *  caller,
void(TSubscribingType::*)(TOwningType &, const TEventArgs &)  member_func 
)
inline

Definition at line 48 of file event.h.

Member Data Documentation

template<class TOwningType, class TEventArgs>
std::vector<std::function<void(TOwningType&, const TEventArgs&)> > EventHandler< TOwningType, TEventArgs >::callbacks_
private

Definition at line 67 of file event.h.

template<class TOwningType, class TEventArgs>
friend EventHandler< TOwningType, TEventArgs >::TOwningType

Definition at line 38 of file event.h.


The documentation for this class was generated from the following file:


packml_sm
Author(s): Shaun Edwards
autogenerated on Fri Jul 12 2019 03:30:55