BitStream Class Reference#include <bitStream.h>
Inheritance diagram for BitStream:
|
Public Member Functions |
| void | setBuffer (void *bufPtr, S32 bufSize, S32 maxSize=0) |
| U8 * | getBuffer () |
| U8 * | getBytePtr () |
| U32 | getReadByteSize () |
| S32 | getCurPos () const |
| void | setCurPos (const U32) |
| | BitStream (void *bufPtr, S32 bufSize, S32 maxWriteSize=-1) |
| void | clear () |
| void | setStringBuffer (char buffer[256]) |
| void | writeInt (S32 value, S32 bitCount) |
| S32 | readInt (S32 bitCount) |
| void | writeSignedInt (S32 value, S32 bitCount) |
| S32 | readSignedInt (S32 bitCount) |
| void | writeRangedU32 (U32 value, U32 rangeStart, U32 rangeEnd) |
| U32 | readRangedU32 (U32 rangeStart, U32 rangeEnd) |
| F32 | readFloat (S32 bitCount) |
| F32 | readSignedFloat (S32 bitCount) |
| void | writeFloat (F32 f, S32 bitCount) |
| void | writeSignedFloat (F32 f, S32 bitCount) |
| void | writeClassId (U32 classId, U32 classType, U32 classGroup) |
| S32 | readClassId (U32 classType, U32 classGroup) |
| void | writeNormalVector (const Point3F &vec, S32 bitCount) |
| void | readNormalVector (Point3F *vec, S32 bitCount) |
| void | clearCompressionPoint () |
| void | setCompressionPoint (const Point3F &p) |
| void | writeCompressedPoint (const Point3F &p, F32 scale=0.01f) |
| void | readCompressedPoint (Point3F *p, F32 scale=0.01f) |
| void | writeNormalVector (const Point3F &vec, S32 angleBitCount, S32 zBitCount) |
| void | readNormalVector (Point3F *vec, S32 angleBitCount, S32 zBitCount) |
| void | writeAffineTransform (const MatrixF &) |
| void | readAffineTransform (MatrixF *) |
| void | writeBits (S32 bitCount, const void *bitPtr) |
| void | readBits (S32 bitCount, void *bitPtr) |
| bool | writeFlag (bool val) |
| bool | readFlag () |
| void | setBit (S32 bitCount, bool set) |
| bool | testBit (S32 bitCount) |
| bool | isFull () |
| bool | isValid () |
| bool | _read (const U32 size, void *d) |
| bool | _write (const U32 size, const void *d) |
| void | readString (char stringBuf[256]) |
| | Reads a string of maximum 255 characters long.
|
| void | writeString (const char *stringBuf, S32 maxLen=255) |
| | Writes a string to the stream.
|
| bool | hasCapability (const Capability) const |
| | Checks to see if this stream has the capability of a given function.
|
| U32 | getPosition () const |
| | Gets the position in the stream.
|
| bool | setPosition (const U32 in_newPosition) |
| | Sets the position of the stream. Returns if the new position is valid or not.
|
| U32 | getStreamSize () |
| | Gets the size of the stream.
|
Static Public Member Functions |
| static BitStream * | getPacketStream (U32 writeSize=0) |
| static void | sendPacketStream (const NetAddress *addr) |
| static Point3F | dumbDownNormal (const Point3F &vec, S32 bitCount) |
Protected Attributes |
| U8 * | dataPtr |
| S32 | bitNum |
| S32 | bufSize |
| bool | error |
| S32 | maxReadBitNum |
| S32 | maxWriteBitNum |
| char * | stringBuffer |
| bool | mCompressRelative |
| Point3F | mCompressPoint |
Friends |
| class | HuffmanProcessor |
Constructor & Destructor Documentation
| BitStream::BitStream |
( |
void * |
bufPtr, |
|
|
S32 |
bufSize, |
|
|
S32 |
maxWriteSize = -1 |
|
) |
[inline] |
|
Member Function Documentation
| static BitStream* BitStream::getPacketStream |
( |
U32 |
writeSize = 0 |
) |
[static] |
|
| static void BitStream::sendPacketStream |
( |
const NetAddress * |
addr |
) |
[static] |
|
| void BitStream::setBuffer |
( |
void * |
bufPtr, |
|
|
S32 |
bufSize, |
|
|
S32 |
maxSize = 0 |
|
) |
|
|
| U8* BitStream::getBuffer |
( |
|
) |
[inline] |
|
| U8* BitStream::getBytePtr |
( |
|
) |
|
|
| U32 BitStream::getReadByteSize |
( |
|
) |
|
|
| S32 BitStream::getCurPos |
( |
|
) |
const [inline] |
|
| void BitStream::setCurPos |
( |
const |
U32 |
) |
[inline] |
|
| void BitStream::clear |
( |
|
) |
|
|
| void BitStream::setStringBuffer |
( |
char |
buffer[256] |
) |
|
|
| void BitStream::writeInt |
( |
S32 |
value, |
|
|
S32 |
bitCount |
|
) |
|
|
| S32 BitStream::readInt |
( |
S32 |
bitCount |
) |
|
|
| void BitStream::writeSignedInt |
( |
S32 |
value, |
|
|
S32 |
bitCount |
|
) |
|
|
| S32 BitStream::readSignedInt |
( |
S32 |
bitCount |
) |
|
|
| void BitStream::writeRangedU32 |
( |
U32 |
value, |
|
|
U32 |
rangeStart, |
|
|
U32 |
rangeEnd |
|
) |
[inline] |
|
| U32 BitStream::readRangedU32 |
( |
U32 |
rangeStart, |
|
|
U32 |
rangeEnd |
|
) |
[inline] |
|
| F32 BitStream::readFloat |
( |
S32 |
bitCount |
) |
|
|
| F32 BitStream::readSignedFloat |
( |
S32 |
bitCount |
) |
|
|
| void BitStream::writeFloat |
( |
F32 |
f, |
|
|
S32 |
bitCount |
|
) |
|
|
| void BitStream::writeSignedFloat |
( |
F32 |
f, |
|
|
S32 |
bitCount |
|
) |
|
|
| void BitStream::writeClassId |
( |
U32 |
classId, |
|
|
U32 |
classType, |
|
|
U32 |
classGroup |
|
) |
|
|
| S32 BitStream::readClassId |
( |
U32 |
classType, |
|
|
U32 |
classGroup |
|
) |
|
|
| void BitStream::writeNormalVector |
( |
const Point3F & |
vec, |
|
|
S32 |
bitCount |
|
) |
|
|
| void BitStream::clearCompressionPoint |
( |
|
) |
|
|
| void BitStream::setCompressionPoint |
( |
const Point3F & |
p |
) |
|
|
| void BitStream::writeCompressedPoint |
( |
const Point3F & |
p, |
|
|
F32 |
scale = 0.01f |
|
) |
|
|
| void BitStream::readCompressedPoint |
( |
Point3F * |
p, |
|
|
F32 |
scale = 0.01f |
|
) |
|
|
| static Point3F BitStream::dumbDownNormal |
( |
const Point3F & |
vec, |
|
|
S32 |
bitCount |
|
) |
[static] |
|
| void BitStream::writeNormalVector |
( |
const Point3F & |
vec, |
|
|
S32 |
angleBitCount, |
|
|
S32 |
zBitCount |
|
) |
|
|
| void BitStream::writeAffineTransform |
( |
const MatrixF & |
|
) |
|
|
| void BitStream::writeBits |
( |
S32 |
bitCount, |
|
|
const void * |
bitPtr |
|
) |
|
|
| void BitStream::readBits |
( |
S32 |
bitCount, |
|
|
void * |
bitPtr |
|
) |
|
|
| bool BitStream::writeFlag |
( |
bool |
val |
) |
|
|
| bool BitStream::readFlag |
( |
|
) |
[inline] |
|
| void BitStream::setBit |
( |
S32 |
bitCount, |
|
|
bool |
set |
|
) |
|
|
| bool BitStream::testBit |
( |
S32 |
bitCount |
) |
|
|
| bool BitStream::isFull |
( |
|
) |
[inline] |
|
| bool BitStream::isValid |
( |
|
) |
[inline] |
|
| bool BitStream::_read |
( |
const U32 |
size, |
|
|
void * |
d |
|
) |
[virtual] |
|
| bool BitStream::_write |
( |
const U32 |
size, |
|
|
const void * |
d |
|
) |
[virtual] |
|
| void BitStream::readString |
( |
char |
stringBuf[256] |
) |
[virtual] |
|
|
|
Reads a string of maximum 255 characters long.
Reimplemented from Stream. |
| void BitStream::writeString |
( |
const char * |
stringBuf, |
|
|
S32 |
maxLen = 255 |
|
) |
[virtual] |
|
|
|
Writes a string to the stream.
Reimplemented from Stream. |
| bool BitStream::hasCapability |
( |
const |
Capability |
) |
const [inline, virtual] |
|
|
|
Checks to see if this stream has the capability of a given function.
Implements Stream. |
| U32 BitStream::getPosition |
( |
|
) |
const [virtual] |
|
|
|
Gets the position in the stream.
Implements Stream. |
| bool BitStream::setPosition |
( |
const U32 |
in_newPosition |
) |
[virtual] |
|
|
|
Sets the position of the stream. Returns if the new position is valid or not.
Implements Stream. |
| U32 BitStream::getStreamSize |
( |
|
) |
[virtual] |
|
|
|
Gets the size of the stream.
Implements Stream. |
Friends And Related Function Documentation
friend class HuffmanProcessor [friend] |
|
Field Documentation
|