MySQL 9.1.0
Source Code Documentation
my_metadata Class Reference

The metadata class used by both the registry and the dynamic loader services to store and manage metadata information related to specified objects. More...

#include <my_metadata.h>

Inheritance diagram for my_metadata:
[legend]

Classes

class  const_iterator
 The data type of the iterator used. More...
 

Public Member Functions

 my_metadata ()
 
 my_metadata (my_metadata &other)
 
bool set_value (const char *name, const char *value)
 Sets a value for the name specified. More...
 
bool get_value (const char *name, const char **value)
 Gets value for the name specified. More...
 
const_iterator create_iterator ()
 Creates an iterator over the metadata. More...
 

Static Public Member Functions

static bool release_iterator (const_iterator *iter)
 Frees an iterator over the metadata. More...
 

Protected Attributes

my_unordered_string_to_string_map data
 

Detailed Description

The metadata class used by both the registry and the dynamic loader services to store and manage metadata information related to specified objects.

Constructor & Destructor Documentation

◆ my_metadata() [1/2]

my_metadata::my_metadata ( )
default

◆ my_metadata() [2/2]

my_metadata::my_metadata ( my_metadata other)
default

Member Function Documentation

◆ create_iterator()

my_metadata::const_iterator my_metadata::create_iterator ( )

Creates an iterator over the metadata.

Positions on the first value.

Returns
Reference to the iterator created.

◆ get_value()

bool my_metadata::get_value ( const char *  name,
const char **  value 
)

Gets value for the name specified.

The value is unmodified if not found. Doesn't copy the result value, so it requires synchronization to prevent other threads to modify structure.

Parameters
nameThe name string of the metadata pair.
[out]valueThe value string of the metadata pair.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

◆ release_iterator()

bool my_metadata::release_iterator ( const_iterator iter)
static

Frees an iterator over the metadata.

Iterator must be allocated through create_iterator();

Parameters
iterPointer to the iterator to release.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

◆ set_value()

bool my_metadata::set_value ( const char *  name,
const char *  value 
)

Sets a value for the name specified.

Adds to the metadata list if absent. Copies the data into the structure, original values don't need to be around after this function is called.

Parameters
nameThe name string of the metadata pair to be added.
valueThe value string of the metadata pair.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

Member Data Documentation

◆ data

my_unordered_string_to_string_map my_metadata::data
protected

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