TailorMade 2.0
Tailor Made is a high-performance C++20 ECS library with on-the-fly entity creation and JSON-based definitions for entities, components, and their relationships.
 
Loading...
Searching...
No Matches
Subscription.h
Go to the documentation of this file.
1
7
8#ifndef _SUBSCRIPTION_H
9#define _SUBSCRIPTION_H
10
11#include <EntityManager.h>
12#include <ComponentManager.h>
13
21
22using unorMapCM = std::unordered_map<std::string, std::shared_ptr<ComponentManager>>;
23
25public:
33 Subscription(const std::string& directory, std::shared_ptr<EntityManager> entityManager, std::shared_ptr<unorMapCM> compManagers);
34
40 void save(int entity);
41
42private:
46 std::string directory;
47
51 std::unordered_map<std::string, std::string> entitiesFP;
52
56 std::shared_ptr<EntityManager> entityManager;
57
61 std::shared_ptr<unorMapCM> managers;
62};
63
64#endif //_SUBSCRIPTION_H
Project TailorMade.
Project TailorMade.
std::unordered_map< std::string, std::shared_ptr< ComponentManager > > unorMapCM
Definition Subscription.h:22
Subscription(const std::string &directory, std::shared_ptr< EntityManager > entityManager, std::shared_ptr< unorMapCM > compManagers)
Constructor of the Subscription class.
void save(int entity)
Let you save the subscription of an entity in a file, it will preserve the current values of the comp...