A class managing one or more serializable ByteStrings. More...
#include <ByteString.h>
Public Member Functions | |
ByteString () | |
Default constructor: starts with an empty string. More... | |
ByteString (const uint8_t *buf) | |
Overloaded constructor: takes ownership of a pointer. More... | |
size_t | length () const |
Retrieves the length of the serialized string. More... | |
uint8_t * | next () |
Retrieves the next serialized String in the buffer. More... | |
size_t | decode_length (const uint8_t **dptr) const |
Retrieves the decoded length and returns a pointer to the string. More... | |
size_t | write (uint8_t *dst) const |
Writes the data of this ByteString into a pointer. More... | |
const char * | str () const |
Returns a pointer to the String's deserialized data. More... | |
operator bool () const | |
Returns true if this ByteArray is not empty. More... | |
Public Attributes | |
const uint8_t * | ptr |
The pointer to the serialized data. More... | |
A class managing one or more serializable ByteStrings.
Definition at line 47 of file ByteString.h.
|
inline |
Default constructor: starts with an empty string.
Definition at line 50 of file ByteString.h.
|
inline |
Overloaded constructor: takes ownership of a pointer.
buf | The pointer with data |
Definition at line 56 of file ByteString.h.
|
inline |
Retrieves the decoded length and returns a pointer to the string.
dptr | A pointer to the string data |
Definition at line 83 of file ByteString.h.
|
inline |
Retrieves the length of the serialized string.
Definition at line 62 of file ByteString.h.
|
inline |
Retrieves the next serialized String in the buffer.
Definition at line 71 of file ByteString.h.
|
inline |
Returns true if this ByteArray is not empty.
Definition at line 116 of file ByteString.h.
|
inline |
Returns a pointer to the String's deserialized data.
Definition at line 106 of file ByteString.h.
|
inline |
Writes the data of this ByteString into a pointer.
dst | A pointer which will receive the serialized data |
Definition at line 93 of file ByteString.h.
const uint8_t* Hypertable::ByteString::ptr |
The pointer to the serialized data.
Definition at line 121 of file ByteString.h.