#include <serializer.hpp>
Inherits noncopyable.
Serializes objects to a given sink.
hamcast::util::serializer::serializer |
( |
| ) |
|
Create a serializer with no data sink.
Create a serializer that writes from sink_ptr
.
- Parameters
-
sink_ptr | The used data sink. |
- Precondition
sink_ptr.get() != NULL
.
void hamcast::util::serializer::flush |
( |
| ) |
|
Flush all internal buffers of the used data sink.
Change the used data sink.
- Parameters
-
new_sink | The new data sink for this . |
void hamcast::util::serializer::write |
( |
size_t |
buf_size, |
|
|
const void * |
buf |
|
) |
| |
Write buf_size
bytes from buf
to the sink.
- Parameters
-
buf_size | Size of buf in bytes. |
buf | C-buffer that contains the outgoing bytes. |
- Precondition
buf_size > 0 && buf != NULL
.
The documentation for this class was generated from the following files:
- hamcast/util/serializer.hpp
- src/serializer.cpp