4template <
typename TDerived,
typename TValue>
10 return TDerived::Null();
14 return value == TDerived::NullValue();
32template <
typename FormatContext>
33auto fmt::formatter<Engine::Id>::format(
const Engine::Id &
id, FormatContext &context)
const
35 return fmt::formatter<entt::id_type>::format(
id.value, context);
38template <
typename FormatContext>
39auto fmt::formatter<Engine::StringId>::format(
const Engine::StringId &
id, FormatContext &context)
const
41 return fmt::formatter<std::string_view>::format(std::string_view(
id.value.data(),
id.value.size()), context);
An Id class for creating strongly-typed ID wrappers. This template provides a common interface for ID...
Definition Id.hpp:18
static constexpr TDerived Null(void)
Get the null value for this ID type. This should be defined by the derived class to specify what cons...
Definition Id.ipp:8
constexpr bool IsNull(void) const
Checks if the ID is null/invalid by comparing its value to the null value defined by the derived clas...
Definition Id.ipp:12
TValue value
The underlying value of the ID.
Definition Id.hpp:20
friend TDerived
Definition Id.hpp:37
A strongly-typed identifier wrapper based on entt::id_type. This structure provides a type-safe wrapp...
Definition Id.hpp:47
constexpr Id(ValueType value_=NullValue())
Constructor for Id.
Definition Id.ipp:17
static constexpr Id Null(void)
Get a null instance of Id, which has its value set to the null value defined by NullValue().
Definition Id.ipp:23
entt::id_type ValueType
Definition Id.hpp:48
static constexpr ValueType NullValue(void)
Get the null value for this ID type. This returns the null value defined by EnTT's id_type,...
Definition Id.ipp:21
A strongly-typed string identifier wrapper based on entt::hashed_string. This structure provides a ty...
Definition Id.hpp:79
static constexpr StringId Null()
Get a null instance of StringId, which has its value set to the null value defined by NullValue().
Definition Id.ipp:29
static constexpr ValueType NullValue()
Get the null value for this StringId type. This returns a default-constructed entt::hashed_string.
Definition Id.ipp:27
constexpr StringId(ValueType v=NullValue())
Constructor for StringId.
Definition Id.ipp:25
entt::hashed_string ValueType
The underlying value type for StringId, which is entt::hashed_string. This type encapsulates the stri...
Definition Id.hpp:83