ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::bitbuffer::BitRWBase Class Reference

Description:

Non-instantiatable base class for types BitWriter and BitReader.

Definition at line 599 of file bitbuffer.inl.

Inheritance diagram for alib::bitbuffer::BitRWBase:
[legend]
Collaboration diagram for alib::bitbuffer::BitRWBase:
[legend]

Public Method Index:

BitBufferBaseGetBuffer () const
 
BitBufferBase::Index GetIndex () const
 
uinteger RemainingSize () const
 
uinteger Usage () const
 

Protected Field Index:

BitBufferBasebb
 The bit buffer to write into. Provided on construction.
 
BitBufferBase::Index idx
 The current reading/writing index within bb.
 

Protected Method Index:

 BitRWBase (BitBufferBase &buffer)
 

Field Details:

◆ bb

BitBufferBase& alib::bitbuffer::BitRWBase::bb
protected

The bit buffer to write into. Provided on construction.

Definition at line 602 of file bitbuffer.inl.

◆ idx

BitBufferBase::Index alib::bitbuffer::BitRWBase::idx
protected

The current reading/writing index within bb.

Definition at line 603 of file bitbuffer.inl.

Constructor(s) / Destructor Details:

◆ BitRWBase()

alib::bitbuffer::BitRWBase::BitRWBase ( BitBufferBase & buffer)
inlineexplicitprotected

Protected constructor, used by derived classes only.

Parameters
bufferThe bit buffer to work on.

Definition at line 607 of file bitbuffer.inl.

Method Details:

◆ GetBuffer()

BitBufferBase & alib::bitbuffer::BitRWBase::GetBuffer ( ) const
inline

Retrieves the internal bit buffer.

Returns
The buffer the derived reader or writer works with.

Definition at line 614 of file bitbuffer.inl.

◆ GetIndex()

BitBufferBase::Index alib::bitbuffer::BitRWBase::GetIndex ( ) const
inline

Returns a copy of the current index in the bit buffer in respect to writing or reading progress of derived classes BitWriter BitReader. Such index elements may be passed to methods BitWriter::Reset(const BitBufferBase::Index&) and BitReader::Reset(const BitBufferBase::Index&)

Returns
The index of the next bit to write.

Definition at line 627 of file bitbuffer.inl.

◆ RemainingSize()

uinteger alib::bitbuffer::BitRWBase::RemainingSize ( ) const
inline

Invokes BitBufferBase::RemainingSize on the internal bit buffer, passing the result of GetIndex.

Returns
The number of bits dived by 8 remaining in this buffer.

Definition at line 642 of file bitbuffer.inl.

◆ Usage()

uinteger alib::bitbuffer::BitRWBase::Usage ( ) const
inline

Invokes BitBufferBase::Index::CountBits on the index returned by GetIndex.

Returns
The number of bits currently read from or written to the buffer.

Definition at line 634 of file bitbuffer.inl.


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