torque Torque Game Engine Documentation
TGE Version 1.5.2

InfiniteBitStream Class Reference

#include <bitStream.h>

Inheritance diagram for InfiniteBitStream:

Inheritance graph
[legend]

Detailed Description

This class acts to provide an "infinitely extending" stream.

Basically, it does what ResizeBitStream does, but it validates on every write op, so that you never have to worry about overwriting the buffer.


Public Member Functions

 InfiniteBitStream ()
 ~InfiniteBitStream ()
void validate (U32 upcomingBytes)
 Ensure we have space for at least upcomingBytes more bytes in the stream.
void reset ()
 Reset the stream to zero length (but don't clean memory).
void compact ()
 Shrink the buffer down to match the actual size of the data.
void writeToStream (Stream &s)
 Write us out to a stream... Results in last byte getting padded!
virtual void writeBits (S32 bitCount, const void *bitPtr)
virtual bool writeFlag (bool val)
const U32 getCRC ()


Constructor & Destructor Documentation

InfiniteBitStream::InfiniteBitStream (  ) 

InfiniteBitStream::~InfiniteBitStream (  ) 


Member Function Documentation

void InfiniteBitStream::validate ( U32  upcomingBytes  ) 

Ensure we have space for at least upcomingBytes more bytes in the stream.

void InfiniteBitStream::reset (  ) 

Reset the stream to zero length (but don't clean memory).

void InfiniteBitStream::compact (  ) 

Shrink the buffer down to match the actual size of the data.

void InfiniteBitStream::writeToStream ( Stream s  ) 

Write us out to a stream... Results in last byte getting padded!

virtual void InfiniteBitStream::writeBits ( S32  bitCount,
const void bitPtr 
) [inline, virtual]

Reimplemented from BitStream.

virtual bool InfiniteBitStream::writeFlag ( bool  val  )  [inline, virtual]

Reimplemented from BitStream.

const U32 InfiniteBitStream::getCRC (  )  [inline]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen