Struct each_column< T, if_t< is_pointer< T >::value &&!is_empty< actual_type_t< T > >::value > >

Synopsis

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

template <typename T>
struct each_column<T, if_t< is_pointer<T>::value && 
        !is_empty<actual_type_t<T>>::value > > 
    : each_column_base

Description

No description yet.

Inheritance

Ancestors: each_column_base

Methods

each_column
get_row

Source

Lines 132-148 in include/flecs/addons/cpp/invoker.hpp.

template <typename T>
struct each_column<T, if_t< is_pointer<T>::value && 
        !is_empty<actual_type_t<T>>::value > > 
    : each_column_base 
{
    each_column(const _::term_ptr& term, size_t row) 
        : each_column_base(term, row) { }

    T get_row() {
        if (this->m_term.ptr) {
            return &static_cast<actual_type_t<T>>(this->m_term.ptr)[this->m_row];
        } else {
            // optional argument doesn't hava a value
            return nullptr;
        }
    }
};