Galois
|
Buffer for deserialization of data. More...
#include <Serialize.h>
Public Member Functions | |
DeSerializeBuffer () | |
Constructor initializes offset into buffer to 0. More... | |
DeSerializeBuffer (DeSerializeBuffer &&)=default | |
Disable copy constructor. More... | |
DeSerializeBuffer (vTy &&v, uint32_t start=0) | |
Move constructor. More... | |
DeSerializeBuffer (vTy &data) | |
Constructor that takes an existing vector to use as the deserialize buffer. More... | |
DeSerializeBuffer (int count) | |
Initializes the deserialize buffer with a certain size. More... | |
template<typename Iter > | |
DeSerializeBuffer (Iter b, Iter e) | |
Initializes the deserialize buffer using vector initialization from 2 iterators. More... | |
DeSerializeBuffer (SerializeBuffer &&buf) | |
Initialize a deserialize buffer from a serialize buffer. More... | |
DeSerializeBuffer & | operator= (DeSerializeBuffer &&buf)=default |
Disable copy constructor. More... | |
void | reset (int count) |
Reset deserialize buffer. More... | |
unsigned | getOffset () const |
Gets the current offset into the deserialize buffer. More... | |
void | setOffset (unsigned off) |
Sets the offset into the deserialize buffer. More... | |
unsigned | size () const |
Gets the size of the deserialize buffer. More... | |
bool | empty () const |
Returns true if the deserialize buffer is empty. More... | |
unsigned char | pop () |
Get the next character in the deserialize buffer. More... | |
void | pop_back (unsigned x) |
Clears the last x bytes of the deserialize buffer, resizing it as well. More... | |
void | extract (uint8_t *dst, size_t num) |
Extracts a certain amount of data from the deserialize buffer. More... | |
vTy & | getVec () |
Get the underlying vector storing the data of the deserialize buffer. More... | |
void * | linearData () |
Get a pointer to the underlying data of the deserialize buffer. More... | |
const uint8_t * | r_linearData () const |
Get a pointer to the remaining data of the deserialize buffer (as determined by offset) More... | |
size_t | r_size () const |
Get the remaining size of the deserialize buffer (as determined by offset) More... | |
bool | atAlignment (size_t a) |
Checks if the current location in the deserialize buffer is aligned to some size a. More... | |
void | print (std::ostream &o) const |
Utility print of deserialize buffer. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const DeSerializeBuffer &buf) |
Operator for printing deserialize buffer. More... | |
Buffer for deserialization of data.
Mainly used during network communication.
|
inline |
Constructor initializes offset into buffer to 0.
|
default |
Disable copy constructor.
|
inline |
Move constructor.
v | vector to act as deserialize buffer |
start | offset to start saving data into |
|
inlineexplicit |
Constructor that takes an existing vector to use as the deserialize buffer.
|
inlineexplicit |
Initializes the deserialize buffer with a certain size.
[in] | count | size to initialize buffer to |
|
inline |
Initializes the deserialize buffer using vector initialization from 2 iterators.
|
inlineexplicit |
Initialize a deserialize buffer from a serialize buffer.
|
inline |
Checks if the current location in the deserialize buffer is aligned to some size a.
|
inline |
Returns true if the deserialize buffer is empty.
|
inline |
Extracts a certain amount of data from the deserialize buffer.
dst | buffer to copy data from deserialize buffer into |
num | Amount of data to get from deserialize buffer |
|
inline |
Gets the current offset into the deserialize buffer.
|
inline |
Get the underlying vector storing the data of the deserialize buffer.
|
inline |
Get a pointer to the underlying data of the deserialize buffer.
|
default |
Disable copy constructor.
|
inline |
Get the next character in the deserialize buffer.
|
inline |
Clears the last x bytes of the deserialize buffer, resizing it as well.
x | How many bytes from the end to clear |
|
inline |
Utility print of deserialize buffer.
o | stream to print to |
|
inline |
Get a pointer to the remaining data of the deserialize buffer (as determined by offset)
|
inline |
Get the remaining size of the deserialize buffer (as determined by offset)
|
inline |
Reset deserialize buffer.
count | new size of buffer |
|
inline |
Sets the offset into the deserialize buffer.
|
inline |
Gets the size of the deserialize buffer.
|
friend |
Operator for printing deserialize buffer.