PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
pixelbullet::EntityId Class Reference

Public Types

using ValueType = uint32_t
 

Public Member Functions

constexpr EntityId (uint32_t index, uint32_t version) noexcept
 
constexpr uint32_t Index () const noexcept
 
constexpr uint32_t Version () const noexcept
 
constexpr ValueType Raw () const noexcept
 
constexpr bool operator== (const EntityId &other) const noexcept=default
 
constexpr bool operator!= (const EntityId &other) const noexcept=default
 
constexpr operator bool () const noexcept
 

Static Public Member Functions

static constexpr EntityId Invalid () noexcept
 
static constexpr EntityId FromRaw (ValueType raw) noexcept
 

Static Public Attributes

static constexpr uint32_t index_bits = 24
 
static constexpr uint32_t version_bits = 8
 
static constexpr ValueType IndexMask = (1u << index_bits) - 1
 
static constexpr ValueType VersionMask = (1u << version_bits) - 1
 

The documentation for this class was generated from the following file: