#include <stream_writer.h>
Public Member Functions | |
size_t | getByteCount () |
StreamWriter (shared_ptr< ostream > osp) | |
template<typename T > | |
void | write (T &v) |
void | writeBuffer (const_buffer b) |
void | writeBytes (const void *p, size_t n) |
Private Attributes | |
shared_ptr< ostream > | osp_ |
Helper class to write values into an output stream. This is really an adapter so that classes can use the Writer interface for all writing
Definition at line 47 of file stream_writer.h.
eip::serialization::StreamWriter::StreamWriter | ( | shared_ptr< ostream > | osp | ) | [inline] |
Create a writer to use the output stream given
ost | Output stream to use |
Definition at line 55 of file stream_writer.h.
size_t eip::serialization::StreamWriter::getByteCount | ( | ) | [inline, virtual] |
Get the number of bytes writen to the stream
Implements eip::serialization::Writer.
Definition at line 90 of file stream_writer.h.
void eip::serialization::StreamWriter::write | ( | T & | v | ) | [inline] |
Write a value to the output stream
v | Value to write to the output stream |
Definition at line 62 of file stream_writer.h.
void eip::serialization::StreamWriter::writeBuffer | ( | const_buffer | b | ) | [inline, virtual] |
Write out the contents of a buffer to the stream
b | buffer of data to add to the current buffer at the current location |
Implements eip::serialization::Writer.
Definition at line 81 of file stream_writer.h.
void eip::serialization::StreamWriter::writeBytes | ( | const void * | p, |
size_t | n | ||
) | [inline, virtual] |
Write a set of bytes to the stream
p | pointer to data to write |
n | number of bytes to write |
Implements eip::serialization::Writer.
Definition at line 72 of file stream_writer.h.
shared_ptr<ostream> eip::serialization::StreamWriter::osp_ [private] |
Definition at line 96 of file stream_writer.h.