Skip to content
Flecs v4.1
mixin.inl
Go to the documentation of this file.
1/**
2 * @file addons/cpp/mixins/pipeline/mixin.inl
3 * @brief Pipeline world mixin.
4 */
5
6/**
7 * @memberof flecs::world
8 * @ingroup cpp_pipelines
9 *
10 * @{
11 */
12
13/** Create a new pipeline.
14 *
15 * @param name The pipeline name (optional).
16 * @return A pipeline builder.
17 */
18flecs::pipeline_builder<> pipeline(const char *name = nullptr) const;
19
20/** Create a new pipeline.
21 *
22 * @tparam Pipeline Type associated with the pipeline.
23 * @return A pipeline builder.
24 */
25template <typename Pipeline, if_not_t< is_enum<Pipeline>::value > = 0>
27
28/** Set the pipeline.
29 * @see ecs_set_pipeline()
30 */
31void set_pipeline(const flecs::entity pip) const;
32
33/** Set the pipeline.
34 * @see ecs_set_pipeline()
35 */
36template <typename Pipeline>
37void set_pipeline() const;
38
39/** Get the pipeline.
40 * @see ecs_get_pipeline()
41 */
43
44/** Progress the world one tick.
45 * @see ecs_progress()
46 */
48
49/** Run a pipeline.
50 * @see ecs_run_pipeline()
51 */
53
54/** Run a pipeline.
55 * @tparam Pipeline Type associated with the pipeline.
56 * @see ecs_run_pipeline()
57 */
58template <typename Pipeline, if_not_t< is_enum<Pipeline>::value > = 0>
60
61/** Set the number of threads.
62 * @see ecs_set_threads()
63 */
64void set_threads(int32_t threads) const;
65
66/** Get the number of threads.
67 * @see ecs_get_stage_count()
68 */
69int32_t get_threads() const;
70
71/** Set the number of task threads.
72 * @see ecs_set_task_threads()
73 */
74void set_task_threads(int32_t task_threads) const;
75
76/** Return true if task thread use has been requested.
77 * @see ecs_using_task_threads()
78 */
79bool using_task_threads() const;
80
81/** @} */
ecs_entity_t entity_t
Entity type.
Definition c_types.hpp:21
#define ecs_ftime_t
Customizable precision for scalar time values.
Definition flecs.h:59
Entity.
Definition entity.hpp:30
Pipeline builder.
Definition builder.hpp:24
ecs_ftime_t delta_time() const
Get delta_time.
Definition world.hpp:905
flecs::entity get_pipeline() const
Get the pipeline.
void run_pipeline(const flecs::entity_t pip, ecs_ftime_t delta_time=0.0) const
Run a pipeline.
void set_threads(int32_t threads) const
Set the number of threads.
void set_pipeline() const
Set the pipeline.
flecs::pipeline_builder pipeline() const
Create a new pipeline.
int32_t get_threads() const
Get the number of threads.
void set_task_threads(int32_t task_threads) const
Set the number of task threads.
void run_pipeline(ecs_ftime_t delta_time=0.0) const
Run a pipeline.
bool progress(ecs_ftime_t delta_time=0.0) const
Progress the world one tick.
void set_pipeline(const flecs::entity pip) const
Set the pipeline.
bool using_task_threads() const
Return true if task thread use has been requested.
flecs::pipeline_builder pipeline(const char *name=nullptr) const
Create a new pipeline.