MySQL
8.0.40
Source Code Documentation
help_options.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2014, 2024, Oracle and/or its affiliates.
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License, version 2.0,
6
as published by the Free Software Foundation.
7
8
This program is designed to work with certain software (including
9
but not limited to OpenSSL) that is licensed under separate terms,
10
as designated in a particular file or component or in included license
11
documentation. The authors of MySQL hereby grant you an additional
12
permission to link the program and your derivative works with the
13
separately licensed software that they have either included with
14
the program or referenced in the documentation.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License, version 2.0, for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, write to the Free Software
23
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
*/
25
26
#ifndef HELP_OPTIONS_INCLUDED
27
#define HELP_OPTIONS_INCLUDED
28
29
#include "
client/base/abstract_options_provider.h
"
30
#include "
my_compiler.h
"
31
32
namespace
Mysql
{
33
namespace
Tools {
34
namespace
Base {
35
36
class
Abtract_program;
37
38
namespace
Options
{
39
40
/**
41
Options provider providing --help option and handling usage printing.
42
*/
43
class
Help_options
:
public
Abstract_options_provider
{
44
public
:
45
/**
46
Constructs new help options provider.
47
@param program Pointer to main program class, used to collect list of all
48
options available in program.
49
*/
50
explicit
Help_options
(
Base::Abstract_program
*program);
51
/**
52
Creates all options that will be provided.
53
Implementation of Abstract_options_provider virtual method.
54
*/
55
void
create_options
()
override
;
56
/**
57
Prints program usage message.
58
*/
59
virtual
void
print_usage
();
60
61
private
:
62
void
help_callback
(
char
*argument [[maybe_unused]]);
63
void
version_callback
(
char
*argument [[maybe_unused]]);
64
65
void
print_version_line
();
66
67
Abstract_program
*
m_program
;
68
};
69
70
}
// namespace Options
71
}
// namespace Base
72
}
// namespace Tools
73
}
// namespace Mysql
74
75
#endif
abstract_options_provider.h
Mysql::Tools::Base::Abstract_program
Base class for all MySQL client tools.
Definition:
abstract_program.h:47
Mysql::Tools::Base::Options::Abstract_options_provider
Common abstract class for options providers.
Definition:
abstract_options_provider.h:55
Mysql::Tools::Base::Options::Help_options
Options provider providing –help option and handling usage printing.
Definition:
help_options.h:43
Mysql::Tools::Base::Options::Help_options::create_options
void create_options() override
Creates all options that will be provided.
Definition:
help_options.cc:47
Mysql::Tools::Base::Options::Help_options::Help_options
Help_options(Base::Abstract_program *program)
Constructs new help options provider.
Definition:
help_options.cc:45
Mysql::Tools::Base::Options::Help_options::version_callback
void version_callback(char *argument)
Definition:
help_options.cc:64
Mysql::Tools::Base::Options::Help_options::help_callback
void help_callback(char *argument)
Definition:
help_options.cc:59
Mysql::Tools::Base::Options::Help_options::print_version_line
void print_version_line()
A helper function.
Definition:
help_options.cc:70
Mysql::Tools::Base::Options::Help_options::m_program
Abstract_program * m_program
Definition:
help_options.h:67
Mysql::Tools::Base::Options::Help_options::print_usage
virtual void print_usage()
Prints program usage message.
Definition:
help_options.cc:72
my_compiler.h
Header for compiler-dependent features.
HttpMethod::Pos::Options
constexpr pos_type Options
Definition:
http_request.h:261
Mysql
Definition:
abstract_connection_program.h:38
client
base
help_options.h
Generated by
1.9.2