sparrow 0.3.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 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 44 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 46 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.

◆ iterator

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

Definition at line 43 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 45 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 118 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 128 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 135 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 145 of file buffer_view.hpp.

Member Function Documentation

◆ back() [1/2]

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

Definition at line 199 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 206 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 241 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 253 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 265 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 271 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 301 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 307 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 228 of file buffer_view.hpp.

◆ data() [2/2]

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

Definition at line 214 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 153 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 247 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 259 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 185 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 192 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 165 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
explicit

Definition at line 342 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 171 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 178 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 277 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 289 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 283 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 295 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 159 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 335 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 328 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 320 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 313 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: