Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
ecs_event_desc_t Struct Reference

Used with ecs_emit(). More...

#include <flecs.h>

Public Attributes

ecs_entity_t event
 The event id.
 
const ecs_type_tids
 Component ids.
 
ecs_table_ttable
 The table for which to notify.
 
ecs_table_tother_table
 Optional 2nd table to notify.
 
int32_t offset
 Limit notified entities to ones starting from offset (row) in table.
 
int32_t count
 Limit number of notified entities to count.
 
ecs_entity_t entity
 Single-entity alternative to setting table / offset / count.
 
void * param
 Optional context.
 
const void * const_param
 Same as param, but with the guarantee that the value won't be modified.
 
ecs_poly_tobservable
 Observable (usually the world)
 
ecs_flags32_t flags
 Event flags.
 

Detailed Description

Used with ecs_emit().

Definition at line 1336 of file flecs.h.

Member Data Documentation

◆ const_param

const void* ecs_event_desc_t::const_param

Same as param, but with the guarantee that the value won't be modified.

When an event with a const parameter is enqueued, the value of the param is copied to a temporary storage of the event type.

Definition at line 1372 of file flecs.h.

◆ count

int32_t ecs_event_desc_t::count

Limit number of notified entities to count.

offset+count must be less than the total number of entities in the table. If left to 0, it will be automatically determined by doing ecs_table_count(table) - offset.

Definition at line 1358 of file flecs.h.

◆ entity

ecs_entity_t ecs_event_desc_t::entity

Single-entity alternative to setting table / offset / count.

Definition at line 1361 of file flecs.h.

◆ event

ecs_entity_t ecs_event_desc_t::event

The event id.

Only observers for the specified event will be notified

Definition at line 1338 of file flecs.h.

◆ flags

ecs_flags32_t ecs_event_desc_t::flags

Event flags.

Definition at line 1378 of file flecs.h.

◆ ids

const ecs_type_t* ecs_event_desc_t::ids

Component ids.

Only observers with a matching component id will be notified. Observers are guaranteed to get notified once, even if they match more than one id.

Definition at line 1343 of file flecs.h.

◆ observable

ecs_poly_t* ecs_event_desc_t::observable

Observable (usually the world)

Definition at line 1375 of file flecs.h.

◆ offset

int32_t ecs_event_desc_t::offset

Limit notified entities to ones starting from offset (row) in table.

Definition at line 1353 of file flecs.h.

◆ other_table

ecs_table_t* ecs_event_desc_t::other_table

Optional 2nd table to notify.

This can be used to communicate the previous or next table, in case an entity is moved between tables.

Definition at line 1350 of file flecs.h.

◆ param

void* ecs_event_desc_t::param

Optional context.

The type of the param must be the event, where the event is a component. When an event is enqueued, the value of param is coped to a temporary storage of the event type.

Definition at line 1367 of file flecs.h.

◆ table

ecs_table_t* ecs_event_desc_t::table

The table for which to notify.

Definition at line 1346 of file flecs.h.


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