OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::memory::basic_split_span< ValueType, Pointer, SizeType > Class Template Reference

Template for classes representing a memory span split in two parts. More...

#include <eagine/memory/split_span.hpp>

Public Member Functions

constexpr basic_split_span () noexcept=default
 Default constructor.
 
constexpr basic_split_span (basic_span< ValueType, Pointer, SizeType > spn) noexcept
 Initializing constructor.
 
constexpr auto split_position () const noexcept -> span_size_t
 Returns the position of split as count of bytes since beginning. More...
 
constexpr auto head () const noexcept
 Returns the part of the block before the split (split not included). More...
 
constexpr auto tail () const noexcept
 Returns the part of the block starting at the split until the end. More...
 
auto advance (span_size_t amount) noexcept -> auto &
 Moves the split by the specified amout (number of bytes). More...
 
auto skip_to_end () noexcept -> auto &
 Moves the split to the end of the block. More...
 

Detailed Description

template<typename ValueType, typename Pointer = ValueType*, typename SizeType = span_size_t>
class eagine::memory::basic_split_span< ValueType, Pointer, SizeType >

Template for classes representing a memory span split in two parts.

Template Parameters
ValueTypethe type of elements assumed in the covered memory range.
Pointerthe pointer type used to point to the start of the span.
SizeTypethe integer type used to count the elements in the span.
See also
basic_split_block

Member Function Documentation

◆ advance()

template<typename ValueType , typename Pointer = ValueType*, typename SizeType = span_size_t>
auto eagine::memory::basic_split_span< ValueType, Pointer, SizeType >::advance ( span_size_t  amount) -> auto&
inlinenoexcept

Moves the split by the specified amout (number of bytes).

See also
split_position
skip_to_end

◆ head()

template<typename ValueType , typename Pointer = ValueType*, typename SizeType = span_size_t>
constexpr auto eagine::memory::basic_split_span< ValueType, Pointer, SizeType >::head ( ) const
inlineconstexprnoexcept

Returns the part of the block before the split (split not included).

See also
tail
split_position

◆ skip_to_end()

template<typename ValueType , typename Pointer = ValueType*, typename SizeType = span_size_t>
auto eagine::memory::basic_split_span< ValueType, Pointer, SizeType >::skip_to_end ( ) -> auto&
inlinenoexcept

Moves the split to the end of the block.

See also
advance
split_position

◆ split_position()

template<typename ValueType , typename Pointer = ValueType*, typename SizeType = span_size_t>
constexpr auto eagine::memory::basic_split_span< ValueType, Pointer, SizeType >::split_position ( ) const -> span_size_t
inlineconstexprnoexcept

Returns the position of split as count of bytes since beginning.

See also
head
tail
advance

◆ tail()

template<typename ValueType , typename Pointer = ValueType*, typename SizeType = span_size_t>
constexpr auto eagine::memory::basic_split_span< ValueType, Pointer, SizeType >::tail ( ) const
inlineconstexprnoexcept

Returns the part of the block starting at the split until the end.

See also
head
split_position

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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).