Turbo Engine 0.3
A C++ game engine using Allegro 5
turbo::Event< Args > Class Template Reference

#include <Event.hpp>

Public Types

typedef EventHandler< Args... > handler_type

Public Member Functions

 Event ()
 Event (const Event &src)
 Event (Event &&src)
Eventoperator= (const Event &src)
Eventoperator= (Event &&src)
handler_type::handler_id_type add (const handler_type &handler)
handler_type::handler_id_type add (const typename handler_type::handler_func_type &handler)
bool remove (const handler_type &handler)
bool remove_id (const typename handler_type::handler_id_type &handlerId)
void call (Args... params) const
void operator() (Args... params) const
handler_type::handler_id_type operator+= (const handler_type &handler)
handler_type::handler_id_type operator+= (const typename handler_type::handler_func_type &handler)
bool operator-= (const handler_type &handler)

Protected Types

typedef std::list< handler_typehandler_collection_type

Protected Member Functions

void call_impl (const handler_collection_type &handlers, Args... params) const
handler_collection_type get_handlers_copy () const

Detailed Description

template<typename... Args>
class turbo::Event< Args >
Examples
events.cpp.

Member Typedef Documentation

◆ handler_collection_type

template<typename... Args>
typedef std::list<handler_type> turbo::Event< Args >::handler_collection_type
protected

◆ handler_type

template<typename... Args>
typedef EventHandler<Args...> turbo::Event< Args >::handler_type

Constructor & Destructor Documentation

◆ Event() [1/3]

template<typename... Args>
turbo::Event< Args >::Event ( )
inline

◆ Event() [2/3]

template<typename... Args>
turbo::Event< Args >::Event ( const Event< Args > & src)
inline

◆ Event() [3/3]

template<typename... Args>
turbo::Event< Args >::Event ( Event< Args > && src)
inline

Member Function Documentation

◆ add() [1/2]

template<typename... Args>
handler_type::handler_id_type turbo::Event< Args >::add ( const handler_type & handler)
inline

◆ add() [2/2]

template<typename... Args>
handler_type::handler_id_type turbo::Event< Args >::add ( const typename handler_type::handler_func_type & handler)
inline

◆ call()

template<typename... Args>
void turbo::Event< Args >::call ( Args... params) const
inline

◆ call_impl()

template<typename... Args>
void turbo::Event< Args >::call_impl ( const handler_collection_type & handlers,
Args... params ) const
inlineprotected

◆ get_handlers_copy()

template<typename... Args>
handler_collection_type turbo::Event< Args >::get_handlers_copy ( ) const
inlineprotected

◆ operator()()

template<typename... Args>
void turbo::Event< Args >::operator() ( Args... params) const
inline

◆ operator+=() [1/2]

template<typename... Args>
handler_type::handler_id_type turbo::Event< Args >::operator+= ( const handler_type & handler)
inline

◆ operator+=() [2/2]

template<typename... Args>
handler_type::handler_id_type turbo::Event< Args >::operator+= ( const typename handler_type::handler_func_type & handler)
inline

◆ operator-=()

template<typename... Args>
bool turbo::Event< Args >::operator-= ( const handler_type & handler)
inline

◆ operator=() [1/2]

template<typename... Args>
Event & turbo::Event< Args >::operator= ( const Event< Args > & src)
inline

◆ operator=() [2/2]

template<typename... Args>
Event & turbo::Event< Args >::operator= ( Event< Args > && src)
inline

◆ remove()

template<typename... Args>
bool turbo::Event< Args >::remove ( const handler_type & handler)
inline

◆ remove_id()

template<typename... Args>
bool turbo::Event< Args >::remove_id ( const typename handler_type::handler_id_type & handlerId)
inline

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