co_ecs 0.9.0
Cobalt ECS
Loading...
Searching...
No Matches
co_ecs::chunk_view< Args > Class Template Reference

A type aware view into a chunk components. More...

#include <chunk.hpp>

Classes

class  iterator
 Chunk view iterator. More...
 

Public Types

using chunk_type = std::conditional_t<is_const, const chunk&, chunk&>
 

Public Member Functions

 chunk_view (chunk_type c)
 Construct a new chunk view object.
 
constexpr auto begin () noexcept -> iterator
 Return iterator to the beginning of a chunk.
 
constexpr auto end () noexcept -> iterator
 Return iterator to the end of a chunk.
 

Static Public Attributes

static constexpr bool is_const = const_component_references_v<Args...>
 Const when all component references are const.
 

Detailed Description

template<component_reference... Args>
class co_ecs::chunk_view< Args >

A type aware view into a chunk components.

Template Parameters
ArgsComponents

Member Typedef Documentation

◆ chunk_type

template<component_reference... Args>
using co_ecs::chunk_view< Args >::chunk_type = std::conditional_t<is_const, const chunk&, chunk&>

Constructor & Destructor Documentation

◆ chunk_view()

template<component_reference... Args>
co_ecs::chunk_view< Args >::chunk_view ( chunk_type c)
inlineexplicit

Construct a new chunk view object.

Parameters
cChunk reference

Member Function Documentation

◆ begin()

template<component_reference... Args>
constexpr auto co_ecs::chunk_view< Args >::begin ( ) -> iterator
inlineconstexprnoexcept

Return iterator to the beginning of a chunk.

Returns
constexpr iterator

◆ end()

template<component_reference... Args>
constexpr auto co_ecs::chunk_view< Args >::end ( ) -> iterator
inlineconstexprnoexcept

Return iterator to the end of a chunk.

Returns
constexpr iterator

Member Data Documentation

◆ is_const

template<component_reference... Args>
constexpr bool co_ecs::chunk_view< Args >::is_const = const_component_references_v<Args...>
staticconstexpr

Const when all component references are const.


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