MySQL 8.0.39
Source Code Documentation
|
Auxiliary class to write a stream of bits to a memory location. More...
#include <rpl_record.h>
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... | |
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.
|
inline |
|
inline |
|
inline |
Write the next bit and move the write position one bit forward.
set_to_on | If true, set the bit to 1, otherwise set it to 0. |