Instead of manually extracting the hash code from a
std::type_info object and using it as
std::size_t key in the map, you can directly use
std::type_index.
Also, what is Nano? Is there a reason not to use
std::function? The following code looks quite complicated, I'm not sure if it's whether the library intends that usage or whether you use it wrong:
template <typename Evt_T, typename T, void (T::*meth_ptr)(const Evt_T&)>
void addListener(T& listener)
{
...
Nano::signal<void (const Evt_T&)>& signal = static_cast<SignalWrapper<Evt_T>*>(mSignals[type].get())->signal;
signal.template connect<T, meth_ptr>(&listener);
}
But I guess with
std::function (or a map of it, if you require signals) it would be simpler. You can have a look at my class
thor::EventSystem to see how it might look like -- the complexity in my code is mainly due to the possibility to remove listeners; if you don't need that, it will be much simpler.
In any case, the idea of modern C++ functionals is that you do not have an abstract base class and dynamic allocations in the API, but rather a function object with value semantics.
And yes, the identifier
__EVENT_MANAGER_H__ is forbidden. You should prefix it with your library anyway, e.g.
FISSION_EVENT_MANAGER_H.