MySQL 8.3.0
Source Code Documentation
composite_options_provider.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2014, 2023, 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 also distributed 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 included with MySQL.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23*/
24
25#ifndef COMPOSITE_OPTIONS_PROVIDER_INCLUDED
26#define COMPOSITE_OPTIONS_PROVIDER_INCLUDED
27
30
31namespace Mysql {
32namespace Tools {
33namespace Base {
34namespace Options {
35
36/**
37 Provider that aggregates options from other providers.
38 It is still a provider, so can have have own options added.
39 */
41 public:
42 /**
43 Adds new providers to list. Last parameter value must be NULL.
44 */
45 void add_providers(I_options_provider *first, /*I_options_provider* */...);
46 /**
47 Adds new provider to list.
48 */
49 void add_provider(I_options_provider *options_provider);
50
51 /**
52 This callback is to be called after all options were parsed.
53 */
54 void options_parsed() override;
55
56 /**
57 Aggregates all options from itsself and all contained providers.
58 */
59 std::vector<my_option> generate_options() override;
60
61 private:
62 std::vector<I_options_provider *> m_options_providers;
63};
64
65} // namespace Options
66} // namespace Base
67} // namespace Tools
68} // namespace Mysql
69
70#endif
Common abstract class for options providers.
Definition: abstract_options_provider.h:54
Provider that aggregates options from other providers.
Definition: composite_options_provider.h:40
std::vector< my_option > generate_options() override
Aggregates all options from itsself and all contained providers.
Definition: composite_options_provider.cc:71
void options_parsed() override
This callback is to be called after all options were parsed.
Definition: composite_options_provider.cc:63
void add_provider(I_options_provider *options_provider)
Adds new provider to list.
Definition: composite_options_provider.cc:57
std::vector< I_options_provider * > m_options_providers
Definition: composite_options_provider.h:62
void add_providers(I_options_provider *first,...)
Adds new providers to list.
Definition: composite_options_provider.cc:37
Interface for basic options providers functionality.
Definition: i_options_provider.h:41
constexpr pos_type Options
Definition: http_request.h:260
Definition: abstract_connection_program.h:39