MySQL 9.1.0
Source Code Documentation
MY_CHARSET_LOADER Class Referenceabstract

User-specified callback interface for collation parser/initializer. More...

#include <m_ctype.h>

Inheritance diagram for MY_CHARSET_LOADER:
[legend]

Public Member Functions

 MY_CHARSET_LOADER ()=default
 
virtual ~MY_CHARSET_LOADER ()
 
 MY_CHARSET_LOADER (const MY_CHARSET_LOADER &)=delete
 
 MY_CHARSET_LOADER (const MY_CHARSET_LOADER &&)=delete
 
MY_CHARSET_LOADERoperator= (const MY_CHARSET_LOADER &)=delete
 
MY_CHARSET_LOADERoperator= (const MY_CHARSET_LOADER &&)=delete
 
virtual void reporter (enum loglevel loglevel, unsigned errcode,...)=0
 Intercepts error messages from collation parser/initializer. More...
 
virtual void * read_file (const char *path, size_t *size)=0
 Loads a file by its OS path into collation parser/initializer. More...
 
int add_collation (CHARSET_INFO *cs)
 Collation parser helper function (not overloadable). More...
 
virtual void * once_alloc (size_t)
 Allocate-and-forget version of malloc(). More...
 
virtual void * mem_malloc (size_t size)
 
virtual void mem_free (void *ptr)
 

Private Attributes

std::deque< void * > m_delete_list
 

Detailed Description

User-specified callback interface for collation parser/initializer.

Constructor & Destructor Documentation

◆ MY_CHARSET_LOADER() [1/3]

MY_CHARSET_LOADER::MY_CHARSET_LOADER ( )
default

◆ ~MY_CHARSET_LOADER()

MY_CHARSET_LOADER::~MY_CHARSET_LOADER ( )
virtual

◆ MY_CHARSET_LOADER() [2/3]

MY_CHARSET_LOADER::MY_CHARSET_LOADER ( const MY_CHARSET_LOADER )
delete

◆ MY_CHARSET_LOADER() [3/3]

MY_CHARSET_LOADER::MY_CHARSET_LOADER ( const MY_CHARSET_LOADER &&  )
delete

Member Function Documentation

◆ add_collation()

int MY_CHARSET_LOADER::add_collation ( CHARSET_INFO cs)

Collation parser helper function (not overloadable).

Parameters
csNew collation object to register in the collation library
Returns
MY_XML_OK on success, otherwise MY_XML_ERROR

◆ mem_free()

virtual void MY_CHARSET_LOADER::mem_free ( void *  ptr)
inlinevirtual

◆ mem_malloc()

virtual void * MY_CHARSET_LOADER::mem_malloc ( size_t  size)
inlinevirtual

◆ once_alloc()

void * MY_CHARSET_LOADER::once_alloc ( size_t  size)
virtual

Allocate-and-forget version of malloc().

Reimplemented in anonymous_namespace{charset.cc}::Mysys_charset_loader.

◆ operator=() [1/2]

MY_CHARSET_LOADER & MY_CHARSET_LOADER::operator= ( const MY_CHARSET_LOADER &&  )
delete

◆ operator=() [2/2]

MY_CHARSET_LOADER & MY_CHARSET_LOADER::operator= ( const MY_CHARSET_LOADER )
delete

◆ read_file()

virtual void * MY_CHARSET_LOADER::read_file ( const char *  path,
size_t *  size 
)
pure virtual

Loads a file by its OS path into collation parser/initializer.

Parameters
path'\0'-terminated file path to load
sizeByte size of path
Returns
Pointer to file data on success, otherwise nullptr. This is a caller's responsibility to free this pointer with free().

Implemented in anonymous_namespace{collations_internal.cc}::Charset_loader, anonymous_namespace{charset.cc}::Mysys_charset_loader, and Loader.

◆ reporter()

virtual void MY_CHARSET_LOADER::reporter ( enum loglevel  loglevel,
unsigned  errcode,
  ... 
)
pure virtual

Intercepts error messages from collation parser/initializer.

Parameters
loglevelERROR_LEVEL or WARNING_LEVEL
errcodeSee include/mysys_err.h

Implemented in anonymous_namespace{collations_internal.cc}::Charset_loader, and Loader.

Member Data Documentation

◆ m_delete_list

std::deque<void *> MY_CHARSET_LOADER::m_delete_list
private

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