Flecs: ecs_observer_t Struct Reference
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
Public Attributes | List of all members
ecs_observer_t Struct Reference
C API » Core » API types » Query descriptor types.

An observer reacts to events matching a query. More...

`#include <flecs.h>`

## Public Attributes
ecs_header_t | hdr
| Object header.
ecs_query_t * | query
| Observer query.
ecs_entity_t | events [(8)]
| Observer events.
int32_t | event_count
| Number of events.
ecs_iter_action_t | callback
| See ecs_observer_desc_t::callback.
ecs_run_action_t | run
| See ecs_observer_desc_t::run.
void * | ctx
| Observer context.
void * | callback_ctx
| Callback language binding context.
void * | run_ctx
| Run language binding context.
ecs_ctx_free_t | ctx_free
| Callback to free ctx.
ecs_ctx_free_t | callback_ctx_free
| Callback to free callback_ctx.
ecs_ctx_free_t | run_ctx_free
| Callback to free run_ctx.
ecs_observable_t * | observable
| Observable for observer.
ecs_world_t * | world
| The world.
ecs_entity_t | entity
| Entity associated with observer.

## Detailed Description

An observer reacts to events matching a query.

Created with ecs_observer_init().

Definition at line 830 of file flecs.h.

## Member Data Documentation

## ◆ callback

ecs_iter_action_t ecs_observer_t::callback

See ecs_observer_desc_t::callback.

Definition at line 839 of file flecs.h.

## ◆ callback_ctx

void* ecs_observer_t::callback_ctx

Callback language binding context.

Definition at line 843 of file flecs.h.

## ◆ callback_ctx_free

ecs_ctx_free_t ecs_observer_t::callback_ctx_free

Callback to free callback_ctx.

Definition at line 847 of file flecs.h.

## ◆ ctx

void* ecs_observer_t::ctx

Observer context.

Definition at line 842 of file flecs.h.

## ◆ ctx_free

ecs_ctx_free_t ecs_observer_t::ctx_free

Callback to free ctx.

Definition at line 846 of file flecs.h.

## ◆ entity

ecs_entity_t ecs_observer_t::entity

Entity associated with observer.

Definition at line 853 of file flecs.h.

## ◆ event_count

int32_t ecs_observer_t::event_count

Number of events.

Definition at line 837 of file flecs.h.

## ◆ events

ecs_entity_t ecs_observer_t::events[(8)]

Observer events.

Definition at line 836 of file flecs.h.

## ◆ hdr

ecs_header_t ecs_observer_t::hdr

Object header.

Definition at line 831 of file flecs.h.

## ◆ observable

ecs_observable_t* ecs_observer_t::observable

Observable for observer.

Definition at line 850 of file flecs.h.

## ◆ query

ecs_query_t* ecs_observer_t::query

Observer query.

Definition at line 833 of file flecs.h.

## ◆ run

ecs_run_action_t ecs_observer_t::run

See ecs_observer_desc_t::run.

Definition at line 840 of file flecs.h.

## ◆ run_ctx

void* ecs_observer_t::run_ctx

Run language binding context.

Definition at line 844 of file flecs.h.

## ◆ run_ctx_free

ecs_ctx_free_t ecs_observer_t::run_ctx_free

Callback to free run_ctx.

Definition at line 848 of file flecs.h.

## ◆ world

ecs_world_t* ecs_observer_t::world

The world.

Definition at line 852 of file flecs.h.

The documentation for this struct was generated from the following file:

- include/flecs.h