AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
EventEmitter< Signature > Class Template Reference

#include "EventEmitter.h"

Public Member Functions

template<typename Functor >
void operator+= (Functor &&f)
 
template<class... Args>
void operator() (Args &&... args) const
 

Private Attributes

std::vector< std::function< Signature > > functions
 

Detailed Description

template<class Signature>
class EventEmitter< Signature >

Member Function Documentation

◆ operator()()

template<class Signature >
template<class... Args>
void EventEmitter< Signature >::operator() ( Args &&...  args) const
inline
33 {
34 for (auto& f : functions)
35 {
36 f(args...);
37 }
38 }
std::vector< std::function< Signature > > functions
Definition: EventEmitter.h:41

References EventEmitter< Signature >::functions.

◆ operator+=()

template<class Signature >
template<typename Functor >
void EventEmitter< Signature >::operator+= ( Functor &&  f)
inline
27 {
28 functions.emplace_back(std::forward<Functor>(f));
29 }

References EventEmitter< Signature >::functions.

Member Data Documentation

◆ functions

template<class Signature >
std::vector<std::function<Signature> > EventEmitter< Signature >::functions
private