IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::Span< Type > Struct Template Reference

A view into an array of objects laid out in contiguous memory. More...

#include <ice/span.hxx>

Inheritance diagram for ice::Span< Type >:
ice::container::ContiguousContainer ice::container::BasicContainer

Public Types

using ValueType = Type
using ConstContainerValueType = Type
using Iterator = Type*
using ReverseIterator = std::reverse_iterator<Type*>
using ConstIterator = Type const*
using ConstReverseIterator = std::reverse_iterator<Type const*>
using SizeType = ice::ncount
using ContainerTag = ice::concepts::ContiguousContainerTag

Public Member Functions

constexpr Span () noexcept
constexpr Span (ice::Span< Type > &&other) noexcept=default
constexpr Span (ice::Span< Type > const &other) noexcept=default
constexpr Span (Type *location, ice::ncount count) noexcept
constexpr Span (Type *from, Type *to) noexcept
template<ice::u64 Size>
constexpr Span (Type(&location)[Size]) noexcept
constexpr auto operator= (ice::Span< Type > &&other) noexcept -> ice::Span< Type > &=default
constexpr auto operator= (ice::Span< Type > const &other) noexcept -> ice::Span< Type > &=default
template<typename Self>
constexpr auto data (this Self &self) noexcept -> ice::container::ValuePtr< Self >
constexpr auto size (this Span const &self) noexcept -> ice::ncount
constexpr auto data_view (this Span const &self) noexcept -> ice::Data
constexpr auto memory_view (this Span const &self) noexcept -> ice::Memory requires(not std::is_const_v< ValueType >)
constexpr operator ice::Span< Type const > () noexcept
constexpr operator ice::Span< Type const > () const noexcept
Public Member Functions inherited from ice::container::ContiguousContainer
template<ice::concepts::ContiguousContainer Self>
constexpr auto first (this Self &&self) noexcept -> ice::container::ValueRef< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto last (this Self &&self) noexcept -> ice::container::ValueRef< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto subspan (this Self &&self, ice::nindex from, ice::ncount count=ice::ncount_none) noexcept -> ice::container::SpanType< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto subspan (this Self &&self, ice::ref32 refval) noexcept -> ice::container::SpanType< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto headspan (this Self &&self, ice::ncount count=1) noexcept -> ice::container::SpanType< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto tailspan (this Self &&self, ice::nindex offset=1) noexcept -> ice::container::SpanType< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto begin (this Self &&self) noexcept -> ice::container::Iterator< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto end (this Self &&self) noexcept -> ice::container::Iterator< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto rbegin (this Self &&self) noexcept -> ice::container::ReverseIterator< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto rend (this Self &&self) noexcept -> ice::container::ReverseIterator< Self >
template<ice::concepts::ContiguousContainer Self>
constexpr auto index_of (this Self const &self, ice::container::ValueRef< Self > value) noexcept -> ice::nindex
template<ice::concepts::ContiguousContainer Self, typename Predicate, typename... Args>
constexpr auto index_of (this Self const &self, Predicate const &predicate, Args const &... args) noexcept -> ice::nindex
template<ice::concepts::ContiguousContainer Self>
constexpr auto operator[] (this Self &&self, ice::nindex index) noexcept -> ice::container::ValueRef< Self >
template<ice::concepts::ContiguousContainer Self>
auto meminfo (this Self const &self) noexcept -> ice::meminfo
template<ice::concepts::ContiguousResizableContainer Self>
requires (ice::concepts::TrivialContainerLogic<Self>)
auto memset (this Self const &self, ice::u8 value) noexcept -> ice::Memory
Public Member Functions inherited from ice::container::BasicContainer
template<ice::concepts::Container Self>
constexpr bool is_empty (this Self const &self) noexcept
template<ice::concepts::Container Self>
constexpr bool not_empty (this Self const &self) noexcept

Public Attributes

SizeType::base_type _count
ValueType_data

Detailed Description

template<typename Type>
struct ice::Span< Type >

A view into an array of objects laid out in contiguous memory.

Member Typedef Documentation

◆ ConstContainerValueType

template<typename Type>
using ice::Span< Type >::ConstContainerValueType = Type

◆ ConstIterator

template<typename Type>
using ice::Span< Type >::ConstIterator = Type const*

◆ ConstReverseIterator

template<typename Type>
using ice::Span< Type >::ConstReverseIterator = std::reverse_iterator<Type const*>

◆ ContainerTag

template<typename Type>
using ice::Span< Type >::ContainerTag = ice::concepts::ContiguousContainerTag

◆ Iterator

template<typename Type>
using ice::Span< Type >::Iterator = Type*

◆ ReverseIterator

template<typename Type>
using ice::Span< Type >::ReverseIterator = std::reverse_iterator<Type*>

◆ SizeType

template<typename Type>
using ice::Span< Type >::SizeType = ice::ncount

◆ ValueType

template<typename Type>
using ice::Span< Type >::ValueType = Type

Constructor & Destructor Documentation

◆ Span() [1/6]

template<typename Type>
ice::Span< Type >::Span ( )
constexprnoexcept

◆ Span() [2/6]

template<typename Type>
ice::Span< Type >::Span ( ice::Span< Type > && other)
constexprdefaultnoexcept

◆ Span() [3/6]

template<typename Type>
ice::Span< Type >::Span ( ice::Span< Type > const & other)
constexprdefaultnoexcept

◆ Span() [4/6]

template<typename Type>
ice::Span< Type >::Span ( Type * location,
ice::ncount count )
constexprnoexcept

◆ Span() [5/6]

template<typename Type>
ice::Span< Type >::Span ( Type * from,
Type * to )
constexprnoexcept

◆ Span() [6/6]

template<typename Type>
template<ice::u64 Size>
ice::Span< Type >::Span ( Type(&) location[Size])
constexprnoexcept

Member Function Documentation

◆ data()

template<typename Type>
template<typename Self>
auto ice::Span< Type >::data ( this Self & self) -> ice::container::ValuePtr< Self >
inlineconstexprnoexcept

◆ data_view()

template<typename Type>
auto ice::Span< Type >::data_view ( this Span< Type > const & self) -> ice::Data
inlineconstexprnoexcept

◆ memory_view()

template<typename Type>
auto ice::Span< Type >::memory_view ( this Span< Type > const & self) -> ice::Memory requires(not std::is_const_v< ValueType >)
inlineconstexprnoexcept

◆ operator ice::Span< Type const >() [1/2]

template<typename Type>
ice::Span< Type >::operator ice::Span< Type const > ( ) const
inlineconstexprnoexcept

◆ operator ice::Span< Type const >() [2/2]

template<typename Type>
ice::Span< Type >::operator ice::Span< Type const > ( )
inlineconstexprnoexcept

◆ operator=() [1/2]

template<typename Type>
auto ice::Span< Type >::operator= ( ice::Span< Type > && other) -> ice::Span< Type > &=default
constexprdefaultnoexcept

◆ operator=() [2/2]

template<typename Type>
auto ice::Span< Type >::operator= ( ice::Span< Type > const & other) -> ice::Span< Type > &=default
constexprdefaultnoexcept

◆ size()

template<typename Type>
auto ice::Span< Type >::size ( this Span< Type > const & self) -> ice::ncount
inlineconstexprnoexcept

Member Data Documentation

◆ _count

template<typename Type>
SizeType::base_type ice::Span< Type >::_count

◆ _data

template<typename Type>
ValueType* ice::Span< Type >::_data

The documentation for this struct was generated from the following files: