Ignition Plugin

API Reference

1.2.1
Info.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 
19 #ifndef IGNITION_PLUGIN_INFO_HH_
20 #define IGNITION_PLUGIN_INFO_HH_
21 
22 #include <functional>
23 #include <memory>
24 #include <set>
25 #include <string>
26 #include <unordered_map>
27 
28 #include <ignition/utilities/SuppressWarning.hh>
29 
30 #include <ignition/plugin/Export.hh>
31 
32 namespace ignition
33 {
34  namespace plugin
35  {
38  //
40  const int INFO_API_VERSION = 1;
41 
42  // We use an inline namespace to assist in forward-compatibility. Eventually
43  // we may want to support a version-2 of the Info API, in which case
44  // we will remove the "inline" declaration here, and create a new inline
45  // namespace called "v2". This original Info object will continue to
46  // be accessible for backwards compatibility, and even its symbol name in
47  // the ABI should remain the same.
48  inline namespace v1
49  {
51  struct IGNITION_PLUGIN_VISIBLE Info
52  {
54  void Clear();
55 
57  IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
59  IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
60 
62  IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
64  IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
65 
71  IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
72  using InterfaceCastingMap =
74  InterfaceCastingMap interfaces;
75  IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
76 
82  IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
84  IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
85 
87  IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
89  IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
90 
92  IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
94  IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
95  };
96  }
97 
102  }
103 }
104 
105 #endif
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING std::set< std::string > aliases
Alternative names that may be used to instantiate the plugin.
Definition: Info.hh:63
InterfaceCastingMap interfaces
Definition: Info.hh:74
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING std::set< std::string > demangledInterfaces
This is a set containing the demangled versions of the names of the interfaces provided by this plugi...
Definition: Info.hh:83
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING std::function< void *()> factory
A method that instantiates a new instance of a plugin.
Definition: Info.hh:88
STL class.
Holds info required to construct a plugin.
Definition: Info.hh:51
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING std::function< void(void *)> deleter
A method that safely deletes an instance of the plugin.
Definition: Info.hh:93
IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING std::string name
The name of the plugin.
Definition: Info.hh:58
Definition: EnablePluginFromThis.hh:25
const int INFO_API_VERSION
sentinel value to check if a plugin was built with the same version of the Info struct ...
Definition: Info.hh:40