IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::TaskFlagType Concept Reference

#include <ice/task_flags.hxx>

Concept definition

template<typename Enum>
concept TaskFlagType = ice::FlagType<Enum> && ice::FlagAllValue<Enum> // Ensure it's a IceShard flag enabled type
// Ensure the flag type is manually enabled and matches the expected base type
&& Constant_IsTaskFlagsEnumeration<Enum> && std::is_same_v<ice::TaskFlagBaseType, std::underlying_type_t<Enum>>
// Ensure the specified names are part of the enum.
&& requires(Enum t) {
{ Enum::Long } -> std::convertible_to<Enum>;
{ Enum::PrioLow } -> std::convertible_to<Enum>;
{ Enum::PrioNormal } -> std::convertible_to<Enum>;
{ Enum::PrioHigh } -> std::convertible_to<Enum>;
}
&& static_cast<ice::TaskFlagBaseType>(Enum::All & Enum::Long) == Constant_TaskFlagLongValue
&& static_cast<ice::TaskFlagBaseType>(Enum::All & Enum::PrioLow) == Constant_TaskFlagLowPrioValue
&& static_cast<ice::TaskFlagBaseType>(Enum::All & Enum::PrioNormal) == Constant_TaskFlagNormalPrioValue
&& static_cast<ice::TaskFlagBaseType>(Enum::All & Enum::PrioHigh) == Constant_TaskFlagHighPrioValue
Definition enum_flags.hxx:23
Definition enum_flags.hxx:18
Definition task_flags.hxx:24
static constexpr TaskFlagBaseType Constant_TaskFlagLongValue
Enumeration values used in the engine explicitly.
Definition task_flags.hxx:18
static constexpr bool Constant_IsTaskFlagsEnumeration
Enables an enum type to be accepted as a task enumeration.
Definition task_flags.hxx:12
ice::u32 TaskFlagBaseType
Base type required for an Enum to be a valid TaskFlag enumeration.
Definition task_flags.hxx:15
static constexpr TaskFlagBaseType Constant_TaskFlagHighPrioValue
Definition task_flags.hxx:21
static constexpr TaskFlagBaseType Constant_TaskFlagLowPrioValue
Definition task_flags.hxx:19
static constexpr TaskFlagBaseType Constant_TaskFlagNormalPrioValue
Definition task_flags.hxx:20