MySQL 8.4.2
Source Code Documentation
Blob Class Reference

Class representing a region of memory (e.g., a string or binary buffer). More...

#include <common.h>

Public Member Functions

 Blob ()
 
 Blob (const byte *ptr, const size_t len)
 
 Blob (const char *str)
 
byteptr () const
 
size_t len () const
 
byteoperator[] (unsigned pos) const
 
bool is_null () const
 
void trim (size_t l)
 

Private Attributes

bytem_ptr
 Pointer to the first byte of the memory region. More...
 
size_t m_len
 Length of the memory region. More...
 

Detailed Description

Class representing a region of memory (e.g., a string or binary buffer).

Note
This class does not allocate memory. It merely describes a region of memory which must be allocated externally (if it is dynamic memory).

Constructor & Destructor Documentation

◆ Blob() [1/3]

Blob::Blob ( )
inline

◆ Blob() [2/3]

Blob::Blob ( const byte ptr,
const size_t  len 
)
inline

◆ Blob() [3/3]

Blob::Blob ( const char *  str)
inlineexplicit

Member Function Documentation

◆ is_null()

bool Blob::is_null ( ) const
inline

◆ len()

size_t Blob::len ( ) const
inline

◆ operator[]()

byte & Blob::operator[] ( unsigned  pos) const
inline

◆ ptr()

byte * Blob::ptr ( ) const
inline

◆ trim()

void Blob::trim ( size_t  l)
inline

Member Data Documentation

◆ m_len

size_t Blob::m_len
private

Length of the memory region.

◆ m_ptr

byte* Blob::m_ptr
private

Pointer to the first byte of the memory region.


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