MySQL 8.4.2
Source Code Documentation
Bit_stream_base< T, UT > Class Template Reference

Template base class of Bit_reader / Bit_writer. More...

#include <rpl_record.h>

Public Member Functions

 Bit_stream_base (T *ptr)
 Construct a new Bit_stream (either reader or writer). More...
 
void set_ptr (T *ptr)
 Set the buffer pointer. More...
 
void set_ptr (UT *ptr)
 Set the buffer pointer, using an unsigned datatype. More...
 
uint tell () const
 
void dbug_print (const char *str) const
 Print all the bits before the current position to the debug trace. More...
 

Protected Attributes

T * m_ptr
 Pointer to beginning of buffer where bits are read or written. More...
 
uint m_current_bit
 Current position in buffer. More...
 

Detailed Description

template<typename T, typename UT>
class Bit_stream_base< T, UT >

Template base class of Bit_reader / Bit_writer.

Constructor & Destructor Documentation

◆ Bit_stream_base()

template<typename T , typename UT >
Bit_stream_base< T, UT >::Bit_stream_base ( T *  ptr)
inline

Construct a new Bit_stream (either reader or writer).

Parameters
ptrPointer where bits will be read or written.

Member Function Documentation

◆ dbug_print()

template<typename T , typename UT >
void Bit_stream_base< T, UT >::dbug_print ( const char *  str) const

Print all the bits before the current position to the debug trace.

Parameters
strDescriptive text that will be prefixed before the bit string.

◆ set_ptr() [1/2]

template<typename T , typename UT >
void Bit_stream_base< T, UT >::set_ptr ( T *  ptr)
inline

Set the buffer pointer.

Parameters
ptrPointer where bits will be read or written.

◆ set_ptr() [2/2]

template<typename T , typename UT >
void Bit_stream_base< T, UT >::set_ptr ( UT *  ptr)
inline

Set the buffer pointer, using an unsigned datatype.

Parameters
ptrPointer where bits will be read or written.

◆ tell()

template<typename T , typename UT >
uint Bit_stream_base< T, UT >::tell ( ) const
inline
Returns
the current position.

Member Data Documentation

◆ m_current_bit

template<typename T , typename UT >
uint Bit_stream_base< T, UT >::m_current_bit
protected

Current position in buffer.

◆ m_ptr

template<typename T , typename UT >
T* Bit_stream_base< T, UT >::m_ptr
protected

Pointer to beginning of buffer where bits are read or written.


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