Creating a constant view from an existing buffer. More...
#include <BufferView.h>
Public Types | |
Member types | |
using | value_type = unsigned char |
using | size_type = uint32_t |
using | const_iterator = const value_type * |
Public Member Functions | |
Data access | |
const value_type & | operator[] (size_t i) const |
Access the byte at position i. More... | |
const value_type * | data () const noexcept |
Direct access to the allocated memory or nullptr if no memory is allocated. More... | |
boost::asio::const_buffer | cbuffer () const noexcept |
Make a boost::asio::buffer from this buffer. More... | |
boost::asio::const_buffer | buffer () const noexcept |
Make a boost::asio::buffer from this buffer. More... | |
Construction and destruction | |
BufferView ()=delete | |
BufferView (const BufferView &)=delete | |
static std::shared_ptr< BufferView > | CreateFrom (Buffer &&buffer) |
BufferView (Buffer &&rhs) noexcept | |
Capacity | |
bool | empty () const noexcept |
size_type | size () const noexcept |
size_type | capacity () const noexcept |
static constexpr size_type | max_size () noexcept |
Iterators | |
const Buffer | _buffer |
const_iterator | cbegin () const noexcept |
const_iterator | begin () const noexcept |
const_iterator | cend () const noexcept |
const_iterator | end () const noexcept |
Creating a constant view from an existing buffer.
Definition at line 32 of file BufferView.h.
using carla::BufferView::const_iterator = const value_type * |
Definition at line 43 of file BufferView.h.
using carla::BufferView::size_type = uint32_t |
Definition at line 42 of file BufferView.h.
using carla::BufferView::value_type = unsigned char |
Definition at line 41 of file BufferView.h.
|
delete |
|
delete |
|
inlineprivatenoexcept |
Definition at line 62 of file BufferView.h.
|
inlinenoexcept |
Definition at line 134 of file BufferView.h.
References _buffer, and carla::Buffer::cbegin().
|
inlinenoexcept |
Make a boost::asio::buffer from this buffer.
Definition at line 94 of file BufferView.h.
References cbuffer().
Referenced by CreateFrom().
|
inlinenoexcept |
Definition at line 118 of file BufferView.h.
References _buffer, and carla::Buffer::capacity().
|
inlinenoexcept |
Definition at line 130 of file BufferView.h.
References _buffer, and carla::Buffer::data().
|
inlinenoexcept |
Make a boost::asio::buffer from this buffer.
Definition at line 89 of file BufferView.h.
References _buffer, carla::Buffer::data(), and carla::Buffer::size().
Referenced by buffer().
|
inlinenoexcept |
Definition at line 138 of file BufferView.h.
References _buffer, carla::Buffer::cbegin(), and carla::Buffer::size().
|
inlinestatic |
Definition at line 56 of file BufferView.h.
References buffer(), and BufferView().
Referenced by Benchmark::AddStream(), make_special_message(), ADVSCamera::PostPhysTick(), FAsyncDataStreamTmpl< T >::Send(), FPixelReader::SendPixelsInRenderThread(), FAsyncDataStreamTmpl< T >::SerializeAndSend(), TEST(), carla::multigpu::Router::Write(), carla::multigpu::Secondary::Write(), carla::multigpu::Router::WriteToNext(), and carla::multigpu::Router::WriteToOne().
|
inlinenoexcept |
Direct access to the allocated memory or nullptr if no memory is allocated.
Definition at line 80 of file BufferView.h.
References _buffer, and carla::Buffer::data().
|
inlinenoexcept |
Definition at line 106 of file BufferView.h.
References _buffer, and carla::Buffer::size().
|
inlinenoexcept |
Definition at line 142 of file BufferView.h.
References _buffer, and carla::Buffer::cend().
|
inlinestaticnoexcept |
Definition at line 114 of file BufferView.h.
|
inline |
Access the byte at position i.
Definition at line 74 of file BufferView.h.
References _buffer, and carla::Buffer::data().
|
inlinenoexcept |
Definition at line 110 of file BufferView.h.
References _buffer, and carla::Buffer::size().
|
private |
Definition at line 148 of file BufferView.h.
Referenced by begin(), capacity(), cbegin(), cbuffer(), cend(), data(), empty(), end(), operator[](), and size().