template<typename Entity>
class entt::basic_snapshot_loader< Entity >
Utility class to restore a snapshot as a whole.
A snapshot loader requires that the destination registry be empty and loads all the data at once while keeping intact the identifiers that the entities originally had.
An example of use is the implementation of a save/restore utility.
- Template Parameters
-
Entity | A valid entity type (see entt_traits for more details). |
Definition at line 160 of file snapshot.hpp.
template<typename Entity >
template<typename... Component, typename Archive >
Restores components and assigns them to the right entities.
The template parameter list must be exactly the same used during serialization. In the event that the entity to which the component is assigned doesn't exist yet, the loader will take care to create it with the version it originally had.
- Template Parameters
-
Component | Types of components to restore. |
Archive | Type of input archive. |
- Parameters
-
archive | A valid reference to an input archive. |
- Returns
- A valid loader to continue restoring data.
Definition at line 253 of file snapshot.hpp.
template<typename Entity >
template<typename Archive >
Restores entities that were in use during serialization.
This function restores the entities that were in use during serialization and gives them the versions they originally had.
- Template Parameters
-
Archive | Type of input archive. |
- Parameters
-
archive | A valid reference to an input archive. |
- Returns
- A valid loader to continue restoring data.
Definition at line 221 of file snapshot.hpp.