Signal/Geometry Processing Library (SPL) 1.1.24 |

Classes | Functions
Bit Stream I/O

Bit streams. More...

## Classes
class | SPL::BitStream
| A common base class for the input and output bit stream classes. More...
class | SPL::InputBitStream
| Input bit stream class. More...
class | SPL::OutputBitStream
| Output bit stream class. More...

## Functions
bool | SPL::BitStream::isOkay () const
| Test if the bitstream in an okay (i.e., non-error) state. More...
bool | SPL::BitStream::isEof () const
| Test if the bitstream has encountered end-of-file (EOF). More...
bool | SPL::BitStream::isLimit () const
| Test if the bitstream has encountered a read/write limit. More...
void | SPL::BitStream::setIoState (IoState state)
| Set the I/O state of a bit stream. More...
IoState | SPL::BitStream::getIoState () const
| Get the I/O state of a bit stream. More...
void | SPL::BitStream::clearIoStateBits (IoState state=allIoBits)
| Clear the specified bits in the I/O state of a bit stream. More...
void | SPL::BitStream::setIoStateBits (IoState state)
| Set the specified bits in the I/O state of a bit stream. More...
void | SPL::InputBitStream::clearReadCount ()
| Set the read count to zero. More...
Size | SPL::InputBitStream::getReadCount () const
| Get the number of bits read from the bit stream so far. More...
void | SPL::InputBitStream::setReadLimit (Offset readLimit)
| Specify the maximum allowable number of bits that may be read from the bit stream. More...
Offset | SPL::InputBitStream::getReadLimit () const
| Get the number of bits that still may be read from the bit stream before the read limit is reached. More...
Size | SPL::OutputBitStream::getWriteCount () const
| Get the number of bits written to the bit stream. More...
void | SPL::OutputBitStream::clearWriteCount ()
| Clear the count of the number of bits written to the bit stream. More...
Offset | SPL::OutputBitStream::getWriteLimit () const
| Get the number of bits that may still be written to the underlying (character) stream. More...
void | SPL::OutputBitStream::setWriteLimit (Offset writeLimit)
| Set the number of bits that may still be written to the bit stream. More...

## Detailed Description

Bit streams.

## Function Documentation

void SPL::BitStream::clearIoStateBits | ( | BitStream::IoState | mask = `allIoBits` | ) |
| inline

Clear the specified bits in the I/O state of a bit stream.

If no parameter is provided, all bits are cleared.

void SPL::InputBitStream::clearReadCount | ( |  | ) |
| inline

Set the read count to zero.

void SPL::OutputBitStream::clearWriteCount | ( |  | ) |
| inline

Clear the count of the number of bits written to the bit stream.

BitStream::IoState SPL::BitStream::getIoState | ( |  | ) | const
| inline

Get the I/O state of a bit stream.

(This is similar in spirit to basic_ios::rdstate.)

InputBitStream::Size SPL::InputBitStream::getReadCount | ( |  | ) | const
| inline

Get the number of bits read from the bit stream so far.

InputBitStream::Offset SPL::InputBitStream::getReadLimit | ( |  | ) | const
| inline

Get the number of bits that still may be read from the bit stream before the read limit is reached.

If read-limit checking is enabled, the function returns the number of bits that can still be read before the read limit is reached. If read-limit checking is disabled, a negative value is returned.

OutputBitStream::Size SPL::OutputBitStream::getWriteCount | ( |  | ) | const
| inline

Get the number of bits written to the bit stream.

OutputBitStream::Offset SPL::OutputBitStream::getWriteLimit | ( |  | ) | const
| inline

Get the number of bits that may still be written to the underlying (character) stream.

If write-limit checking is enabled, the function returns the number of bits that can still be written before the write limit is reached. If write-limit checking is disabled, a negative value is returned.

bool SPL::BitStream::isEof | ( |  | ) | const
| inline

Test if the bitstream has encountered end-of-file (EOF).

(This is similar in spirit to basic_ios::eof.)

bool SPL::BitStream::isLimit | ( |  | ) | const
| inline

Test if the bitstream has encountered a read/write limit.

bool SPL::BitStream::isOkay | ( |  | ) | const
| inline

Test if the bitstream in an okay (i.e., non-error) state.

(This is similar in spirit to !basic_ios::fail.)

void SPL::BitStream::setIoState | ( | BitStream::IoState | state | ) |
| inline

Set the I/O state of a bit stream.

(This is similar in spirit to basic_ios::clear.)

void SPL::BitStream::setIoStateBits | ( | BitStream::IoState | mask | ) |
| inline

Set the specified bits in the I/O state of a bit stream.

(This is similar in spirit to basic_ios::setstate.)

void SPL::InputBitStream::setReadLimit | ( | InputBitStream::Offset | readLimit | ) |
| inline

Specify the maximum allowable number of bits that may be read from the bit stream.

If readLimit is nonnegative, read-limit checking is enabled and the current read limit is set to readLimit. If readLimit is negative, read-limit checking is disabled.

void SPL::OutputBitStream::setWriteLimit | ( | OutputBitStream::Offset | writeLimit | ) |
| inline

Set the number of bits that may still be written to the bit stream.

If writeLimit is nonnegative, write-limit checking is enabled and the current write limit is set to writeLimit. If writeLimit is negative, write-limit checking is disabled.