LLFIO v2.00
Loading...
Searching...
No Matches
llfio_v2_xxx::byte_io_multiplexer::const_buffer_type Struct Reference

#include "byte_io_multiplexer.hpp"

Public Types

using pointer = const byte *
 Type of the pointer to memory.
 
using const_pointer = const byte *
 Type of the pointer to memory.
 
using iterator = const byte *
 Type of the iterator to memory.
 
using const_iterator = const byte *
 Type of the iterator to memory.
 
using size_type = size_t
 Type of the length of memory.
 

Public Member Functions

 const_buffer_type ()=default
 Default constructor.
 
constexpr const_buffer_type (pointer data, size_type len) noexcept
 Constructor.
 
constexpr const_buffer_type (buffer_type b) noexcept
 Converting constructor from non-const buffer type.
 
template<class T , typename std::enable_if<(!std::is_same< typename std::decay< T >::type, buffer_type >::value &&std::is_constructible< span< const byte >, T >::value), bool >::type = true>
constexpr const_buffer_type (T &&s, _implict_span_constructor_tag={}) noexcept
 Constructor taking any type acceptable to span.
 
 const_buffer_type (const const_buffer_type &)=default
 
 const_buffer_type (const_buffer_type &&)=default
 
const_buffer_typeoperator= (const const_buffer_type &)=default
 
const_buffer_typeoperator= (const_buffer_type &&)=default
 
constexpr bool empty () const noexcept
 Returns if this buffer is empty.
 
constexpr pointer data () noexcept
 Returns the address of the bytes for this buffer.
 
constexpr const_pointer data () const noexcept
 Returns the address of the bytes for this buffer.
 
constexpr size_type size () const noexcept
 Returns the number of bytes in this buffer.
 
constexpr iterator begin () noexcept
 Returns an iterator to the beginning of the buffer.
 
constexpr const_iterator begin () const noexcept
 Returns an iterator to the beginning of the buffer.
 
constexpr const_iterator cbegin () const noexcept
 Returns an iterator to the beginning of the buffer.
 
constexpr iterator end () noexcept
 Returns an iterator to after the end of the buffer.
 
constexpr const_iterator end () const noexcept
 Returns an iterator to after the end of the buffer.
 
constexpr const_iterator cend () const noexcept
 Returns an iterator to after the end of the buffer.
 

Detailed Description

The gather buffer type used by this handle. Guaranteed to be TrivialType and StandardLayoutType. Try to make address and length 64 byte, or ideally, page_size() aligned where possible.

Constructor & Destructor Documentation

◆ const_buffer_type() [1/3]

constexpr llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::const_buffer_type ( pointer  data,
size_type  len 
)
inlineconstexprnoexcept

Constructor.

309 : _data(data)
310 , _len(len)
311 {
312 }
constexpr pointer data() noexcept
Returns the address of the bytes for this buffer.
Definition byte_io_multiplexer.hpp:338

◆ const_buffer_type() [2/3]

constexpr llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::const_buffer_type ( buffer_type  b)
inlineconstexprnoexcept

Converting constructor from non-const buffer type.

315 : _data(b.data())
316 , _len(b.size())
317 {
318 }

◆ const_buffer_type() [3/3]

template<class T , typename std::enable_if<(!std::is_same< typename std::decay< T >::type, buffer_type >::value &&std::is_constructible< span< const byte >, T >::value), bool >::type = true>
constexpr llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::const_buffer_type ( T &&  s,
_implict_span_constructor_tag  = {} 
)
inlineconstexprnoexcept

Constructor taking any type acceptable to span.

322 {}) noexcept
323 : _data(span<const byte>(s).data())
324 , _len(span<const byte>(s).size())
325 {
326 }
constexpr size_type size() const noexcept
Returns the number of bytes in this buffer.
Definition byte_io_multiplexer.hpp:342

Member Function Documentation

◆ begin() [1/2]

constexpr const_iterator llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::begin ( ) const
inlineconstexprnoexcept

Returns an iterator to the beginning of the buffer.

347{ return _data; }

◆ begin() [2/2]

constexpr iterator llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::begin ( )
inlineconstexprnoexcept

Returns an iterator to the beginning of the buffer.

345{ return _data; }

◆ cbegin()

constexpr const_iterator llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::cbegin ( ) const
inlineconstexprnoexcept

Returns an iterator to the beginning of the buffer.

349{ return _data; }

◆ cend()

constexpr const_iterator llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::cend ( ) const
inlineconstexprnoexcept

Returns an iterator to after the end of the buffer.

355{ return _data + _len; }

◆ data() [1/2]

constexpr const_pointer llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::data ( ) const
inlineconstexprnoexcept

Returns the address of the bytes for this buffer.

340{ return _data; }

◆ data() [2/2]

constexpr pointer llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::data ( )
inlineconstexprnoexcept

Returns the address of the bytes for this buffer.

338{ return _data; }

◆ empty()

constexpr bool llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::empty ( ) const
inlineconstexprnoexcept

Returns if this buffer is empty.

336{ return _len == 0; }

◆ end() [1/2]

constexpr const_iterator llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::end ( ) const
inlineconstexprnoexcept

Returns an iterator to after the end of the buffer.

353{ return _data + _len; }

◆ end() [2/2]

constexpr iterator llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::end ( )
inlineconstexprnoexcept

Returns an iterator to after the end of the buffer.

351{ return _data + _len; }

◆ size()

constexpr size_type llfio_v2_xxx::byte_io_multiplexer::const_buffer_type::size ( ) const
inlineconstexprnoexcept

Returns the number of bytes in this buffer.

342{ return _len; }

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