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

#include "byte_io_multiplexer.hpp"

Public Types

using pointer = byte *
 Type of the pointer to memory.
 
using const_pointer = const byte *
 Type of the pointer to memory.
 
using iterator = 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

 buffer_type ()=default
 Default constructor.
 
constexpr buffer_type (pointer data, size_type len) noexcept
 Constructor.
 
template<class T , typename std::enable_if<(!std::is_same< typename std::decay< T >::type, buffer_type >::value &&std::is_constructible< span< byte >, T >::value), bool >::type = true>
constexpr buffer_type (T &&s, _implict_span_constructor_tag={}) noexcept
 Constructor taking any type acceptable to span.
 
 buffer_type (const buffer_type &)=default
 
 buffer_type (buffer_type &&)=default
 
buffer_typeoperator= (const buffer_type &)=default
 
buffer_typeoperator= (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.
 

Friends

constexpr void _check_iovec_match ()
 

Detailed Description

The scatter 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

◆ buffer_type() [1/2]

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

Constructor.

236 : _data(data)
237 , _len(len)
238 {
239 }
constexpr pointer data() noexcept
Returns the address of the bytes for this buffer.
Definition byte_io_multiplexer.hpp:259

◆ buffer_type() [2/2]

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

Constructor taking any type acceptable to span.

243 {}) noexcept
244 : _data(span<byte>(s).data())
245 , _len(span<byte>(s).size())
246 {
247 }
constexpr size_type size() const noexcept
Returns the number of bytes in this buffer.
Definition byte_io_multiplexer.hpp:263

Member Function Documentation

◆ begin() [1/2]

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

Returns an iterator to the beginning of the buffer.

268{ return _data; }

◆ begin() [2/2]

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

Returns an iterator to the beginning of the buffer.

266{ return _data; }

◆ cbegin()

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

Returns an iterator to the beginning of the buffer.

270{ return _data; }

◆ cend()

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

Returns an iterator to after the end of the buffer.

276{ return _data + _len; }

◆ data() [1/2]

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

Returns the address of the bytes for this buffer.

261{ return _data; }

◆ data() [2/2]

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

Returns the address of the bytes for this buffer.

259{ return _data; }

◆ empty()

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

Returns if this buffer is empty.

257{ return _len == 0; }

◆ end() [1/2]

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

Returns an iterator to after the end of the buffer.

274{ return _data + _len; }

◆ end() [2/2]

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

Returns an iterator to after the end of the buffer.

272{ return _data + _len; }

◆ size()

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

Returns the number of bytes in this buffer.

263{ return _len; }

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