sparrow 0.3.0
|
Class which have internally a reference to a contiguous container of a certain type and provides an API to access it as if it was a buffer<T>. More...
#include <buffer_adaptor.hpp>
Public Types | |
using | value_type = To |
using | reference = value_type& |
using | const_reference = const value_type& |
using | pointer = value_type* |
using | const_pointer = const value_type* |
using | buffer_reference_value_type = std::remove_cvref_t<FromBufferRef>::value_type |
using | buffer_reference = std::conditional_t<is_const, const FromBufferRef, FromBufferRef> |
using | size_type = std::remove_cvref_t<buffer_reference>::size_type |
using | difference_type = std::remove_cvref_t<buffer_reference>::difference_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_adaptor (FromBufferRef buf) | |
buffer_adaptor (const FromBufferRef buf) | |
constexpr pointer | data () noexcept |
constexpr const_pointer | data () const noexcept |
constexpr reference | operator[] (size_type idx) |
constexpr const_reference | operator[] (size_type idx) const |
constexpr reference | front () |
constexpr const_reference | front () const |
constexpr reference | back () |
constexpr const_reference | back () const |
constexpr iterator | begin () noexcept |
constexpr iterator | end () noexcept |
constexpr const_iterator | begin () const noexcept |
constexpr const_iterator | end () const noexcept |
constexpr const_iterator | cbegin () const noexcept |
constexpr const_iterator | cend () const noexcept |
constexpr reverse_iterator | rbegin () noexcept |
constexpr reverse_iterator | rend () noexcept |
constexpr const_reverse_iterator | rbegin () const noexcept |
constexpr const_reverse_iterator | rend () const noexcept |
constexpr const_reverse_iterator | crbegin () const noexcept |
constexpr const_reverse_iterator | crend () const noexcept |
constexpr size_type | size () const noexcept |
constexpr size_type | max_size () const noexcept |
constexpr size_type | capacity () const noexcept |
constexpr bool | empty () const noexcept |
constexpr void | reserve (size_type new_cap) |
constexpr void | shrink_to_fit () |
constexpr void | clear () noexcept |
constexpr iterator | insert (const_iterator pos, const value_type &value) |
constexpr iterator | insert (const_iterator pos, size_type count, const value_type &value) |
template<class InputIt> requires std::input_iterator<InputIt> (not is_const) | |
constexpr iterator | insert (const_iterator pos, InputIt first, InputIt last) |
constexpr iterator | insert (const_iterator pos, std::initializer_list< value_type > ilist) |
template<class... Args> requires (not is_const) | |
constexpr iterator | emplace (const_iterator pos, Args &&... args) |
constexpr iterator | erase (const_iterator pos) |
constexpr iterator | erase (const_iterator first, const_iterator last) |
constexpr void | push_back (const value_type &value) |
constexpr void | pop_back () |
constexpr void | resize (size_type new_size) |
constexpr void | resize (size_type new_size, const value_type &value) |
Static Public Attributes | |
static constexpr bool | is_const = std::is_const_v<To> |
Class which have internally a reference to a contiguous container of a certain type and provides an API to access it as if it was a buffer<T>.
To | The type to which the buffer will be adapted. The size of the type To must be equal of bigger than the element type of the container. |
FromBufferRef | The type of the container to adapt. If it's a const reference, all non-const methods are disabled. |
Definition at line 44 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::buffer_reference = std::conditional_t<is_const, const FromBufferRef, FromBufferRef> |
Definition at line 56 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::buffer_reference_value_type = std::remove_cvref_t<FromBufferRef>::value_type |
Definition at line 55 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::const_iterator = pointer_iterator<const_pointer> |
Definition at line 61 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::const_pointer = const value_type* |
Definition at line 52 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::const_reference = const value_type& |
Definition at line 50 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 63 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::difference_type = std::remove_cvref_t<buffer_reference>::difference_type |
Definition at line 59 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::iterator = pointer_iterator<pointer> |
Definition at line 60 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::pointer = value_type* |
Definition at line 51 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::reference = value_type& |
Definition at line 49 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::reverse_iterator = std::reverse_iterator<iterator> |
Definition at line 62 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::size_type = std::remove_cvref_t<buffer_reference>::size_type |
Definition at line 58 of file buffer_adaptor.hpp.
using sparrow::buffer_adaptor< To, FromBufferRef >::value_type = To |
Definition at line 48 of file buffer_adaptor.hpp.
|
explicit |
|
explicit |
|
nodiscardconstexpr |
|
nodiscardconstexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 292 of file buffer_adaptor.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 415 of file buffer_adaptor.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 326 of file buffer_adaptor.hpp.
|
nodiscardconstexprnoexcept |
Definition at line 334 of file buffer_adaptor.hpp.
|
constexprnoexcept |
Definition at line 447 of file buffer_adaptor.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 220 of file buffer_adaptor.hpp.
|
constexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 301 of file buffer_adaptor.hpp.
|
constexpr |
|
constexpr |
Definition at line 532 of file buffer_adaptor.hpp.
|
nodiscardconstexpr |
|
nodiscardconstexpr |
|
constexpr |
Definition at line 456 of file buffer_adaptor.hpp.
|
constexpr |
|
constexpr |
|
constexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexpr |
Definition at line 237 of file buffer_adaptor.hpp.
|
nodiscardconstexpr |
|
constexpr |
|
constexpr |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 342 of file buffer_adaptor.hpp.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Definition at line 351 of file buffer_adaptor.hpp.
|
constexpr |
Definition at line 429 of file buffer_adaptor.hpp.
|
constexpr |
Definition at line 595 of file buffer_adaptor.hpp.
|
constexpr |
|
constexpr |
Definition at line 437 of file buffer_adaptor.hpp.
|
nodiscardconstexprnoexcept |
|
staticconstexpr |
Definition at line 53 of file buffer_adaptor.hpp.