Signal/Geometry Processing Library (SPL)  2.0.8
SPL::BitStream Class Reference

A common base class for the input and output bit stream classes. More...

#include <bitStream.hpp>

Inheritance diagram for SPL::BitStream:
SPL::InputBitStream SPL::OutputBitStream

Public Types

typedef unsigned IoState
 The type used for the error state for a stream. More...
 
typedef unsigned long long Size
 An unsigned integral type (used for sizes/counts). More...
 
typedef long long Offset
 A signed integral type (used for differences). More...
 

Public Member Functions

bool isOkay () const
 Test if the bitstream in an okay (i.e., non-error) state. More...
 
bool isEof () const
 Test if the bitstream has encountered end-of-file (EOF). More...
 
bool isLimit () const
 Test if the bitstream has encountered a read/write limit. More...
 
IoState getIoState () const
 Get the I/O state of a bit stream. More...
 
void setIoState (IoState state)
 Set the I/O state of a bit stream. More...
 
void setIoStateBits (IoState state)
 Set the specified bits in the I/O state of a bit stream. More...
 
void clearIoStateBits (IoState state=allIoBits)
 Clear the specified bits in the I/O state of a bit stream. More...
 

Static Public Attributes

static const IoState eofBit = 1
 end of file (EOF) reached on input More...
 
static const IoState limitBit = 2
 read/write limit exceeded More...
 
static const IoState badBit = 4
 I/O error. More...
 
static const IoState allIoBits = eofBit | limitBit | badBit
 all error bits More...
 

Detailed Description

A common base class for the input and output bit stream classes.

This class provides some error handling functionality common to the input and output bit stream classes.

Member Typedef Documentation

◆ IoState

typedef unsigned SPL::BitStream::IoState

The type used for the error state for a stream.

◆ Offset

typedef long long SPL::BitStream::Offset

A signed integral type (used for differences).

◆ Size

typedef unsigned long long SPL::BitStream::Size

An unsigned integral type (used for sizes/counts).

Member Data Documentation

◆ allIoBits

const IoState SPL::BitStream::allIoBits = eofBit | limitBit | badBit
static

all error bits

◆ badBit

const IoState SPL::BitStream::badBit = 4
static

I/O error.

◆ eofBit

const IoState SPL::BitStream::eofBit = 1
static

end of file (EOF) reached on input

◆ limitBit

const IoState SPL::BitStream::limitBit = 2
static

read/write limit exceeded


The documentation for this class was generated from the following file: