#include <StrMod/OutSerializer.h>
Public Methods | |
| OutSerializer (size_t suggested_size) | |
| OutSerializer (State &savedstate) | |
| Use this as the external state to save into on destruction, only use this if you've read the directions. :-). | |
| void | addS1Byte (lcore::S1Byte num) |
| void | addU1Byte (lcore::U1Byte num) |
| void | addS2Byte (lcore::S2Byte num) |
| void | addU2Byte (lcore::U2Byte num) |
| void | addS4Byte (lcore::S4Byte num) |
| void | addU4Byte (lcore::U4Byte num) |
| void | addBool (bool val) |
| void | addString (const::std::string &str) |
| void | addString (const char *str) |
| void | addRaw (const void *data, size_t len) |
| void | setMinSuggestedSize (size_t size) |
| BufferChunk * | takeChunk () |
This class serializes integers of various sizes and strings into a canonical binary format that can be given to an InSerializer on a completely different platform to read the data back in.
Definition at line 53 of file OutSerializer.h.
|
|
Use this as the external state to save into on destruction, only use this if you've read the directions. :-). This class can be much more efficient if it's always instantiated locally. Sometimes though, the state will need to be saved across function calls. That's where this constructor comes in. If the takeChunk function is called, a flag is set in the external state (that is also set when the external state is initially constructed) that tells this OutSerializer constructor that it needs to reset the state. Definition at line 71 of file OutSerializer.cxx. |
1.3-rc1