Struct each_ref_column

Synopsis

#include <include/flecs/addons/cpp/invoker.hpp>

template <typename T, typename = int>
struct each_ref_column : public each_column<T>

Description

No description yet.

Inheritance

Ancestors: each_column

Methods

each_ref_column

Source

Lines 152-168 in include/flecs/addons/cpp/invoker.hpp.

template <typename T, typename = int>
struct each_ref_column : public each_column<T> {
    each_ref_column(const _::term_ptr& term, size_t row) 
        : each_column<T>(term, row) {

        if (term.is_ref) {
            // If this is a reference, set the row to 0 as a ref always is a
            // single value, not an array. This prevents the application from
            // having to do an if-check on whether the column is owned.
            //
            // This check only happens when the current table being iterated
            // over caused the query to match a reference. The check is
            // performed once per iterated table.
            this->m_row = 0;
        }
    }
};