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

eagine::memory::owned_block Class Reference

Specialization of block indicating byte span ownership. More...

#include <eagine/memory/block.hpp>

Public Member Functions

constexpr owned_block () noexcept=default
 Default constructor. More...
 
 owned_block (owned_block &&temp) noexcept
 Move constructor.
 
auto operator= (owned_block &&temp) noexcept -> owned_block &
 Move assignment operator.
 
 owned_block (const owned_block &)=delete
 Not copy constructible.
 
auto operator= (const owned_block &)=delete
 Not copy assignable.
 
 ~owned_block () noexcept
 Destructor. More...
 
- Public Member Functions inherited from eagine::memory::basic_span< ValueType, Pointer, SizeType >
constexpr basic_span (pointer addr, size_type len) noexcept
 Construction from pointer and length.
 
constexpr basic_span (address_type addr, size_type len) noexcept
 Construction from memory address and length.
 
constexpr basic_span (pointer b, pointer e) noexcept
 Construction from a pair of pointers.
 
constexpr basic_span (address_type ba, address_type be) noexcept
 Construction from a pair of memory addresses.
 
constexpr basic_span () noexcept=default
 Default constructor. Constructs an empty span. More...
 
constexpr basic_span (const basic_span &) noexcept=default
 Copy constructor.
 
constexpr basic_span (basic_span &&) noexcept=default
 Move constructor.
 
auto operator= (const basic_span &) noexcept -> basic_span &=default
 Copy assignment operator.
 
auto operator= (basic_span &&) noexcept -> basic_span &=default
 Move assignment operator.
 
template<typename T , typename P , typename S , typename = enable_if_convertible<T, P, S>, typename = enable_if_different<T, P, S>>
constexpr basic_span (basic_span< T, P, S > that) noexcept
 Converting copy constructor from span of compatible elements.
 
template<typename T , typename P , typename S , typename = enable_if_convertible<T, P, S>, typename = enable_if_different<T, P, S>>
auto operator= (basic_span< T, P, S > that) noexcept -> auto &
 Converting copy assignment from span of compatible elements.
 
auto reset () noexcept -> auto &
 Resets this span. More...
 
auto reset (pointer addr, size_type length) noexcept -> auto &
 Resets this span with a new pointer and length.
 
auto reset (address_type addr, size_type length) noexcept -> auto &
 Resets this span with a new memory address and length.
 
auto reset (pointer b, pointer e) noexcept -> auto &
 Resets this span with a pair or pointers.
 
constexpr operator bool () const noexcept
 Indicates that the span is not empty. More...
 
constexpr auto is_empty () const noexcept -> bool
 Indicates that the span is empty. More...
 
constexpr auto empty () const noexcept -> bool
 Indicates that the span is empty. More...
 
constexpr auto is_zero_terminated () const noexcept -> bool
 Indicates that the span is terminated with value T(0) if applicable.
 
constexpr auto size () const noexcept -> size_type
 Returns the number of elements in the span. More...
 
constexpr auto data () const noexcept -> pointer
 Returns a pointer to the start of the span. More...
 
constexpr auto begin () const noexcept -> iterator
 Returns an interator to the start of the span.
 
constexpr auto end () const noexcept -> iterator
 Returns a iterator past the end of the span.
 
constexpr auto rbegin () const noexcept
 Returns a reverse interator to the end of the span.
 
constexpr auto rend () const noexcept
 Returns a reverse interator past the begin of the span.
 
constexpr auto addr () const noexcept -> address_type
 Returns the memory address of the start of the span.
 
constexpr auto begin_addr () const noexcept -> address_type
 Returns the memory address of the start of the span.
 
constexpr auto end_addr () const noexcept -> address_type
 Returns the memory address past the end of the span.
 
template<typename X >
auto is_aligned_as () const noexcept -> bool
 Checks if the start of the span is aligned as the alignment of X.
 
auto encloses (const_address a) const noexcept -> bool
 Indicates if this span encloses the specified address. More...
 
template<typename Ts , typename Ps , typename Ss >
auto contains (basic_span< Ts, Ps, Ss > that) const noexcept -> bool
 Indicates if this span encloses another span. More...
 
template<typename Ts , typename Ps , typename Ss >
auto overlaps (const basic_span< Ts, Ps, Ss > &that) const noexcept -> bool
 Indicates if this span overlaps with another span. More...
 
constexpr auto ref (size_type index) const noexcept -> std::add_const_t< value_type > &
 Returns a const reference to value at the specified index. More...
 
auto ref (size_type index) noexcept -> value_type &
 Returns a reference to value at the specified index. More...
 
auto front () const noexcept -> const value_type &
 Returns a const reference to value at the front of the span. More...
 
auto front () noexcept -> value_type &
 Returns a reference to value at the front of the span. More...
 
auto back () const noexcept -> const value_type &
 Returns a const reference to value at the back of the span. More...
 
auto back () noexcept -> value_type &
 Returns a const reference to value at the back of the span. More...
 
template<typename Int >
constexpr auto element (Int index) const noexcept -> std::enable_if_t< std::is_integral_v< Int >, std::add_const_t< value_type > & >
 Returns a const reference to value at the specified index. More...
 
template<typename Int >
auto element (Int index) noexcept -> std::enable_if_t< std::is_integral_v< Int >, value_type & >
 Returns a reference to value at the specified index. More...
 
template<typename Int >
auto operator[] (Int index) noexcept -> std::enable_if_t< std::is_integral_v< Int >, value_type & >
 Array subscript operator. More...
 
template<typename Int >
constexpr auto operator[] (Int index) const noexcept -> std::enable_if_t< std::is_integral_v< Int >, std::add_const_t< value_type > & >
 Array subscript operator. More...
 

Additional Inherited Members

- Public Types inherited from eagine::memory::basic_span< ValueType, Pointer, SizeType >
using value_type = ValueType
 The element value type.
 
using size_type = SizeType
 The element count type.
 
using address_type = basic_address< std::is_const_v< ValueType > >
 The memory address type.
 
using pointer = Pointer
 The pointer type.
 
using iterator = Pointer
 The iterator type.
 
using const_iterator = Pointer
 The const iterator type.
 
using reverse_iterator = std::reverse_iterator< iterator >
 The reverse iterator type.
 

Detailed Description

Specialization of block indicating byte span ownership.

See also
block
block_owner

Constructor & Destructor Documentation

◆ owned_block()

constexpr eagine::memory::owned_block::owned_block ( )
constexprdefaultnoexcept

Default constructor.

Postcondition
is_empty()

◆ ~owned_block()

eagine::memory::owned_block::~owned_block ( )
inlinenoexcept

Destructor.

Precondition
is_empty()

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).