#pragma once #include "Components.h" #include "ContiguousContainer.h" class ComponentManager { public: static ComponentManager& GetInstance(); //Singleton ComponentManager(const ComponentManager&) = delete; //Singleton ComponentManager(ComponentManager&&) = delete; //Singleton ComponentManager& operator=(const ComponentManager&) = delete; //Singleton ComponentManager& operator=(ComponentManager&&) = delete; //Singleton template void addSpriteComponent(Args&&... args); template void addRigidbodyComponent(Args&&... args); template void addColiderComponent(Args&&... args); std::vector> getAllSpriteReferences(); std::vector> getAllRigidbodyReferences(); std::vector> getAllColiderReferences(); private: static ComponentManager mInstance; //Singleton ComponentManager(); //Singleton ContiguousContainer mSpriteContainer; ContiguousContainer mRigidbodyContainer; ContiguousContainer mColiderContainer; }; #include "ComponentManager.hpp"