GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::execution::Columns< Components > Class Template Reference

View of the rows in a specific set of columns in an EntityTable. More...

#include <GREM/execution/EntityTable.hpp>

Public Types

using MutableComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::MutableComponents...>
 List of non-const components required by the range, provided as a meta::TypeList.
using ImmutableComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::ImmutableComponents...>
 List of const components required by the range, provided as a meta::TypeList.
using IncludedComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::IncludedComponents...>
 List of components required by the range, provided as a meta::TypeList.
using ExcludedComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::ExcludedComponents...>
 List of components excluded by the range, provided as a meta::TypeList.
using iterator = detail::ColumnsIterator<IncludedComponents>
using sentinel = detail::ColumnsSentinel
using value_type = typename iterator::value_type
using reference = typename iterator::reference
using size_type = size_t
using difference_type = ptrdiff_t

Public Member Functions

constexpr Columns () noexcept=default
 Construct an empty entity range.
constexpr Columns (const iterator &first, const iterator &last) noexcept
 Construct an entity subrange from an iterator pair.
constexpr iterator begin () const noexcept
constexpr sentinel end () const noexcept
constexpr size_type size () const noexcept
 Get the number of rows in the range.
constexpr bool empty () const noexcept
 Check if the range is empty.
constexpr size_type getCandidateCount () const noexcept
 Get an upper bound estimate on the number of rows in the range, which is equal to the exact number of rows.

Friends

template<typename Row, typename Allocator>
class EntityTable

Detailed Description

template<typename... Components>
class grem::execution::Columns< Components >

View of the rows in a specific set of columns in an EntityTable.

Template Parameters
Componentscomponent types of the columns to reference.

Member Typedef Documentation

◆ MutableComponents

template<typename... Components>
using grem::execution::Columns< Components >::MutableComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::MutableComponents...>

List of non-const components required by the range, provided as a meta::TypeList.

◆ ImmutableComponents

template<typename... Components>
using grem::execution::Columns< Components >::ImmutableComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::ImmutableComponents...>

List of const components required by the range, provided as a meta::TypeList.

◆ IncludedComponents

template<typename... Components>
using grem::execution::Columns< Components >::IncludedComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::IncludedComponents...>

List of components required by the range, provided as a meta::TypeList.

◆ ExcludedComponents

template<typename... Components>
using grem::execution::Columns< Components >::ExcludedComponents = meta::type_list_concat_t<typename detail::columns_extract_components<Components>::ExcludedComponents...>

List of components excluded by the range, provided as a meta::TypeList.

◆ iterator

template<typename... Components>
using grem::execution::Columns< Components >::iterator = detail::ColumnsIterator<IncludedComponents>

◆ sentinel

template<typename... Components>
using grem::execution::Columns< Components >::sentinel = detail::ColumnsSentinel

◆ value_type

template<typename... Components>
using grem::execution::Columns< Components >::value_type = typename iterator::value_type

◆ reference

template<typename... Components>
using grem::execution::Columns< Components >::reference = typename iterator::reference

◆ size_type

template<typename... Components>
using grem::execution::Columns< Components >::size_type = size_t

◆ difference_type

template<typename... Components>
using grem::execution::Columns< Components >::difference_type = ptrdiff_t

Constructor & Destructor Documentation

◆ Columns() [1/2]

template<typename... Components>
grem::execution::Columns< Components >::Columns ( )
constexprdefaultnoexcept

Construct an empty entity range.

◆ Columns() [2/2]

template<typename... Components>
grem::execution::Columns< Components >::Columns ( const iterator & first,
const iterator & last )
inlineconstexprnoexcept

Construct an entity subrange from an iterator pair.

Parameters
firstbegin iterator of the subrange.
lastpast-the-end iterator of the subrange.
Warning
The subrange [first, last) must form a valid range.

Member Function Documentation

◆ begin()

template<typename... Components>
iterator grem::execution::Columns< Components >::begin ( ) const
inlinenodiscardconstexprnoexcept

◆ end()

template<typename... Components>
sentinel grem::execution::Columns< Components >::end ( ) const
inlinenodiscardconstexprnoexcept

◆ size()

template<typename... Components>
size_type grem::execution::Columns< Components >::size ( ) const
inlinenodiscardconstexprnoexcept

Get the number of rows in the range.

Returns
the number of rows spanned by the range.

◆ empty()

template<typename... Components>
bool grem::execution::Columns< Components >::empty ( ) const
inlinenodiscardconstexprnoexcept

Check if the range is empty.

Returns
true if the range spans 0 rows, false otherwise.

◆ getCandidateCount()

template<typename... Components>
size_type grem::execution::Columns< Components >::getCandidateCount ( ) const
inlinenodiscardconstexprnoexcept

Get an upper bound estimate on the number of rows in the range, which is equal to the exact number of rows.

Returns
size().
Note
This function is provided for API compatibility with Entities in generic code.

◆ EntityTable

template<typename... Components>
template<typename Row, typename Allocator>
friend class EntityTable
friend

The documentation for this class was generated from the following file: