|
candlewick 0.10.0-4-g76c0
A tiny cross-platform renderer based on SDL3
|
A strided view to data, allowing for type-erased data. More...
#include <candlewick/utils/StridedView.h>
Classes | |
| class | iterator |
Public Types | |
| using | element_type = T |
| using | value_type = std::remove_cv_t<T> |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | pointer = T * |
| using | const_pointer = const T * |
| using | reference = element_type & |
| using | const_reference = const element_type & |
Public Member Functions | |
| constexpr | strided_view () noexcept |
| template<std::random_access_iterator It> | |
| strided_view (It first, size_type count, size_type stride_bytes) noexcept | |
| Build a view from an iterator given the size and stride. | |
| template<std::random_access_iterator It> | |
| strided_view (It first, size_type count) noexcept | |
Build a view from an iterator and given element count. The stride is assumed to be sizeof(T), i.e. the data is contiguous. | |
| template<size_t extent> | |
| strided_view (std::span< element_type, extent > other, size_type stride_bytes) noexcept | |
| template<size_t extent> | |
| strided_view (std::span< element_type, extent > other) noexcept | |
| template<size_t array_extent> | |
| strided_view (std::type_identity_t< element_type >(&arr)[array_extent], size_t stride_bytes=sizeof(element_type)) noexcept | |
| ~strided_view () noexcept=default | |
| strided_view & | operator= (const strided_view &) noexcept=default |
| iterator | begin () const |
| iterator | end () const |
| iterator | cbegin () const |
| iterator | cend () const |
| size_type | size () const noexcept |
| Size (number of elements) of the view. | |
| size_type | stride_bytes () const noexcept |
| Stride in bytes between two elements of the view. | |
| size_t | max_index () const |
| bool | empty () const noexcept |
| reference | front () const noexcept |
| reference | back () const noexcept |
| reference | operator[] (size_type idx) const noexcept |
| reference | at (size_type idx) const |
| pointer | data () const noexcept |
A strided view to data, allowing for type-erased data.
The stride is specified in terms of bytes instead of T.
| T | Stored data type. |
| using candlewick::strided_view< T >::const_pointer = const T * |
| using candlewick::strided_view< T >::const_reference = const element_type & |
| using candlewick::strided_view< T >::difference_type = std::ptrdiff_t |
| using candlewick::strided_view< T >::element_type = T |
| using candlewick::strided_view< T >::pointer = T * |
| using candlewick::strided_view< T >::reference = element_type & |
| using candlewick::strided_view< T >::size_type = std::size_t |
| using candlewick::strided_view< T >::value_type = std::remove_cv_t<T> |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Build a view from an iterator given the size and stride.
|
inlinenoexcept |
Build a view from an iterator and given element count. The stride is assumed to be sizeof(T), i.e. the data is contiguous.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
defaultnoexcept |
|
inlinenodiscard |
|
inlinenodiscardnoexcept |
|
inline |
|
inline |
|
inline |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
|
inline |
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
|
defaultnoexcept |
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
Size (number of elements) of the view.
|
inlinenodiscardnoexcept |
Stride in bytes between two elements of the view.