54template <
typename... Comps,
typename... Args>
55inline observer_builder<Comps...>
world::observer(Args &&... args)
const {
ecs_world_t world_t
World type.
flecs::observer observer(flecs::entity e) const
Observer world mixin.
ecs_entity_t ecs_observer_init(ecs_world_t *world, const ecs_observer_desc_t *desc)
Create an observer.
const ecs_observer_t * ecs_observer_get(const ecs_world_t *world, ecs_entity_t observer)
Get the observer object.
Used with ecs_observer_init().
ecs_entity_t entity
Existing entity to associate with an observer (optional).
void * ctx
User context to pass to callback.
void * ctx
Observer context.
entity()
Default constructor.
flecs::world world() const
Get the world.
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.
void * ctx() const
Get the observer context.
observer()
Default constructor.
observer(flecs::world_t *world, ecs_observer_desc_t *desc)
Construct from a world and an observer descriptor.
void ctx(void *ctx)
Set the observer context.
flecs::query query() const
Get the query for this observer.
world_t * world_
Pointer to the underlying C world.