MySQL  8.0.26
Source Code Documentation
Gcs_interface_parameters Class Reference

This class is to be used to provide parameters to bindings in a transparent and generic way. More...

#include <gcs_types.h>

Public Member Functions

void add_parameter (const std::string &name, const std::string &value)
 Adds a parameter to the parameter catalog. More...
 
const std::string * get_parameter (const std::string &name) const
 Retrieves a parameter from the object. More...
 
bool check_parameters (const std::vector< std::string > &params) const
 Check whether any of the paramters were provided. More...
 
bool check_parameters (const char *params[], int size) const
 Check whether any of the parameters were provided. More...
 
void add_parameters_from (const Gcs_interface_parameters &p)
 Adds the parameters provided to the existing set of parameters. More...
 
void clear ()
 Clears all parameters. More...
 
 Gcs_interface_parameters ()
 
virtual ~Gcs_interface_parameters ()=default
 

Private Attributes

std::map< std::string, std::string > parameters
 

Detailed Description

This class is to be used to provide parameters to bindings in a transparent and generic way.

Each binding must document which parameters it needs and it is the responsibility of the client to provide them at initialize() time.

Constructor & Destructor Documentation

◆ Gcs_interface_parameters()

Gcs_interface_parameters::Gcs_interface_parameters ( )
inline

◆ ~Gcs_interface_parameters()

virtual Gcs_interface_parameters::~Gcs_interface_parameters ( )
virtualdefault

Member Function Documentation

◆ add_parameter()

void Gcs_interface_parameters::add_parameter ( const std::string &  name,
const std::string &  value 
)

Adds a parameter to the parameter catalog.

If the value already exists, it is overridden by the new one.

Parameters
namethe name of the parameter
valuevalue of the parameter

◆ add_parameters_from()

void Gcs_interface_parameters::add_parameters_from ( const Gcs_interface_parameters p)
inline

Adds the parameters provided to the existing set of parameters.

Parameters
pParameters to add.

◆ check_parameters() [1/2]

bool Gcs_interface_parameters::check_parameters ( const char *  params[],
int  size 
) const

Check whether any of the parameters were provided.

Parameters
paramslist of parameters.
sizenumber of parameters.
Returns
True if any of the parameters is stored.

◆ check_parameters() [2/2]

bool Gcs_interface_parameters::check_parameters ( const std::vector< std::string > &  params) const

Check whether any of the paramters were provided.

Parameters
paramslist of parameters.
Returns
True if any of the parameters is stored.

◆ clear()

void Gcs_interface_parameters::clear ( )
inline

Clears all parameters.

◆ get_parameter()

const std::string * Gcs_interface_parameters::get_parameter ( const std::string &  name) const

Retrieves a parameter from the object.

Returns
a pointer to a registered value. NULL if not present

Member Data Documentation

◆ parameters

std::map<std::string, std::string> Gcs_interface_parameters::parameters
private

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