Function kind

Summary

#include <include/flecs/addons/cpp/mixins/system/builder_i.hpp>

(1) Base & kind(entity_t phase)

(2) template <typename Phase>
    Base & kind()

Function overload

Synopsis

#include <include/flecs/addons/cpp/mixins/system/builder_i.hpp>

Base & kind(entity_t phase)

Description

Specify in which phase the system should run.

Parameters

phase - The phase.

Mentioned in

Source

Lines 22-34 in include/flecs/addons/cpp/mixins/system/builder_i.hpp.

Base& kind(entity_t phase) {
    flecs::entity_t cur_phase = ecs_get_target(
        world_v(), m_desc->entity, EcsDependsOn, 0);
    if (cur_phase) {
        ecs_remove_id(world_v(), m_desc->entity, ecs_dependson(cur_phase));
        ecs_remove_id(world_v(), m_desc->entity, cur_phase);
    }
    if (phase) {
        ecs_add_id(world_v(), m_desc->entity, ecs_dependson(phase));
        ecs_add_id(world_v(), m_desc->entity, phase);
    }
    return *this;
}

Synopsis

#include <include/flecs/addons/cpp/mixins/system/builder_i.hpp>

template <typename Phase>
Base & kind()

Description

Specify in which phase the system should run.

Template Parameters

Phase - The phase.

Mentioned in

Source

Lines 40-43 in include/flecs/addons/cpp/mixins/system/builder_i.hpp.

template <typename Phase>
Base& kind() {
    return this->kind(_::cpp_type<Phase>::id(world_v()));
}