EnTT 3.14.0
|
Common basic entity traits implementation. More...
#include <entity.hpp>
Public Types | |
using | value_type = typename Traits::value_type |
Value type. | |
using | entity_type = typename Traits::entity_type |
Underlying entity type. | |
using | version_type = typename Traits::version_type |
Underlying version type. | |
Static Public Member Functions | |
static constexpr entity_type | to_integral (const value_type value) noexcept |
Converts an entity to its underlying type. | |
static constexpr entity_type | to_entity (const value_type value) noexcept |
Returns the entity part once converted to the underlying type. | |
static constexpr version_type | to_version (const value_type value) noexcept |
Returns the version part once converted to the underlying type. | |
static constexpr value_type | next (const value_type value) noexcept |
Returns the successor of a given identifier. | |
static constexpr value_type | construct (const entity_type entity, const version_type version) noexcept |
Constructs an identifier from its parts. | |
static constexpr value_type | combine (const entity_type lhs, const entity_type rhs) noexcept |
Combines two identifiers in a single one. | |
Static Public Attributes | |
static constexpr entity_type | entity_mask = Traits::entity_mask |
Entity mask size. | |
static constexpr entity_type | version_mask = Traits::version_mask |
Version mask size. | |
Common basic entity traits implementation.
Traits | Actual entity traits to use. |
Definition at line 61 of file entity.hpp.
using entt::basic_entt_traits< Traits >::entity_type = typename Traits::entity_type |
Underlying entity type.
Definition at line 71 of file entity.hpp.
using entt::basic_entt_traits< Traits >::value_type = typename Traits::value_type |
Value type.
Definition at line 69 of file entity.hpp.
using entt::basic_entt_traits< Traits >::version_type = typename Traits::version_type |
Underlying version type.
Definition at line 73 of file entity.hpp.
|
inlinestaticconstexprnoexcept |
Combines two identifiers in a single one.
The returned identifier is a copy of the first element except for its version, which is taken from the second element.
lhs | The identifier from which to take the entity part. |
rhs | The identifier from which to take the version part. |
Definition at line 149 of file entity.hpp.
|
inlinestaticconstexprnoexcept |
Constructs an identifier from its parts.
If the version part is not provided, a tombstone is returned.
If the entity part is not provided, a null identifier is returned.
entity | The entity part of the identifier. |
version | The version part of the identifier. |
Definition at line 131 of file entity.hpp.
|
inlinestaticconstexprnoexcept |
Returns the successor of a given identifier.
value | The identifier of which to return the successor. |
Definition at line 116 of file entity.hpp.
|
inlinestaticconstexprnoexcept |
Returns the entity part once converted to the underlying type.
value | The value to convert. |
Definition at line 94 of file entity.hpp.
|
inlinestaticconstexprnoexcept |
Converts an entity to its underlying type.
value | The value to convert. |
Definition at line 85 of file entity.hpp.
|
inlinestaticconstexprnoexcept |
Returns the version part once converted to the underlying type.
value | The value to convert. |
Definition at line 103 of file entity.hpp.
|
staticconstexpr |
Entity mask size.
Definition at line 76 of file entity.hpp.
|
staticconstexpr |
Version mask size.
Definition at line 78 of file entity.hpp.