sparrow 0.9.0
Loading...
Searching...
No Matches
sparrow::buffer_view< T > Class Template Reference

#include <buffer_view.hpp>

Public Types

using self_type = buffer_view<T>
 
using value_type = T
 
using reference = T&
 
using const_reference = const T&
 
using pointer = T*
 
using const_pointer = const T*
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using is_buffer_view = std::true_type
 
using iterator = pointer_iterator<pointer>
 
using const_iterator = pointer_iterator<const_pointer>
 
using reverse_iterator = std::reverse_iterator<iterator>
 
using const_reverse_iterator = std::reverse_iterator<const_iterator>
 

Public Member Functions

 buffer_view ()=default
 
 buffer_view (buffer< T > &buffer)
 
template<class U>
requires std::same_as<std::remove_const_t<T>, U>
 buffer_view (const buffer< U > &buffer)
 
 buffer_view (pointer p, size_type n)
 
template<class It, class End>
requires std::contiguous_iterator<It> && std::sentinel_for<End, It> && std::same_as<std::remove_const_t<std::iter_value_t<It>>, std::remove_const_t<T>>
 buffer_view (It first, End last)
 
bool empty () const noexcept
 
size_type size () const noexcept
 
size_type max_size () const noexcept
 
reference operator[] (size_type)
 
const_reference operator[] (size_type) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
template<class U = T>
U * data () noexcept
 
template<class U = T>
const U * data () const noexcept
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void swap (buffer_view &rhs) noexcept
 
buffer_view subrange (size_type pos, size_type count) const
 
buffer_view subrange (size_type pos) const
 
buffer_view subrange (const_iterator first, const_iterator last) const
 
 operator buffer< std::remove_const_t< T > > () const
 

Detailed Description

template<class T>
class sparrow::buffer_view< T >

Definition at line 30 of file buffer_view.hpp.

Member Typedef Documentation

◆ const_iterator

template<class T>
using sparrow::buffer_view< T >::const_iterator = pointer_iterator<const_pointer>

Definition at line 46 of file buffer_view.hpp.

◆ const_pointer

template<class T>
using sparrow::buffer_view< T >::const_pointer = const T*

Definition at line 39 of file buffer_view.hpp.

◆ const_reference

template<class T>
using sparrow::buffer_view< T >::const_reference = const T&

Definition at line 37 of file buffer_view.hpp.

◆ const_reverse_iterator

template<class T>
using sparrow::buffer_view< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 48 of file buffer_view.hpp.

◆ difference_type

template<class T>
using sparrow::buffer_view< T >::difference_type = std::ptrdiff_t

Definition at line 41 of file buffer_view.hpp.

◆ is_buffer_view

template<class T>
using sparrow::buffer_view< T >::is_buffer_view = std::true_type

Definition at line 43 of file buffer_view.hpp.

◆ iterator

template<class T>
using sparrow::buffer_view< T >::iterator = pointer_iterator<pointer>

Definition at line 45 of file buffer_view.hpp.

◆ pointer

template<class T>
using sparrow::buffer_view< T >::pointer = T*

Definition at line 38 of file buffer_view.hpp.

◆ reference

template<class T>
using sparrow::buffer_view< T >::reference = T&

Definition at line 36 of file buffer_view.hpp.

◆ reverse_iterator

template<class T>
using sparrow::buffer_view< T >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 47 of file buffer_view.hpp.

◆ self_type

template<class T>
using sparrow::buffer_view< T >::self_type = buffer_view<T>

Definition at line 34 of file buffer_view.hpp.

◆ size_type

template<class T>
using sparrow::buffer_view< T >::size_type = std::size_t

Definition at line 40 of file buffer_view.hpp.

◆ value_type

template<class T>
using sparrow::buffer_view< T >::value_type = T

Definition at line 35 of file buffer_view.hpp.

Constructor & Destructor Documentation

◆ buffer_view() [1/5]

template<class T>
sparrow::buffer_view< T >::buffer_view ( )
default
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buffer_view() [2/5]

template<class T>
requires (!std::is_const_v<T>)
sparrow::buffer_view< T >::buffer_view ( buffer< T > & buffer)
explicit

Definition at line 120 of file buffer_view.hpp.

Here is the call graph for this function:

◆ buffer_view() [3/5]

template<class T>
requires std::same_as<std::remove_const_t<T>, U>
template<class U>
requires std::same_as<std::remove_const_t<T>, U>
sparrow::buffer_view< T >::buffer_view ( const buffer< U > & buffer)
explicit

Definition at line 130 of file buffer_view.hpp.

Here is the call graph for this function:

◆ buffer_view() [4/5]

template<class T>
sparrow::buffer_view< T >::buffer_view ( pointer p,
size_type n )

Definition at line 137 of file buffer_view.hpp.

◆ buffer_view() [5/5]

template<class T>
requires std::contiguous_iterator<It> && std::sentinel_for<End, It> && std::same_as<std::remove_const_t<std::iter_value_t<It>>, std::remove_const_t<T>>
template<class It, class End>
requires std::contiguous_iterator<It> && std::sentinel_for<End, It> && std::same_as<std::remove_const_t<std::iter_value_t<It>>, std::remove_const_t<T>>
sparrow::buffer_view< T >::buffer_view ( It first,
End last )

Definition at line 148 of file buffer_view.hpp.

Member Function Documentation

◆ back() [1/2]

template<class T>
auto sparrow::buffer_view< T >::back ( )

Definition at line 202 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ back() [2/2]

template<class T>
auto sparrow::buffer_view< T >::back ( ) const

Definition at line 209 of file buffer_view.hpp.

Here is the call graph for this function:

◆ begin() [1/2]

template<class T>
auto sparrow::buffer_view< T >::begin ( )

Definition at line 244 of file buffer_view.hpp.

Here is the caller graph for this function:

◆ begin() [2/2]

template<class T>
auto sparrow::buffer_view< T >::begin ( ) const

Definition at line 256 of file buffer_view.hpp.

Here is the call graph for this function:

◆ cbegin()

template<class T>
auto sparrow::buffer_view< T >::cbegin ( ) const

Definition at line 268 of file buffer_view.hpp.

Here is the caller graph for this function:

◆ cend()

template<class T>
auto sparrow::buffer_view< T >::cend ( ) const

Definition at line 274 of file buffer_view.hpp.

Here is the caller graph for this function:

◆ crbegin()

template<class T>
auto sparrow::buffer_view< T >::crbegin ( ) const

Definition at line 304 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ crend()

template<class T>
auto sparrow::buffer_view< T >::crend ( ) const

Definition at line 310 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data() [1/2]

template<class T>
template<class U>
const U * sparrow::buffer_view< T >::data ( ) const
noexcept

Definition at line 231 of file buffer_view.hpp.

◆ data() [2/2]

template<class T>
template<class U>
U * sparrow::buffer_view< T >::data ( )
noexcept

Definition at line 217 of file buffer_view.hpp.

Here is the caller graph for this function:

◆ empty()

template<class T>
bool sparrow::buffer_view< T >::empty ( ) const
nodiscardnoexcept

Definition at line 156 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end() [1/2]

template<class T>
auto sparrow::buffer_view< T >::end ( )

Definition at line 250 of file buffer_view.hpp.

Here is the caller graph for this function:

◆ end() [2/2]

template<class T>
auto sparrow::buffer_view< T >::end ( ) const

Definition at line 262 of file buffer_view.hpp.

Here is the call graph for this function:

◆ front() [1/2]

template<class T>
auto sparrow::buffer_view< T >::front ( )

Definition at line 188 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ front() [2/2]

template<class T>
auto sparrow::buffer_view< T >::front ( ) const

Definition at line 195 of file buffer_view.hpp.

Here is the call graph for this function:

◆ max_size()

template<class T>
auto sparrow::buffer_view< T >::max_size ( ) const
nodiscardnoexcept

Definition at line 168 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator buffer< std::remove_const_t< T > >()

template<class T>
sparrow::buffer_view< T >::operator buffer< std::remove_const_t< T > > ( ) const

Definition at line 345 of file buffer_view.hpp.

Here is the call graph for this function:

◆ operator[]() [1/2]

template<class T>
auto sparrow::buffer_view< T >::operator[] ( size_type pos)

Definition at line 174 of file buffer_view.hpp.

Here is the call graph for this function:

◆ operator[]() [2/2]

template<class T>
auto sparrow::buffer_view< T >::operator[] ( size_type pos) const

Definition at line 181 of file buffer_view.hpp.

Here is the call graph for this function:

◆ rbegin() [1/2]

template<class T>
auto sparrow::buffer_view< T >::rbegin ( )

Definition at line 280 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rbegin() [2/2]

template<class T>
auto sparrow::buffer_view< T >::rbegin ( ) const

Definition at line 292 of file buffer_view.hpp.

Here is the call graph for this function:

◆ rend() [1/2]

template<class T>
auto sparrow::buffer_view< T >::rend ( )

Definition at line 286 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rend() [2/2]

template<class T>
auto sparrow::buffer_view< T >::rend ( ) const

Definition at line 298 of file buffer_view.hpp.

Here is the call graph for this function:

◆ size()

template<class T>
auto sparrow::buffer_view< T >::size ( ) const
nodiscardnoexcept

Definition at line 162 of file buffer_view.hpp.

Here is the caller graph for this function:

◆ subrange() [1/3]

template<class T>
buffer_view< T > sparrow::buffer_view< T >::subrange ( const_iterator first,
const_iterator last ) const

Definition at line 338 of file buffer_view.hpp.

Here is the call graph for this function:

◆ subrange() [2/3]

template<class T>
buffer_view< T > sparrow::buffer_view< T >::subrange ( size_type pos) const

Definition at line 331 of file buffer_view.hpp.

Here is the call graph for this function:

◆ subrange() [3/3]

template<class T>
buffer_view< T > sparrow::buffer_view< T >::subrange ( size_type pos,
size_type count ) const

Definition at line 323 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ swap()

template<class T>
void sparrow::buffer_view< T >::swap ( buffer_view< T > & rhs)
noexcept

Definition at line 316 of file buffer_view.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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