Flecs: include/flecs/addons/cpp/mixins/observer/builder.hpp Source File
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.1 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
builder.hpp
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "../../utils/node_builder.hpp"
9#include "builder_i.hpp"
10
11namespace flecs {
12namespace _ {
13 template <typename ... Components>
14 using observer_builder_base = node_builder<
15 observer, ecs_observer_desc_t, observer_builder<Components...>,
16 observer_builder_i, Components ...>;
17}
18
23template <typename ... Components>
24 struct observer_builder final : _::observer_builder_base<Components...> {
25 observer_builder(flecs::world_t* world, const char *name = nullptr)
26 : _::observer_builder_base<Components...>(world, name)
27 {
28 _::sig<Components...>(world).populate(this);
29 }
30};
31
32}
ecs_observer_desc_t
struct ecs_observer_desc_t ecs_observer_desc_t
Used with ecs_observer_init().
flecs::_
Int to enum.
Definition component.hpp:18
node_builder.hpp
Base builder class for node objects, like systems, observers.
builder_i.hpp
Observer builder interface.
flecs::_::node_builder
Definition node_builder.hpp:16
flecs::_::sig
Definition signature.hpp:38
flecs::world
The world.
Definition world.hpp:158
flecs::world::observer
flecs::observer observer(flecs::entity e) const
Observer builder.