12 using U =
typename std::underlying_type<E>::type;
19template <typename E, if_t< is_enum<E>::value >>
21 const auto& et = enum_type<E>(
world_);
component< T > & constant(const char *name, T value)
Add a constant.
#define ecs_assert(condition, error_code,...)
Assert.
#define ECS_INVALID_PARAMETER
Invalid parameter error code.
E to_constant() const
Convert an entity to an enum constant.
flecs::entity to_entity(E constant) const
Convert an enum constant to an entity.
const void * ecs_get_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t component)
Get an immutable pointer to a component.
flecs::id_t id_
The raw ID value.
flecs::world_t * world_
World is optional, but guarantees that entity identifiers extracted from the ID are valid.
world_t * world_
Pointer to the underlying C world.