MySQL  8.0.17
Source Code Documentation
mysql_component.h
Go to the documentation of this file.
1 /* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2 
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6 
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef MYSQL_COMPONENT_H
24 #define MYSQL_COMPONENT_H
25 
27 #include <vector>
28 #include "my_metadata.h"
29 
30 /**
31  Wraps st_mysql_component_t component data conforming ABI into C++ object.
32 */
33 class mysql_component : public my_metadata {
34  public:
35  mysql_component(mysql_component_t *component_data, my_string urn);
36 
37  const char *name_c_str() const;
38  const char *urn_c_str() const;
39  const my_string &get_urn() const;
40 
41  std::vector<const mysql_service_ref_t *> get_provided_services() const;
42  std::vector<mysql_service_placeholder_ref_t *> get_required_services() const;
43 
44  const mysql_component_t *get_data() const;
45 
46  private:
49 };
50 
51 #endif /* MYSQL_COMPONENT_H */
const char * urn_c_str() const
Gets original URN used to load this component.
Definition: mysql_component.cc:52
const mysql_component_t * get_data() const
Gets underlaying component data structure.
Definition: mysql_component.cc:98
The metadata class used by both the registry and the dynamic loader services to store and manage meta...
Definition: my_metadata.h:39
my_string m_urn
Definition: mysql_component.h:48
Carries information on the specific Component, all Service Implementations it provides, all its requirements and metadata.
Definition: dynamic_loader.h:259
std::vector< mysql_service_placeholder_ref_t * > get_required_services() const
Gets list of services required by this component to work.
Definition: mysql_component.cc:83
mysql_component(mysql_component_t *component_data, my_string urn)
Definition: mysql_component.cc:28
const char * name_c_str() const
Gets name of this component.
Definition: mysql_component.cc:43
mysql_component_t * m_component_data
Definition: mysql_component.h:47
std::string my_string
Definition: dynamic_loader_path_filter.cc:36
std::vector< const mysql_service_ref_t * > get_provided_services() const
Gets list of all service implementations provided by this component.
Definition: mysql_component.cc:68
Wraps st_mysql_component_t component data conforming ABI into C++ object.
Definition: mysql_component.h:33
const my_string & get_urn() const
Gets original URN used to load this component.
Definition: mysql_component.cc:60