Flecs: flecs::event_builder_base< Base, E > Struct Template 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 Member Functions | Protected Attributes | List of all members
flecs::event_builder_base< Base, E > Struct Template Reference
C++ API » Addons » Events

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.
template<typename Enum , if_t< is_enum< Enum >::value > = 0>
Base & | id (Enum value)
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 * | world_
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

Definition at line 99 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 105 of file builder.hpp.

## ◆ emit()

template<typename Base , typename E >

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

Definition at line 110 of file builder.hpp.

## ◆ enqueue()

template<typename Base , typename E >

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

Definition at line 117 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 85 of file builder.hpp.

## ◆ id() [1/6]

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/6]

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

  First | The first element of the pair.
  Second | the second element of a pair.

Definition at line 44 of file builder.hpp.

## ◆ id() [3/6]

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

  first | The first element of the pair type.
  second | The second element of the pair id.

Definition at line 65 of file builder.hpp.

## ◆ id() [4/6]

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

  First | The first element of the pair.

Parameters

  second | The second element of the pair id.

Definition at line 56 of file builder.hpp.

## ◆ id() [5/6]

template<typename Base , typename E >
template<typename Enum , if_t< is_enum< Enum >::value > = 0>

Base & flecs::event_builder_base< Base, E >::id | ( | Enum | value | ) |
| inline

Definition at line 70 of file builder.hpp.

## ◆ id() [6/6]

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 77 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 91 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 126 of file builder.hpp.

## ◆ ids_

template<typename Base , typename E >

flecs::type_t flecs::event_builder_base< Base, E >::ids_
| protected

Definition at line 127 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 128 of file builder.hpp.

## ◆ world_

template<typename Base , typename E >

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

Definition at line 125 of file builder.hpp.

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

- include/flecs/addons/cpp/mixins/event/builder.hpp