MySQL 9.0.0
Source Code Documentation
Bit_writer Class Reference

Auxiliary class to write a stream of bits to a memory location. More...

#include <rpl_record.h>

Inheritance diagram for Bit_writer:
[legend]

Public Member Functions

 Bit_writer (char *ptr=nullptr)
 
 Bit_writer (uchar *ptr)
 
void set (bool set_to_on)
 Write the next bit and move the write position one bit forward. More...
 
- Public Member Functions inherited from Bit_stream_base< char, uchar >
 Bit_stream_base (char *ptr)
 Construct a new Bit_stream (either reader or writer). More...
 
void set_ptr (char *ptr)
 Set the buffer pointer. More...
 
void set_ptr (uchar *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...
 

Additional Inherited Members

- Protected Attributes inherited from Bit_stream_base< char, uchar >
char * 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

Auxiliary class to write a stream of bits to a memory location.

Call set() to write a bit and move the position one bit forward.

Constructor & Destructor Documentation

◆ Bit_writer() [1/2]

Bit_writer::Bit_writer ( char *  ptr = nullptr)
inline

◆ Bit_writer() [2/2]

Bit_writer::Bit_writer ( uchar ptr)
inline

Member Function Documentation

◆ set()

void Bit_writer::set ( bool  set_to_on)
inline

Write the next bit and move the write position one bit forward.

Parameters
set_to_onIf true, set the bit to 1, otherwise set it to 0.

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