template<typename Entity>
class entt::basic_snapshot< Entity >
Utility class to create snapshots from a registry.
A snapshot can be either a dump of the entire registry or a narrower selection of components of interest.
This type can be used in both cases if provided with a correctly configured output archive.
- Template Parameters
-
Entity | A valid entity type (see entt_traits for more details). |
template<typename Entity >
template<typename... Component, typename Archive >
Puts aside the given components.
Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.
- Template Parameters
-
Component | Types of components to serialize. |
Archive | Type of output archive. |
- Parameters
-
archive | A valid reference to an output archive. |
- Returns
- An object of this type to continue creating the snapshot.
template<typename Entity >
template<typename... Component, typename Archive , typename It >
Puts aside the given components for the entities in a range.
Each instance is serialized together with the entity to which it belongs. Entities are serialized along with their versions.
- Template Parameters
-
Component | Types of components to serialize. |
Archive | Type of output archive. |
It | Type of input iterator. |
- Parameters
-
archive | A valid reference to an output archive. |
first | An iterator to the first element of the range to serialize. |
last | An iterator past the last element of the range to serialize. |
- Returns
- An object of this type to continue creating the snapshot.