A strongly-typed identifier wrapper based on entt::id_type. This structure provides a type-safe wrapper around EnTT's id_type, offering implicit conversion to the underlying type for seamless integration with EnTT components. It inherits from BasicId to provide null checking and other common ID operations.
More...
#include <Id.hpp>
|
| constexpr | Id (ValueType value_=NullValue()) |
| | Constructor for Id.
|
| constexpr | operator ValueType () const |
| | Implicit conversion operator to the underlying entt::id_type, allowing seamless use of Id instances where entt::id_type is expected.
|
| constexpr bool | IsNull (void) const |
| | Checks if the ID is null/invalid by comparing its value to the null value defined by the derived class.
|
|
| static constexpr ValueType | NullValue (void) |
| | Get the null value for this ID type. This returns the null value defined by EnTT's id_type, which is typically.
|
| static constexpr Id | Null (void) |
| | Get a null instance of Id, which has its value set to the null value defined by NullValue().
|
| static constexpr Id | Null (void) |
| | Get the null value for this ID type. This should be defined by the derived class to specify what constitutes a null/invalid ID.
|
|
| entt::id_type | value |
| | The underlying value of the ID.
|
A strongly-typed identifier wrapper based on entt::id_type. This structure provides a type-safe wrapper around EnTT's id_type, offering implicit conversion to the underlying type for seamless integration with EnTT components. It inherits from BasicId to provide null checking and other common ID operations.
- Note
- Supports implicit construction from entt::id_type values
-
Supports implicit conversion back to entt::id_type for compatibility
-
Size is guaranteed to match entt::id_type through static assertion
◆ ValueType
◆ Id()
Constructor for Id.
- Parameters
-
| value_ | The value to initialize the ID with. Defaults to the null value defined by the NullValue() method. |
◆ Null()
| Id Engine::Id::Null |
( |
void | | ) |
|
|
staticconstexpr |
Get a null instance of Id, which has its value set to the null value defined by NullValue().
- Returns
- A null instance of Id.
◆ NullValue()
Get the null value for this ID type. This returns the null value defined by EnTT's id_type, which is typically.
- Returns
- The value representing a null/invalid ID for this type.
◆ operator ValueType()
Implicit conversion operator to the underlying entt::id_type, allowing seamless use of Id instances where entt::id_type is expected.
The documentation for this struct was generated from the following files: