Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Engine::BasicId< TDerived, TValue > Struct Template Reference

An Id class for creating strongly-typed ID wrappers. This template provides a common interface for ID types by wrapping a value type with type-safe operations. Derived classes should implement static NullValue() and Null() methods to define null/invalid ID semantics. More...

#include <Id.hpp>

Public Attributes

TValue value
 The underlying value of the ID.

Detailed Description

template<typename TDerived, typename TValue>
struct Engine::BasicId< TDerived, TValue >

An Id class for creating strongly-typed ID wrappers. This template provides a common interface for ID types by wrapping a value type with type-safe operations. Derived classes should implement static NullValue() and Null() methods to define null/invalid ID semantics.

Template Parameters
TDerivedThe derived class type (CRTP pattern)
TValueThe underlying value type for the ID (e.g., int, uint64_t, etc.)
Note
Derived classes must provide:
  • static constexpr TValue NullValue() - Returns the value representing a null/invalid ID
  • static constexpr TDerived Null() - Returns a null instance of the derived type

Member Data Documentation

◆ value

template<typename TDerived, typename TValue>
TValue Engine::BasicId< TDerived, TValue >::value

The underlying value of the ID.


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