Byte buffer which uses direct memory allocation for maximum performance.
using allocator_ptr = std::unique_ptr< allocator >using const_pointer = const void *using pointer = void *using size_type = std::size_tAlias to std::size_t.
using const_iterator = const value_type *
Constant pointer to char.
using iterator = value_type *
Pointer to char.
using value_type = char
Alias to char.
byte_order _orderallocator_ptr _allocatorsize_type _limitsize_type _positionsize_type _sizevalue_type * _datamax_size() -> constexpr static size_typeReturns maximum size a buffer may occupy (theoretical limit).
template <class Clock, class Duration> read(std::chrono::time_point< Clock, Duration > & t) -> voidtemplate <class Clock, class Duration> write(std::chrono::time_point< Clock, Duration > t) -> voidtemplate <class Rep, class Period> read(std::chrono::duration< Rep, Period > & dt) -> voidtemplate <class Rep, class Period> write(std::chrono::duration< Rep, Period > dt) -> voidtemplate <class T> read(T & x) -> autotemplate <class T> write(T x) -> autotemplate <class C, class T, class A> read(std::basic_string< C, T, A > & x) -> voidtemplate <class C, class T, class A> write(const std::basic_string< C, T, A > & x) -> voidtemplate <class T> read(T & x) -> autotemplate <class T> write(T x) -> autotemplate <class Source> fill(Source & src) -> autotemplate <class Sink> flush(Sink & dst) -> autoclear() -> voidcompact() -> voidbump(size_type n) -> voidpeek(pointer dst, size_type n) -> voidread(pointer dst, size_type n) -> autowrite(const_pointer src, size_type n) -> autoflip() -> voidorder(byte_order rhs) -> voidlimit(size_type rhs) -> voidposition(size_type rhs) -> voidget_allocator() const -> const allocator *get_allocator() -> allocator *order() const -> byte_orderremaining() const -> size_typelimit() const -> size_typeposition() const -> size_typeswap(byte_buffer & rhs) -> void
Swap with rhs.
grow() -> void
Double the buffer size.
resize(size_type new_size) -> voidResize the buffer preserving its contents.
operator!() const -> boolCheck if the buffer is valid.
operator bool() constexplicitCheck if the buffer is valid.
size() const -> size_typeGet number of bytes in byte buffer.
end() const -> const_iteratorGet iterator to the end of the container.
end() -> iteratorGet iterator to the end of the container.
begin() const -> const_iteratorGet iterator to the beginning of the container.
begin() -> iteratorGet iterator to the beginning of the container.
data() const -> const_iteratorGet pointer to raw data.
data() -> iteratorGet pointer to raw data.
~byte_buffer()byte_buffer(size_type size, allocator_ptr && allocator = {})explicit
Construct byte buffer with size size.
If size is nought, unusable buffer is created and no memory is allocated.
byte_buffer(byte_buffer && rhs)Move-constructor.
byte_buffer(const byte_buffer & rhs)operator=(const byte_buffer & rhs) -> byte_buffer &byte_buffer(const byte_buffer & rhs, allocator_ptr && allocator)byte_buffer()swap(byte_buffer & lhs, byte_buffer & rhs) -> voidOverload of std::swap for byte_buffer.