1 #ifndef ENTT_ENTITY_ENTITY_HPP
2 #define ENTT_ENTITY_ENTITY_HPP
8 #include "../config/config.h"
20 template<
typename,
typename =
void>
28 template<
typename Type>
29 struct entt_traits<Type, std::enable_if_t<std::is_enum_v<Type>>>
56 static constexpr std::size_t entity_shift = 20u;
82 static constexpr std::size_t entity_shift = 32u;
92 template<
typename Entity>
105 template<
typename Entity>
106 [[nodiscard]] constexpr
operator Entity() const ENTT_NOEXCEPT {
132 template<
typename Entity>
143 template<
typename Entity>
145 return !(
entity == *
this);
157 template<
typename Entity>
159 return other.operator==(
entity);
170 template<
typename Entity>
172 return !(other ==
entity);
constexpr bool operator==(null_t) const noexcept
Compares two null objects.
std::uint32_t version_type
Underlying version type.
std::uint64_t entity_type
Underlying entity type.
constexpr auto to_integral(const Entity entity) noexcept
Converts an entity type to its underlying type.
std::uint32_t entity_type
Underlying entity type.
Null object for all entity identifiers.
constexpr bool operator==(const Entity entity) const noexcept
Compares a null object and an entity identifier of any type.
std::int64_t difference_type
Difference type.
std::int64_t difference_type
Difference type.
constexpr bool operator!=(null_t) const noexcept
Compares two null objects.
std::uint16_t version_type
Underlying version type.
constexpr bool operator!=(const basic_hashed_string< Char > &lhs, const basic_hashed_string< Char > &rhs) noexcept
Compares two hashed strings.
constexpr bool operator==(const Entity entity, null_t other) noexcept
Compares a null object and an entity identifier of any type.
entity
Default entity identifier.
constexpr bool operator!=(const Entity entity) const noexcept
Compares a null object and an entity identifier of any type.