Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

class BufferStream : public MemStream

A Stream based on a Vector<byte> buffer, beeing able to open such a Vector<byte> to Loading or directly serializing to such a Vector.It automatically increases the underlying Vector. It uses _pick semantics to open a Vector<byte> and returns the underlying Vector<byte> as _pick (leaving a new instance under hood, so new buffering is possible as well)

 


 

void Open(Vector<byte> & d)

Picks the Vector d.as underlying buffer in Loading mode.

 


 

void Create()

resets underlying buffer and sets Stream to Storing mode. rewinds current ptr to beginning.

 


 

void Reserve(int n)

reserves additional n.bytes in the Stream. sets Storing mode.can speed up things if you know how much is to come.

 


 

void Crop()

crops the internal buffer to currently used size, use when storing.

 


 

Vector<byteGetResult()

picks internal Vector, leaving an initialized Vector for new operations.

 


 

BufferStream()

creates a BufferStream in Storing Mode

 


 

BufferStream(Vector<byte>& d)

Creates a BufferStream in Loading mode. Loads Vector d.picking it.

 

 

Do you want to contribute?