Function table_column

Summary

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

(1) void * table_column(int32_t column) const

(2) template <typename T, typename A = actual_type_t<T>>
    flecs::column< T > table_column() const

(3) template <typename T>
    flecs::column< T > table_column(flecs::id_t obj) const

Function overload

Synopsis

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

void * table_column(int32_t column) const

Description

Obtain untyped pointer to table column.

Parameters

column - Id of table column (corresponds with location in table type).

Returns
Pointer to table column.

Source

Lines 352-354 in include/flecs/addons/cpp/iter.hpp.

void* table_column(int32_t column) const {
    return ecs_iter_column_w_size(m_iter, 0, column);
}

Synopsis

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

template <typename T, typename A = actual_type_t<T>>
flecs::column< T > table_column() const

Description

Obtain typed pointer to table column. If the table does not contain a column with the specified type, the function will assert.

Template Parameters

T - Type of the table column.

Source

Lines 362-369 in include/flecs/addons/cpp/iter.hpp.

template <typename T, typename A = actual_type_t<T>>
flecs::column<T> table_column() const {
    auto col = ecs_iter_find_column(m_iter, _::cpp_type<T>::id());
    ecs_assert(col != -1, ECS_INVALID_PARAMETER, NULL);
    return flecs::column<A>(static_cast<A*>(ecs_iter_column_w_size(m_iter,
        sizeof(A), col)), static_cast<std::size_t>(m_iter->count), false);
}

Synopsis

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

template <typename T>
flecs::column< T > table_column(flecs::id_t obj) const

Description

No description yet.

Source

Lines 371-379 in include/flecs/addons/cpp/iter.hpp.

template <typename T>
flecs::column<T> table_column(flecs::id_t obj) const {
    auto col = ecs_iter_find_column(m_iter, 
        ecs_pair(_::cpp_type<T>::id(), obj));
    ecs_assert(col != -1, ECS_INVALID_PARAMETER, NULL);
    return flecs::column<T>(static_cast<T*>(ecs_iter_column_w_size(m_iter,
        sizeof(T), col)), static_cast<std::size_t>(m_iter->count), false);
}