sandbox
Loading...
Searching...
No Matches
sbx::ecs::entity_traits< Type > Struct Template Reference

Entity traits. More...

#include <entity.hpp>

Inheritance diagram for sbx::ecs::entity_traits< Type >:
sbx::ecs::basic_entity_traits< Type > sbx::ecs::basic_entity_traits< std::underlying_type_t< Type > > sbx::ecs::basic_entity_traits< Type::entity_type >

Public Types

using value_type = basic_entity_traits< Type >::value_type
 
using entity_type = basic_entity_traits< Type >::entity_type
 
using version_type = basic_entity_traits< Type >::version_type
 
- Public Types inherited from sbx::ecs::basic_entity_traits< Type >
using value_type = Type
 
using value_type = Type
 

Static Public Member Functions

static constexpr auto to_integral (const value_type value) noexcept -> entity_type
 
static constexpr auto to_entity (const value_type value) noexcept -> entity_type
 
static constexpr auto to_version (const value_type value) noexcept -> version_type
 
static constexpr auto next (const value_type value) noexcept -> value_type
 
static constexpr auto construct (const entity_type entity, const version_type version=version_type{0}) noexcept -> value_type
 
static constexpr auto combine (const entity_type lhs, const entity_type rhs) noexcept -> value_type
 

Static Public Attributes

static constexpr auto entity_mask = basic_entity_traits<Type>::entity_mask
 
static constexpr auto version_mask = basic_entity_traits<Type>::version_mask
 
static constexpr auto version_shift = std::popcount(entity_mask)
 
static constexpr auto page_size = std::size_t{4096}
 

Detailed Description

template<typename Type>
struct sbx::ecs::entity_traits< Type >

Entity traits.

Template Parameters
TypeUnsigned integral, enumeration or class type

The documentation for this struct was generated from the following files: