Skip to content
Flecs v4.1
builder.hpp
Go to the documentation of this file.
1/**
2 * @file addons/cpp/mixins/pipeline/builder.hpp
3 * @brief Pipeline builder.
4 */
5
6#pragma once
7
9#include "builder_i.hpp"
10
11namespace flecs {
12namespace _ {
13 template <typename ... Components>
14 using pipeline_builder_base = builder<
15 pipeline<Components...>, ecs_pipeline_desc_t, pipeline_builder<Components...>,
16 pipeline_builder_i, Components ...>;
17}
18
19/** Pipeline builder.
20 *
21 * @ingroup cpp_pipelines
22 */
23template <typename ... Components>
24struct pipeline_builder final : _::pipeline_builder_base<Components...> {
25 /** Construct a pipeline builder. */
27 : _::pipeline_builder_base<Components...>(world)
28 {
29 _::populate_signature<Components...>(world, this);
30 this->desc_.entity = id;
31 }
32
33 /** Construct a named pipeline builder. */
35 : _::pipeline_builder_base<Components...>(world)
36 {
37 _::populate_signature<Components...>(world, this);
38 this->set_name(name);
39 }
40};
41
42}
struct ecs_pipeline_desc_t ecs_pipeline_desc_t
Pipeline descriptor, used with ecs_pipeline_init().
ecs_entity_t entity_t
Entity type.
Definition c_types.hpp:21
ecs_world_t world_t
World type.
Definition c_types.hpp:18
Int to enum.
Definition component.hpp:18
Pipeline builder interface.
Class that wraps around a flecs::id_t.
Definition decl.hpp:27
pipeline_builder(flecs::world_t *world, const char *name)
Construct a named pipeline builder.
Definition builder.hpp:34
pipeline_builder(flecs::world_t *world, flecs::entity_t id=0)
Construct a pipeline builder.
Definition builder.hpp:26
Base & name(const char *name)
Specify the value of the identifier by name.
Definition builder_i.hpp:58
Base & entity(flecs::entity_t entity)
Specify the value of the identifier by ID.
Definition builder_i.hpp:51
The world.
Definition world.hpp:129
flecs::pipeline_builder pipeline(const char *name=nullptr) const
Create a new pipeline.
Builder base class.