Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::event_builder_typed< E > Struct Template Reference

Typed event builder. More...

#include <builder.hpp>

Inheritance diagram for flecs::event_builder_typed< E >:
[legend]

Public Member Functions

Classctx (const E &ptr)
 Set event data (const reference).
 
Classctx (E &&ptr)
 Set event data (rvalue reference).
 
- Public Member Functions inherited from flecs::event_builder_base< event_builder_typed< E >, E >
 event_builder_base (flecs::world_t *world, flecs::entity_t event)
 
event_builder_typed< E > & id ()
 Add a component to emit for.
 
event_builder_typed< E > & id ()
 Add a pair to emit for.
 
event_builder_typed< E > & id (entity_t second)
 Add a pair to emit for.
 
event_builder_typed< E > & id (entity_t first, entity_t second)
 Add a pair to emit for.
 
event_builder_typed< E > & id (Enum value)
 Add an enum constant to emit for.
 
event_builder_typed< E > & id (flecs::id_t id)
 Add a (component) ID to emit for.
 
event_builder_typed< E > & entity (flecs::entity_t e)
 Set the entity for which to emit the event.
 
event_builder_typed< E > & table (flecs::table_t *t, int32_t offset=0, int32_t count=0)
 Set the table for which to emit the event.
 
event_builder_typed< E > & ctx (const E *ptr)
 Set event data (const).
 
event_builder_typed< E > & ctx (E *ptr)
 Set event data (mutable).
 
void emit ()
 Emit the event.
 
void enqueue ()
 Enqueue the event.
 

Additional Inherited Members

- Protected Attributes inherited from flecs::event_builder_base< event_builder_typed< E >, E >
flecs::world_tworld_
 
ecs_event_desc_t desc_
 
flecs::type_t ids_
 
flecs::id_t ids_array_ [(8)]
 

Detailed Description

template<typename E>
struct flecs::event_builder_typed< E >

Typed event builder.

Definition at line 150 of file builder.hpp.

Member Function Documentation

◆ ctx() [1/2]

template<typename E >
Class & flecs::event_builder_typed< E >::ctx ( const E & ptr)
inline

Set event data (const reference).

Definition at line 158 of file builder.hpp.

◆ ctx() [2/2]

template<typename E >
Class & flecs::event_builder_typed< E >::ctx ( E && ptr)
inline

Set event data (rvalue reference).

Definition at line 164 of file builder.hpp.


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