16template <
typename EntityType>
22 return ser->
value(flecs::Entity, &
id);
26 *dst = EntityType(
world, e);
48 world.
component<bitmask_constant_t>(
"flecs::meta::bitmask_constant");
82 world.
entity(
"::flecs::cpp").add(flecs::Module).
scope([&]{
84 .
opaque(flecs_entity_support<flecs::entity_view>);
86 .
opaque(flecs_entity_support<flecs::entity>);
120 desc.
count = array_count;
148 return this->value_(
this, type, v);
153 return this->
value(flecs::_::type<T>::id(
158 return this->member_(
this, name);
component & opaque(const Func &type_support)
Register an opaque type interface.
FLECS_API const ecs_entity_t ecs_id(EcsDocDescription)
Component ID for EcsDocDescription.
#define ecs_assert(condition, error_code,...)
Assert.
#define ECS_INVALID_OPERATION
Invalid operation error code.
ecs_id_t ecs_entity_t
An entity identifier.
flecs::component< T > component(Args &&... args) const
Find or register a component.
flecs::entity entity(Args &&... args) const
Create an entity.
ecs_entity_t entity_t
Entity type.
ecs_world_t world_t
World type.
#define ecs_remove_pair(world, subject, first, second)
Remove a pair from an entity.
Used with ecs_array_init().
ecs_entity_t type
Element type.
int32_t count
Number of elements.
Used with ecs_primitive_init().
ecs_primitive_kind_t kind
Primitive type kind.
int(*) member(const struct ecs_serializer_t *ser, const char *member)
Serialize member.
int(*) value(const struct ecs_serializer_t *ser, ecs_entity_t type, const void *value)
Serialize value.
const ecs_world_t * world
The world.
Used with ecs_vector_init().
ecs_entity_t type
Element type.
flecs::entity get_type() const
Get the type of a value.
flecs::entity get_entity() const
Get entity value.
flecs::entity get_unit() const
Get the unit of a value.
ecs_meta_cursor_t cursor_
Cursor object.
const Self & scope(const Func &func) const
The function will be run with the scope set to the current entity.
Type-safe interface for opaque types.
opaque & as_type(flecs::id_t func)
Set the type that describes the kind/structure of the opaque type.
opaque & serialize(flecs::serialize< T > func)
Set the serialize function.
world_t * world_
Pointer to the underlying C world.