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 Class Reference

#include <Subscription.h>

Public Member Functions

 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 components, therefore it can be used as a saving system.
 

Constructor & Destructor Documentation

◆ Subscription()

Subscription::Subscription ( const std::string & directory,
std::shared_ptr< EntityManager > entityManager,
std::shared_ptr< unorMapCM > compManagers )

Constructor of the Subscription class.

Warning
The given subscriptions of the directory folders (and subfolders) should used Entities of the EntityManager and components of the given ComponentManagers, otherwise they will be ignored.
Parameters
directoryThe root directory of the subscription's files.
entityManagerThe environment EntityManager.
compManagersThe environment ComponentManagers.

Member Function Documentation

◆ save()

void Subscription::save ( int entity)

Let you save the subscription of an entity in a file, it will preserve the current values of the components, therefore it can be used as a saving system.

If the file is already present in the directory folder or its subfolders, it will be replaced, otherwise it will be created in the directory folder.

Parameters
entityThe ID of the entity to save.

The documentation for this class was generated from the following file: