Simple and fast delegates for use in C++.
Create a delegate of a particular type Delegate<T_RETURN_TYPE(T_ARGS...)>
Bind multiple objects/methods, static and const functions in a single delegate and send it to be executed. Delegate.Add<T_RETURN_TYPE(T_ARGS...)>
Remove functions from the delegate. Delegate.Remove<T_RETURN_TYPE(T_ARG...)>
Call all functions in the delegate Delegate(T_ARG...)
Initialize the EventManager EventManager.Initialize(); EventManager.subscribe<RETURN_TYPE(ARG_TYPE)>("EventName1", delegate1); EventManager.subscribe<RETURN_TYPE(ARG_TYPE)>("EventName2", delegate2);
EventManager.Invoke<RETURN_TYPE(ARG_TYPE)>("EventName1", ARG_VALUE); EventManager.Invoke<RETURN_TYPE(ARG_TYPE)>("EventName2", ARG_VALUE);
EventManager.unsubscribe<RETURN_TYPE(ARG_TYPE)>("EventName1", delegate1); EventManager.unsubscribe<RETURN_TYPE(ARG_TYPE)>("EventName2", delegate2); EventManager.destroy();