Gazebo Plugin

API Reference

3.0.0
Loader.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 GZ_PLUGIN_LOADER_HH_
20#define GZ_PLUGIN_LOADER_HH_
21
22#include <memory>
23#include <set>
24#include <string>
25#include <typeinfo>
26#include <unordered_set>
27
28#include <gz/utils/SuppressWarning.hh>
29
30#include <gz/plugin/loader/Export.hh>
32
33namespace gz
34{
35 namespace plugin
36 {
39 {
41 public: Loader();
42
44 public: ~Loader();
45
49 public: std::string PrettyStr() const;
50
56
60 public: template <typename Interface>
62
84 const bool _demangled = true) const;
85
90
105 const std::string &_alias) const;
106
114 const std::string &_pluginName) const;
115
126
135
146
154 const std::string &_pluginNameOrAlias) const;
155
167 public: template <typename PluginPtrType>
169
193 public: template <typename InterfaceType>
195 const std::string &_pluginNameOrAlias) const;
196
222
232
240 private: std::string PrivateLookupFilePlugin(
241 const std::string &_nameOrAlias) const;
242
253 private: ConstInfoPtr PrivateGetInfoForFilePlugin(
254 const std::string &_resolvedName) const;
255
263 private: std::string PrivateLookupStaticPlugin(
264 const std::string &_nameOrAlias) const;
265
276 private: ConstInfoPtr PrivateGetInfoForStaticPlugin(
277 const std::string &_resolvedName) const;
278
288 private: std::shared_ptr<void> PrivateGetPluginDlHandlePtr(
289 const std::string &_resolvedName) const;
290
291 class Implementation;
294 private: std::unique_ptr<Implementation> dataPtr;
296 };
297 }
298}
299
300#include <gz/plugin/detail/Loader.hh>
301
302#endif