#pragma once #include "Components.h" #include #include #include #include #include #include class ComponentManager { public: static ComponentManager& GetInstance(); ComponentManager(const ComponentManager&) = delete; ComponentManager(ComponentManager&&) = delete; ComponentManager& operator=(const ComponentManager&) = delete; ComponentManager& operator=(ComponentManager&&) = delete; template void AddComponent(T* component, std::uint32_t id); template T* GetComponent(std::uint32_t id); template std::vector GetAllComponentIDs(); template std::vector GetAllComponentPointer(); private: static ComponentManager mInstance; ComponentManager(); std::unordered_map> mComponents; //TODO: Make this not only work with Component* OR add extra checks at templated methodes!!! }; #include "ComponentManager.hpp"