GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::RegistryElementID Struct Reference

Opaque handle to a specific element in a Registry. More...

#include <GREM/core/data/Registry.hpp>

Inheritance diagram for grem::RegistryElementID:

Public Member Functions

constexpr RegistryElementIDBase () noexcept=default
 Construct an invalid element handle.
constexpr RegistryElementIDBase (Index index, Generation generation, Flags flags)
 Construct an element handle with a specific set of parameters.
Public Member Functions inherited from grem::RegistryElementIDBase< RegistryElementID >
constexpr RegistryElementIDBase () noexcept=default
 Construct an invalid element handle.
constexpr operator bool () const noexcept
 Check if this handle is potentially valid.
constexpr Identifier getIdentifier () const noexcept
 Get a unique identifier for the underlying representation of the element handle.
constexpr Index getIndex () const noexcept
 Get the index of the element's generation slot.
constexpr Generation getGeneration () const noexcept
 Get the generation counter value of the element.
constexpr Flags getFlags () const noexcept
 Get the user-defined flags of the element.
constexpr bool operator== (const RegistryElementIDBase &other) const noexcept=default
 Compare this handle to another for equality.
constexpr std::strong_ordering operator<=> (const RegistryElementIDBase &other) const noexcept=default
 Compare this handle to another.

Additional Inherited Members

Public Types inherited from grem::RegistryElementIDBase< RegistryElementID >
using Identifier
 Underlying value type.
using Index
 Index type.
using Generation
 Generation counter type.
using Flags
 User-defined flags index type.
Static Public Attributes inherited from grem::RegistryElementIDBase< RegistryElementID >
static constexpr Index INVALID_INDEX
 Reserved index value for an invalid element handle.
static constexpr Index MAX_INDEX
 Maximum valid index value.
static constexpr Generation MAX_GENERATION
 Maximum valid generation counter value.
static constexpr Flags ALL_FLAGS
 Maximum valid set of user-defined flags.

Detailed Description

Opaque handle to a specific element in a Registry.

Member Function Documentation

◆ RegistryElementIDBase() [1/2]

grem::RegistryElementIDBase< Self >::RegistryElementIDBase ( )
constexprdefaultnoexcept

Construct an invalid element handle.

◆ RegistryElementIDBase() [2/2]

grem::RegistryElementIDBase< Self >::RegistryElementIDBase ( Index index,
Generation generation,
Flags flags )
inlineconstexpr

Construct an element handle with a specific set of parameters.

Parameters
indexindex of the element's generation slot within the registry. Must be less than or equal to MAX_INDEX.
generationgeneration counter value of the element. Must be less than or equal to MAX_GENERATION.
flagsuser-defined flags. Must be less than or equal to ALL_FLAGS.

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