Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::strmod::OutSerializer Class Reference

A class that marshals data into a canonical binary format. More...

#include <StrMod/OutSerializer.h>

List of all members.

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)
BufferChunktakeChunk ()


Detailed Description

A class that marshals data into a canonical binary format.

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.


Constructor & Destructor Documentation

strmod::strmod::OutSerializer::OutSerializer State &    savedstate
 

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.


The documentation for this class was generated from the following files:
Generated on Wed Jan 29 00:32:54 2003 for libNet by doxygen1.3-rc1