Struct rule

Synopsis

#include <include/flecs/addons/cpp/mixins/rule/impl.hpp>

template<typename ... Components>
struct rule final : rule_base, iterable<Components...>

Description

No description yet.

Mentioned in

Methods

find_var

Mentioned in

rule_base overload

Source

Lines 59-82 in include/flecs/addons/cpp/mixins/rule/impl.hpp.

template<typename ... Components>
struct rule final : rule_base, iterable<Components...> {
private:
    using Terms = typename _::term_ptrs<Components...>::array;

    ecs_iter_t get_iter() const override {
        return ecs_rule_iter(m_world, m_rule);
    }

    ecs_iter_next_action_t next_action() const override {
        return ecs_rule_next;
    }

    ecs_iter_next_action_t next_each_action() const override {
        return ecs_rule_next_instanced;
    }

public:
    using rule_base::rule_base;

    int32_t find_var(const char *name) {
        return ecs_rule_find_var(m_rule, name);
    }
};