Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::Event< Ts > Class Template Reference

#include <aurore/core/event.hpp>

Public Types

typedef std::function< void(Ts...)> Callback
 
typedef std::list< Callback > CallbacksList
 
typedef CallbacksList::iterator Subscription
 

Public Member Functions

 Event ()=default
 
 Event (const Event &other)
 
Event & operator= (const Event &other)
 
Subscription subscribe (Callback cb)
 
void unsubscribe (Subscription subscription)
 
void clear ()
 
bool fire (Ts... args)
 

Member Typedef Documentation

◆ Callback

template<typename... Ts>
typedef std::function<void(Ts...)> aurore::Event< Ts >::Callback

◆ CallbacksList

template<typename... Ts>
typedef std::list<Callback> aurore::Event< Ts >::CallbacksList

◆ Subscription

template<typename... Ts>
typedef CallbacksList::iterator aurore::Event< Ts >::Subscription

Constructor & Destructor Documentation

◆ Event() [1/2]

template<typename... Ts>
aurore::Event< Ts >::Event ( )
default

◆ Event() [2/2]

template<typename... Ts>
aurore::Event< Ts >::Event ( const Event< Ts > &  other)
inline

Member Function Documentation

◆ clear()

template<typename... Ts>
void aurore::Event< Ts >::clear ( )

◆ fire()

template<typename... Ts>
bool aurore::Event< Ts >::fire ( Ts...  args)

◆ operator=()

template<typename... Ts>
Event & aurore::Event< Ts >::operator= ( const Event< Ts > &  other)
inline

◆ subscribe()

template<typename... Ts>
Event< Ts... >::Subscription aurore::Event< Ts >::subscribe ( Callback  cb)

◆ unsubscribe()

template<typename... Ts>
void aurore::Event< Ts >::unsubscribe ( Subscription  subscription)

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