|
| ByteBuffer (ByteBuffer &other)=delete |
|
template<size_t kOtherSizeBytes> |
ByteBuffer & | operator= (const ByteBuffer< kOtherSizeBytes > &other) |
|
ByteBuffer & | operator= (const ByteBuffer &other) |
|
template<size_t kOtherSizeBytes> |
ByteBuffer & | assign (const ByteBuffer< kOtherSizeBytes > &other) |
|
| ByteBuffer (ByteBuffer &&other)=delete |
| ByteBuffers are not movable: the underlying data must be copied.
|
|
ByteBuffer & | operator= (ByteBuffer &&other)=delete |
| ByteBuffers are not movable: the underlying data must be copied.
|
|
template<typename... Args> |
ByteBuffer & | append (Args &&... args) |
|
constexpr | ByteBuilder (ByteSpan buffer) |
| Creates an empty ByteBuilder.
|
|
| ByteBuilder (const ByteBuilder &)=delete |
|
ByteBuilder & | operator= (const ByteBuilder &)=delete |
|
const std::byte * | data () const |
| Returns the contents of the bytes buffer.
|
|
Status | status () const |
|
StatusWithSize | status_with_size () const |
| Returns status() and size() as a StatusWithSize.
|
|
bool | ok () const |
| True if status() is OkStatus().
|
|
bool | empty () const |
| True if the bytes builder is empty.
|
|
size_t | size () const |
| Returns the current length of the bytes.
|
|
size_t | max_size () const |
| Returns the maximum length of the bytes.
|
|
void | clear () |
| Clears the bytes and resets its error state.
|
|
void | clear_status () |
| Sets the statuses to OkStatus();.
|
|
void | push_back (std::byte b) |
|
void | pop_back () |
|
const_iterator | begin () const |
| Root of bytebuffer wrapped in iterator type.
|
|
const_iterator | cbegin () const |
|
const_iterator | end () const |
| End of bytebuffer wrapped in iterator type.
|
|
const_iterator | cend () const |
|
const std::byte & | front () const |
| Front and Back C++ container functions.
|
|
const std::byte & | back () const |
|
ByteBuilder & | append (size_t count, std::byte b) |
| Appends the provided byte count times.
|
|
ByteBuilder & | append (const void *bytes, size_t count) |
|
ByteBuilder & | append (ConstByteSpan bytes) |
| Appends bytes from a byte span that calls the pointer/length version.
|
|
void | resize (size_t new_size) |
|
ByteBuilder & | PutUint8 (uint8_t val) |
| Put methods for inserting different 8-bit ints.
|
|
ByteBuilder & | PutInt8 (int8_t val) |
|
ByteBuilder & | PutUint16 (uint16_t value, endian order=endian::little) |
| Put methods for inserting different 16-bit ints.
|
|
ByteBuilder & | PutInt16 (int16_t value, endian order=endian::little) |
|
ByteBuilder & | PutUint32 (uint32_t value, endian order=endian::little) |
| Put methods for inserting different 32-bit ints.
|
|
ByteBuilder & | PutInt32 (int32_t value, endian order=endian::little) |
|
ByteBuilder & | PutUint64 (uint64_t value, endian order=endian::little) |
| Put methods for inserting different 64-bit ints.
|
|
ByteBuilder & | PutInt64 (int64_t value, endian order=endian::little) |
|
template<size_t kSizeBytes>
class pw::ByteBuffer< kSizeBytes >
ByteBuffers declare a buffer along with a ByteBuilder.