![]() |
MySQL 8.2.0
Source Code Documentation
|
Option class to get string parameter value and set to char* type object. More...
#include <char_array_option.h>
Public Member Functions | |
Char_array_option (char **value, bool allocated, std::string name, std::string description) | |
Constructs new string option. More... | |
Char_array_option * | set_value (char *value) |
Sets value for this option. More... | |
![]() | |
char * * | value_optional () |
Sets arg_type to OPT_ARG - doesn't require argument to be specified when using this option. More... | |
![]() | |
~Abstract_option () override | |
void | add_callback (std::function< void(char *)> *callback) |
Adds new callback for this option for option_parsed() event to callback chain. More... | |
T_type * | set_short_character (char code) |
Sets optid to given character to make possible usage of short option alternative. More... | |
![]() | |
virtual | ~I_option () |
Additional Inherited Members | |
![]() | |
Abstract_value_option (void *value, ulong var_type, std::string name, std::string description, uint64 default_value) | |
Constructs new option with value argument. More... | |
![]() | |
Abstract_option (void *value, ulong var_type, std::string name, std::string description, longlong default_value) | |
Constructs new option. More... | |
my_option | get_my_option () override |
Returns my_getopt internal option data structure representing this option. More... | |
void | set_option_changed_listener (I_option_changed_listener *listener) override |
Method to set listener on option changed events. More... | |
![]() | |
my_option | m_option_structure |
![]() | |
static uint32 | last_optid = 256 |
Option class to get string parameter value and set to char* type object.
Char_array_option::Char_array_option | ( | char ** | value, |
bool | allocated, | ||
std::string | name, | ||
std::string | description | ||
) |
Constructs new string option.
value | Pointer to char* object to receive option value. |
allocated | Specifies if value set should be some static string or dynamically allocated string with my_strdup. |
name | Name of option. It is used in command line option name as –name. |
description | Description of option to be printed in –help. |
Char_array_option * Char_array_option::set_value | ( | char * | value | ) |
Sets value for this option.
If it is specified before handling commandline options then supplied value is used as default value of this option.