MySQL  8.0.27
Source Code Documentation
options_parser.h
Go to the documentation of this file.
1 #ifndef OPTIONS_PARSER_H_INCLUDED
2 #define OPTIONS_PARSER_H_INCLUDED
3 
4 /*
5  Copyright (c) 2016, 2021, Oracle and/or its affiliates.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License, version 2.0,
9  as published by the Free Software Foundation.
10 
11  This program is also distributed with certain software (including
12  but not limited to OpenSSL) that is licensed under separate terms,
13  as designated in a particular file or component or in included license
14  documentation. The authors of MySQL hereby grant you an additional
15  permission to link the program and your derivative works with the
16  separately licensed software that they have included with MySQL.
17 
18  This program is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License, version 2.0, for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, write to the Free Software
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 */
27 
28 #include <map>
29 #include <string>
30 
31 class String;
32 
33 namespace options_parser {
34 
35 /**
36  Parses options string into a map of keys and values, raises
37  an error if parsing is unsuccessful.
38 
39  @param str unparsed options string
40  @param map map to fill with keys and values
41  @param func_name function name used in error reporting
42 
43  @retval false parsing was successful
44  @retval true parsing was successful
45 */
46 bool parse_string(String *str, std::map<std::string, std::string> *map,
47  const char *func_name);
48 
49 } // namespace options_parser
50 
51 #endif // OPTIONS_PARSER_H_INCLUDED
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:165
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1056
Definition: options_parser.cc:39
bool parse_string(String *str, std::map< std::string, std::string > *map, const char *func_name)
Parses options string into a map of keys and values, raises an error if parsing is unsuccessful.
Definition: options_parser.cc:337