23 void add(std::unique_ptr<IComponentSystem> system);
27 template<
typename ComponentType>
30 const auto it = _systemsByComponentType.find(std::type_index(
typeid(ComponentType)));
31 return it != _systemsByComponentType.end() ? it->second :
nullptr;
40 const auto it = _systemsByComponentType.find(std::type_index(typeInfo));
41 return it != _systemsByComponentType.end() ? it->second :
nullptr;
45 std::vector<std::unique_ptr<IComponentSystem>> _ownedSystems;
46 std::unordered_map<std::string, IComponentSystem*> _systems;
47 std::unordered_map<std::type_index, IComponentSystem*> _systemsByComponentType;