Class that is used to help serialize objects into a buffer.
More...
#include <BufferWriter.h>
Class that is used to help serialize objects into a buffer.
◆ BufferWriter()
ThunderEgg::BufferWriter::BufferWriter |
( |
char * |
buffer | ) |
|
|
inline |
Create a new BufferWriter with given buffer.
- Parameters
-
buffer | the pointer to the beginning of the buffer. |
◆ getPos()
int ThunderEgg::BufferWriter::getPos |
( |
| ) |
|
|
inline |
get the current position in the buffer
- Returns
- the current position
◆ operator<<() [1/2]
Add object to the buffer.
- Parameters
-
- Returns
- this BufferWriter
◆ operator<<() [2/2]
template<typename T >
std::enable_if<!isSerializable<T>), BufferWriter>::type& ThunderEgg::BufferWriter::operator<< |
( |
const T & |
obj | ) |
|
|
inline |
Add an object to the buffer.
- Template Parameters
-
- Parameters
-
obj | the object. This object must be in serialized form. |
- Returns
- this BufferWriter
The documentation for this class was generated from the following file: