iaux::iaEvent< R, Args > Class Template Reference

#include <iaEvent.h>

Public Member Functions

 ~iaEvent ()
 
void add (const iaDelegate< R, Args... > &delegate, bool fireOnce=false, bool mainThread=false)
 
void remove (const iaDelegate< R, Args... > &delegate)
 
void block (bool blockEvent=true)
 
void unblock ()
 
bool isBlocked ()
 
void operator() (Args... args)
 
void clear ()
 
bool hasDelegates ()
 

Detailed Description

template<typename R, typename... Args>
class iaux::iaEvent< R, Args >

event container for delegates that executes delegates when triggered

Constructor & Destructor Documentation

◆ ~iaEvent()

template<typename R , typename... Args>
iaux::iaEvent< R, Args >::~iaEvent ( )
inline

unregister from pool in case it is needed

Member Function Documentation

◆ add()

template<typename R , typename... Args>
void iaux::iaEvent< R, Args >::add ( const iaDelegate< R, Args... > &  delegate,
bool  fireOnce = false,
bool  mainThread = false 
)
inline

adds delegate to event

Parameters
delegatethe delegate to add
fireOnceif true delegate will be fired once and then removed
mainThreadfire only on main thread

◆ block()

template<typename R , typename... Args>
void iaux::iaEvent< R, Args >::block ( bool  blockEvent = true)
inline

blocks event from executing it's delegates

Parameters
blockEventif true event is blocked

◆ clear()

template<typename R , typename... Args>
void iaux::iaEvent< R, Args >::clear ( )
inline

clears delegates from event

◆ hasDelegates()

template<typename R , typename... Args>
bool iaux::iaEvent< R, Args >::hasDelegates ( )
inline
Returns
true if event contains delegates

◆ isBlocked()

template<typename R , typename... Args>
bool iaux::iaEvent< R, Args >::isBlocked ( )
inline
Returns
true if event is blocked

◆ operator()()

template<typename R , typename... Args>
void iaux::iaEvent< R, Args >::operator() ( Args...  args)
inline

executes event

◆ remove()

template<typename R , typename... Args>
void iaux::iaEvent< R, Args >::remove ( const iaDelegate< R, Args... > &  delegate)
inline

removes delegate from event

Parameters
delegatethe delegate to remove

◆ unblock()

template<typename R , typename... Args>
void iaux::iaEvent< R, Args >::unblock ( )
inline

unblocks event


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