MySQL 9.0.0
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, 2024, 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 designed to work 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 either included with
17 the program or referenced in the documentation.
18
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License, version 2.0, for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software
26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27*/
28
29#include <map>
30#include <string>
31
32class String;
33
34namespace options_parser {
35
36/**
37 Parses options string into a map of keys and values, raises
38 an error if parsing is unsuccessful.
39
40 @param str unparsed options string
41 @param map map to fill with keys and values
42 @param func_name function name used in error reporting
43
44 @retval false parsing was successful
45 @retval true parsing was successful
46*/
47bool parse_string(String *str, std::map<std::string, std::string> *map,
48 const char *func_name);
49
50} // namespace options_parser
51
52#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:167
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
Definition: options_parser.cc:40
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:338
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2893