Skip to content
Flecs v4.1
flecs::event_builder_base< Base, E > Struct Template Reference

Event builder interface. More...

#include <builder.hpp>

Public Member Functions

 event_builder_base (flecs::world_t *world, flecs::entity_t event)
template<typename... T, typename... Args>
Base & id (Args... args)
Base & entity (flecs::entity_t e)
 Set the entity for which to emit the event.
Base & table (flecs::table_t *t, int32_t offset=0, int32_t count=0)
 Set the table for which to emit the event.
Base & ctx (const E *ptr)
 Set event data (const).
Base & ctx (E *ptr)
 Set event data (mutable).
void emit ()
 Emit the event.
void enqueue ()
 Enqueue the event.

Protected Attributes

flecs::world_tworld_
ecs_event_desc_t desc_
flecs::type_t ids_
flecs::id_t ids_array_ [(8)]

Detailed Description

template<typename Base, typename E>
struct flecs::event_builder_base< Base, E >

Event builder interface.

Definition at line 19 of file builder.hpp.

Constructor & Destructor Documentation

◆ event_builder_base()

template<typename Base, typename E>
flecs::event_builder_base< Base, E >::event_builder_base ( flecs::world_t * world,
flecs::entity_t event )
inline

Definition at line 20 of file builder.hpp.

Member Function Documentation

◆ ctx() [1/2]

template<typename Base, typename E>
Base & flecs::event_builder_base< Base, E >::ctx ( const E * ptr)
inline

Set event data (const).

Definition at line 51 of file builder.hpp.

◆ ctx() [2/2]

template<typename Base, typename E>
Base & flecs::event_builder_base< Base, E >::ctx ( E * ptr)
inline

Set event data (mutable).

Definition at line 57 of file builder.hpp.

◆ emit()

template<typename Base, typename E>
void flecs::event_builder_base< Base, E >::emit ( )
inline

Emit the event.

Definition at line 63 of file builder.hpp.

◆ enqueue()

template<typename Base, typename E>
void flecs::event_builder_base< Base, E >::enqueue ( )
inline

Enqueue the event.

Definition at line 71 of file builder.hpp.

◆ entity()

template<typename Base, typename E>
Base & flecs::event_builder_base< Base, E >::entity ( flecs::entity_t e)
inline

Set the entity for which to emit the event.

Definition at line 37 of file builder.hpp.

◆ id()

template<typename Base, typename E>
template<typename... T, typename... Args>
Base & flecs::event_builder_base< Base, E >::id ( Args... args)
inline

Definition at line 30 of file builder.hpp.

◆ table()

template<typename Base, typename E>
Base & flecs::event_builder_base< Base, E >::table ( flecs::table_t * t,
int32_t offset = 0,
int32_t count = 0 )
inline

Set the table for which to emit the event.

Definition at line 43 of file builder.hpp.

Member Data Documentation

◆ desc_

template<typename Base, typename E>
ecs_event_desc_t flecs::event_builder_base< Base, E >::desc_
protected

Definition at line 80 of file builder.hpp.

◆ ids_

template<typename Base, typename E>
flecs::type_t flecs::event_builder_base< Base, E >::ids_
protected

Definition at line 81 of file builder.hpp.

◆ ids_array_

template<typename Base, typename E>
flecs::id_t flecs::event_builder_base< Base, E >::ids_array_[(8)]
protected

Definition at line 82 of file builder.hpp.

◆ world_

template<typename Base, typename E>
flecs::world_t* flecs::event_builder_base< Base, E >::world_
protected

Definition at line 79 of file builder.hpp.


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