template<typename FuncType>
class EventEmitter< FuncType >
Implements a simple event emitter class.
This is C++11 only.
Example Usage:
EventEmitter<std::function<void(int)> emitter;
auto lam_auto = [] (int a) { std::cerr << a << std::endl; }; std::function<void(int)> lam = [] (int a) { std::cerr << a << std::endl; }; emitter.on("event0", lam); emitter.on("event0", lam_auto); emitter.on("event0", [] (int a) { std::cerr << a << std::endl; });
emitter.emit("event0");