#include <cReadBits.h>
List of all members.
Public Member Functions |
| cReadBits (istream &istreamIn, unsigned int uiBytsToBuffer=256) |
| ~cReadBits () |
unsigned int | readBits (char *pBuffer, unsigned int uiBitsToRead) |
unsigned int | readBits (int &iBuffer, unsigned int uiBitsToRead) |
unsigned int | readBits (long &lBuffer, unsigned int uiBitsToRead) |
unsigned int | readBits (long long &lBuffer, unsigned int uiBitsToRead) |
unsigned int | readBits (unsigned int &uiBuffer, unsigned int uiBitsToRead) |
unsigned int | readBits (unsigned long &ulBuffer, unsigned int uiBitsToRead) |
unsigned int | readBits (unsigned long long &ulBuffer, unsigned int uiBitsToRead) |
unsigned int | readTillNextFullByte () |
unsigned int | rollbackBits (unsigned int uiBitsToRollback) |
istream * | getStream () |
unsigned long | getBitReadedCount () const |
Detailed Description
Definition at line 50 of file cReadBits.h.
Constructor & Destructor Documentation
fib::cReadBits::cReadBits |
( |
istream & |
istreamIn, |
|
|
unsigned int |
uiBytsToBuffer = 256 |
|
) |
| |
Standardconstructor Beware: Don't use istreamIn elsewher, while using it with theas class. This class should only use istreamIn.
- Parameters:
-
istreamIn | the stream to read the bits from |
uiBytsToBuffer | the number of byts to buffer from the stream |
fib::cReadBits::~cReadBits |
( |
| ) |
|
Member Function Documentation
unsigned long fib::cReadBits::getBitReadedCount |
( |
| ) |
const |
- Returns:
- the number of bits readed from the stream or respectively the bitposition in the stream (rollbacks inclusive)
istream* fib::cReadBits::getStream |
( |
| ) |
|
- Returns:
- a pointer to the bufferd input stream Beware: The readposition will be after the byte of last readed bit, without the rollbacks.
unsigned int fib::cReadBits::readBits |
( |
char * |
pBuffer, |
|
|
unsigned int |
uiBitsToRead |
|
) |
| |
This method reads a number of bits from the stream.
- Parameters:
-
pBuffer | the character array wher to writes the readed bits to, the first bit will begin at the pointer pBuffer |
uiBitsToRead | the number of bits to read |
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::readBits |
( |
int & |
iBuffer, |
|
|
unsigned int |
uiBitsToRead |
|
) |
| |
This method reads a number of bits from the stream into a integer variable.
- Parameters:
-
iBuffer | a reference to the variable, wher to read the number to |
uiBitsToRead | the number of bits to read |
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::readBits |
( |
long & |
lBuffer, |
|
|
unsigned int |
uiBitsToRead |
|
) |
| |
This method reads a number of bits from the stream into a integer variable.
- Parameters:
-
lBuffer | a reference to the variable, wher to read the number to |
uiBitsToRead | the number of bits to read |
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::readBits |
( |
long long & |
lBuffer, |
|
|
unsigned int |
uiBitsToRead |
|
) |
| |
This method reads a number of bits from the stream into a integer variable.
- Parameters:
-
lBuffer | a reference to the variable, wher to read the number to |
uiBitsToRead | the number of bits to read |
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::readBits |
( |
unsigned int & |
uiBuffer, |
|
|
unsigned int |
uiBitsToRead |
|
) |
| |
This method reads a number of bits from the stream into a integer variable.
- Parameters:
-
uiBuffer | a reference to the variable, wher to read the number to |
uiBitsToRead | the number of bits to read |
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::readBits |
( |
unsigned long & |
ulBuffer, |
|
|
unsigned int |
uiBitsToRead |
|
) |
| |
This method reads a number of bits from the stream into a integer variable.
- Parameters:
-
uiBuffer | a reference to the variable, wher to read the number to |
uiBitsToRead | the number of bits to read |
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::readBits |
( |
unsigned long long & |
ulBuffer, |
|
|
unsigned int |
uiBitsToRead |
|
) |
| |
This method reads a number of bits from the stream into a integer variable.
- Parameters:
-
uiBuffer | a reference to the variable, wher to read the number to |
uiBitsToRead | the number of bits to read |
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::readTillNextFullByte |
( |
| ) |
|
This method reads to the beginning of the next full byte, if it isn't allready readed to a full byte. After the method call the readpoint stands on the beginning of a byte, which is after or at the read position befor the call.
- Returns:
- the number of bits readed
unsigned int fib::cReadBits::rollbackBits |
( |
unsigned int |
uiBitsToRollback | ) |
|
This function will rollbach uiBitsToRollback bits of the stream so they will be read again.
- Parameters:
-
uiBitsToRollback | the number of bits to rollback |
- Returns:
- the number of bits rollbacked
Member Data Documentation
istream* fib::cReadBits::pIstream |
|
protected |
A pointer to the input stream to buffer.
Definition at line 83 of file cReadBits.h.
char* fib::cReadBits::szByteBuffer |
|
protected |
This is a pointer to the buffer wher the readed byts of the stream will be bufferd. The byts bufferd are readed round. If the end of the buffer is reached, the beginning is the next byte.
Definition at line 58 of file cReadBits.h.
unsigned int fib::cReadBits::uiBitPositionBuffer |
|
protected |
The bitposition in the buffer of the bit to read next from the buffer.
Definition at line 68 of file cReadBits.h.
unsigned int fib::cReadBits::uiBitReadedInBuffer |
|
protected |
The bitposition of the bit which will be stored next to the buffer.
Definition at line 73 of file cReadBits.h.
unsigned int fib::cReadBits::uiBitsToBuffer |
|
protected |
The number of byts to buffer.
Definition at line 63 of file cReadBits.h.
unsigned long fib::cReadBits::ulBitReadedCount |
|
protected |
The the number of bits readed from the stream.
Definition at line 78 of file cReadBits.h.
The documentation for this class was generated from the following file: