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... | |
Bit streams.
|
inline |
Clear the specified bits in the I/O state of a bit stream.
If no parameter is provided, all bits are cleared.
|
inline |
Set the read count to zero.
|
inline |
Clear the count of the number of bits written to the bit stream.
|
inline |
Get the I/O state of a bit stream.
(This is similar in spirit to basic_ios::rdstate.)
|
inline |
Get the number of bits read from the bit stream so far.
|
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.
|
inline |
Get the number of bits written to the bit stream.
|
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.
|
inline |
Test if the bitstream has encountered end-of-file (EOF).
(This is similar in spirit to basic_ios::eof.)
|
inline |
Test if the bitstream has encountered a read/write limit.
|
inline |
Test if the bitstream in an okay (i.e., non-error) state.
(This is similar in spirit to !basic_ios::fail.)
|
inline |
Set the I/O state of a bit stream.
(This is similar in spirit to basic_ios::clear.)
|
inline |
Set the specified bits in the I/O state of a bit stream.
(This is similar in spirit to basic_ios::setstate.)
|
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.
|
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.