Struct filter

Synopsis

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

template<typename ... Components>
struct filter : filter_base, iterable<Components...>

Description

No description yet.

Mentioned in

Methods

filter overload
filter_base overload
operator= overload

Source

Lines 124-160 in include/flecs/addons/cpp/mixins/filter/impl.hpp.

template<typename ... Components>
struct filter : filter_base, iterable<Components...> {
private:
    using Terms = typename _::term_ptrs<Components...>::array;

public:
    using filter_base::filter_base;

    filter() : filter_base() { } // necessary not not confuse msvc

    filter(const filter& obj) : filter_base(obj) { }

    filter& operator=(const filter& obj) {
        filter_base::operator=(obj);
        return *this;
    }

    filter(filter&& obj) : filter_base(FLECS_MOV(obj)) { }

    filter& operator=(filter&& obj) {
        filter_base(FLECS_MOV(obj));
        return *this;
    }

private:
    ecs_iter_t get_iter() const override {
        return ecs_filter_iter(m_world, m_filter_ptr);
    }

    ecs_iter_next_action_t next_action() const override {
        return ecs_filter_next;
    }

    ecs_iter_next_action_t next_each_action() const override {
        return ecs_filter_next_instanced;
    }
};