Struct page_iterable

Synopsis

#include <include/flecs/addons/cpp/utils/iterable.hpp>

template <typename ... Components>
struct page_iterable final : iterable<Components...>

Description

No description yet.

Methods

page_iterable
get_iter
next_action
next_each_action

Source

Lines 191-218 in include/flecs/addons/cpp/utils/iterable.hpp.

template <typename ... Components>
struct page_iterable final : iterable<Components...> {
    template <typename Iterable>
    page_iterable(int32_t offset, int32_t limit, Iterable *it) 
        : m_offset(offset)
        , m_limit(limit)
    {
        m_chain_it = it->get_iter();
    }

protected:
    ecs_iter_t get_iter() const {
        return ecs_page_iter(&m_chain_it, m_offset, m_limit);
    }

    ecs_iter_next_action_t next_action() const {
        return ecs_page_next;
    }

    ecs_iter_next_action_t next_each_action() const {
        return ecs_page_next;
    }

private:
    ecs_iter_t m_chain_it;
    int32_t m_offset;
    int32_t m_limit;
};