wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::event::Dispatcher Class Reference

#include <event.hpp>

Public Member Functions

template<typename T >
void dispatch (T &&value) const
 
template<typename T >
void on (std::function< void(const T &t)> cb)
 
template<typename Type >
void dispatch (Type &&value) const
 
template<typename Type >
void on (std::function< void(const Type &)> func)
 

Private Attributes

std::unordered_map< size_t, std::vector< std::function< void(void *)> > handlers_ )
 

Member Function Documentation

◆ dispatch() [1/2]

template<typename T >
void wren::event::Dispatcher::dispatch ( T && value) const
Here is the caller graph for this function:

◆ dispatch() [2/2]

template<typename Type >
void wren::event::Dispatcher::dispatch ( Type && value) const

◆ on() [1/2]

template<typename T >
void wren::event::Dispatcher::on ( std::function< void(const T &t)> cb)

◆ on() [2/2]

template<typename Type >
void wren::event::Dispatcher::on ( std::function< void(const Type &)> func)

Member Data Documentation

◆ handlers_

std::unordered_map<size_t, std::vector<std::function<void(void *)> > wren::event::Dispatcher::handlers_)
private

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