Bytemaster's Boost Libraries
|
#include <datastream.hpp>
Public Member Functions | |
datastream (T start, uint32_t s) | |
template<typename DATA > | |
datastream & | operator<< (const DATA &d) |
template<typename DATA > | |
datastream & | operator>> (DATA &d) |
void | skip (uint32_t s) |
bool | read (char *d, uint32_t s) |
bool | write (const char *d, uint32_t s) |
bool | put (char c) |
bool | get (unsigned char &c) |
bool | get (char &c) |
T | pos () const |
bool | valid () const |
bool | seekp (uint32_t p) |
uint32_t | tellp () const |
uint32_t | remaining () const |
The purpose of this datastream is to provide a fast, effecient, means of calculating the amount of data "about to be written" and then writing it. This means having two modes of operation, "test run" where you call the entire pack sequence calculating the size, and then actually packing it after doing a single allocation.