Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
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 >
Base & id ()
 Add component to emit for.
 
template<typename First , typename Second >
Base & id ()
 Add pair to emit for.
 
template<typename First >
Base & id (entity_t second)
 Add pair to emit for.
 
Base & id (entity_t first, entity_t second)
 Add pair to emit for.
 
Base & id (flecs::id_t id)
 Add (component) id to emit for.
 
Base & entity (flecs::entity_t e)
 Set entity for which to emit event.
 
Base & table (flecs::table_t *t, int32_t offset=0, int32_t count=0)
 
Base & ctx (const E *ptr)
 
Base & ctx (E *ptr)
 
void emit ()
 
void enqueue ()
 

Protected Attributes

flecs::world_t * m_world
 
ecs_event_desc_t m_desc
 
flecs::type_t m_ids
 
flecs::id_t m_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

Definition at line 92 of file builder.hpp.

◆ ctx() [2/2]

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

Definition at line 98 of file builder.hpp.

◆ emit()

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

Definition at line 103 of file builder.hpp.

◆ enqueue()

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

Definition at line 110 of file builder.hpp.

◆ entity()

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

Set entity for which to emit event.

Definition at line 78 of file builder.hpp.

◆ id() [1/5]

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

Add component to emit for.

Definition at line 31 of file builder.hpp.

◆ id() [2/5]

template<typename Base , typename E >
template<typename First , typename Second >
Base & flecs::event_builder_base< Base, E >::id ( )
inline

Add pair to emit for.

Template Parameters
FirstThe first element of the pair.
Secondthe second element of a pair.

Definition at line 44 of file builder.hpp.

◆ id() [3/5]

template<typename Base , typename E >
Base & flecs::event_builder_base< Base, E >::id ( entity_t first,
entity_t second )
inline

Add pair to emit for.

Parameters
firstThe first element of the pair type.
secondThe second element of the pair id.

Definition at line 65 of file builder.hpp.

◆ id() [4/5]

template<typename Base , typename E >
template<typename First >
Base & flecs::event_builder_base< Base, E >::id ( entity_t second)
inline

Add pair to emit for.

Template Parameters
FirstThe first element of the pair.
Parameters
secondThe second element of the pair id.

Definition at line 56 of file builder.hpp.

◆ id() [5/5]

template<typename Base , typename E >
Base & flecs::event_builder_base< Base, E >::id ( flecs::id_t id)
inline

Add (component) id to emit for.

Definition at line 70 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

Definition at line 84 of file builder.hpp.

Member Data Documentation

◆ m_desc

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

Definition at line 119 of file builder.hpp.

◆ m_ids

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

Definition at line 120 of file builder.hpp.

◆ m_ids_array

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

Definition at line 121 of file builder.hpp.

◆ m_world

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

Definition at line 118 of file builder.hpp.


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