72 Connect(
const typename E::CallbackT &_subscriber)
74 if (this->
events.find(
typeid(E)) == this->events.end()) {
75 this->
events[
typeid(E)] = std::make_unique<E>();
78 E *eventPtr =
dynamic_cast<E *
>(this->
events[
typeid(E)].get());
81 if (eventPtr !=
nullptr)
83 return eventPtr->Connect(_subscriber);
87 gzerr <<
"Failed to connect event: "