EnTT 3.14.0
|
Utility class to create snapshots from a registry. More...
#include <snapshot.hpp>
Public Types | |
using | registry_type = Registry |
using | entity_type = typename registry_type::entity_type |
Underlying entity identifier. | |
Public Member Functions | |
basic_snapshot (const registry_type &source) noexcept | |
Constructs an instance that is bound to a given registry. | |
basic_snapshot (const basic_snapshot &)=delete | |
Default copy constructor, deleted on purpose. | |
basic_snapshot (basic_snapshot &&) noexcept=default | |
Default move constructor. | |
~basic_snapshot ()=default | |
Default destructor. | |
basic_snapshot & | operator= (const basic_snapshot &)=delete |
Default copy assignment operator, deleted on purpose. | |
basic_snapshot & | operator= (basic_snapshot &&) noexcept=default |
Default move assignment operator. | |
template<typename Type , typename Archive > | |
const basic_snapshot & | get (Archive &archive, const id_type id=type_hash< Type >::value()) const |
Serializes all elements of a type with associated identifiers. | |
template<typename Type , typename Archive , typename It > | |
const basic_snapshot & | get (Archive &archive, It first, It last, const id_type id=type_hash< Type >::value()) const |
Serializes all elements of a type with associated identifiers for the entities in a range. | |
Utility class to create snapshots from a registry.
A snapshot can be either a dump of the entire registry or a narrower selection of elements of interest.
This type can be used in both cases if provided with a correctly configured output archive.
Registry | Basic registry type. |
Definition at line 47 of file snapshot.hpp.
using entt::basic_snapshot< Registry >::entity_type = typename registry_type::entity_type |
Underlying entity identifier.
Definition at line 55 of file snapshot.hpp.
Basic registry type.
Definition at line 53 of file snapshot.hpp.
|
inlinenoexcept |
Constructs an instance that is bound to a given registry.
source | A valid reference to a registry. |
Definition at line 61 of file snapshot.hpp.
|
inline |
Serializes all elements of a type with associated identifiers.
Type | Type of elements to serialize. |
Archive | Type of output archive. |
archive | A valid reference to an output archive. |
id | Optional name used to map the storage within the registry. |
Definition at line 94 of file snapshot.hpp.
|
inline |
Serializes all elements of a type with associated identifiers for the entities in a range.
Type | Type of elements to serialize. |
Archive | Type of output archive. |
It | Type of input iterator. |
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. |
id | Optional name used to map the storage within the registry. |
Definition at line 140 of file snapshot.hpp.
|
defaultnoexcept |
Default move assignment operator.
|
delete |
Default copy assignment operator, deleted on purpose.