|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Handle to a specific entity in a registry. More...
#include <GREM/execution/EntityRegistry.hpp>
Public Types | |
| using | Identifier = uint64_t |
| Underlying value type. | |
| using | Index = uint32_t |
| Index type. | |
| using | Generation = uint16_t |
| Generation counter type. | |
| using | Flags = uint16_t |
| User-defined flags type. | |
Public Member Functions | |
| GREM_ALWAYS_INLINE constexpr | EntityID () noexcept=default |
| Construct an invalid entity handle. | |
| GREM_ALWAYS_INLINE constexpr | EntityID (Index index, Generation generation, Flags flags) |
| Construct an entity handle with a specific set of parameters. | |
| GREM_ALWAYS_INLINE constexpr | operator bool () const noexcept |
| Check if this handle is potentially valid. | |
| GREM_ALWAYS_INLINE constexpr Identifier | getIdentifier () const noexcept |
| Get a unique identifier for the underlying representation of the entity handle. | |
| GREM_ALWAYS_INLINE constexpr Index | getIndex () const noexcept |
| Get the index of the entity's generation slot. | |
| GREM_ALWAYS_INLINE constexpr Generation | getGeneration () const noexcept |
| Get the generation counter value of the entity. | |
| GREM_ALWAYS_INLINE constexpr Flags | getFlags () const noexcept |
| Get the user-defined flags of the entity. | |
| GREM_ALWAYS_INLINE constexpr bool | operator== (const EntityID &other) const noexcept=default |
| Compare this handle to another for equality. | |
| GREM_ALWAYS_INLINE constexpr std::strong_ordering | operator<=> (const EntityID &other) const noexcept=default |
| Compare this handle to another. | |
Static Public Attributes | |
| static constexpr Index | INVALID_INDEX = Limits<Index>::MAX |
| Reserved index value for an invalid entity handle. | |
| static constexpr Index | MAX_INDEX = Limits<Index>::MAX - 1 |
| Maximum valid index value. | |
| static constexpr Generation | MAX_GENERATION = Limits<Generation>::MAX |
| Maximum valid generation counter value. | |
| static constexpr Flags | ALL_FLAGS = Limits<Flags>::MAX |
| Maximum valid set of user-defined flags. | |
Handle to a specific entity in a registry.
| using grem::execution::EntityID::Identifier = uint64_t |
Underlying value type.
| using grem::execution::EntityID::Index = uint32_t |
Index type.
| using grem::execution::EntityID::Generation = uint16_t |
Generation counter type.
| using grem::execution::EntityID::Flags = uint16_t |
User-defined flags type.
|
constexprdefaultnoexcept |
Construct an invalid entity handle.
|
inlineconstexpr |
Construct an entity handle with a specific set of parameters.
| index | index of the entity's generation slot within the registry. Must be less than or equal to MAX_INDEX. |
| generation | generation counter value of the entity. Must be less than or equal to MAX_GENERATION. |
| flags | user-defined flags. Must be less than or equal to ALL_FLAGS. |
|
inlineexplicitconstexprnoexcept |
Check if this handle is potentially valid.
|
inlinenodiscardconstexprnoexcept |
Get a unique identifier for the underlying representation of the entity handle.
|
inlinenodiscardconstexprnoexcept |
Get the index of the entity's generation slot.
|
inlinenodiscardconstexprnoexcept |
Get the generation counter value of the entity.
|
inlinenodiscardconstexprnoexcept |
Get the user-defined flags of the entity.
|
nodiscardconstexprdefaultnoexcept |
Compare this handle to another for equality.
| other | the handle to compare this one to. |
|
nodiscardconstexprdefaultnoexcept |
Compare this handle to another.
| other | the handle to compare this one to. |
Reserved index value for an invalid entity handle.
Maximum valid index value.
|
staticconstexpr |
Maximum valid generation counter value.
Maximum valid set of user-defined flags.