Gazebo Sim

API Reference

7.9.0
gz/sim/SystemLoader.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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 #ifndef GZ_SIM_SYSTEMLOADER_HH_
18 #define GZ_SIM_SYSTEMLOADER_HH_
19 
20 #include <list>
21 #include <memory>
22 #include <optional>
23 #include <string>
24 
25 #include <sdf/Element.hh>
26 #include <sdf/Plugin.hh>
27 
28 #include <gz/sim/Export.hh>
29 #include <gz/sim/System.hh>
31 
32 namespace gz
33 {
34  namespace sim
35  {
36  // Inline bracket to help doxygen filtering.
37  inline namespace GZ_SIM_VERSION_NAMESPACE {
38  // Forward declarations.
39  class GZ_SIM_HIDDEN SystemLoaderPrivate;
40 
43  class GZ_SIM_VISIBLE SystemLoader
44  {
46  public: explicit SystemLoader();
47 
49  public: ~SystemLoader();
50 
53  public: void AddSystemPluginPath(const std::string &_path);
54 
59  public: std::optional<SystemPluginPtr> GZ_DEPRECATED(7) LoadPlugin(
60  const sdf::ElementPtr &_sdf);
61 
68  public: std::optional<SystemPluginPtr> GZ_DEPRECATED(7) LoadPlugin(
69  const std::string &_filename,
70  const std::string &_name,
71  const sdf::ElementPtr &_sdf);
72 
76  public: std::optional<SystemPluginPtr> LoadPlugin(
77  const sdf::Plugin &_plugin);
78 
81  public: std::string PrettyStr() const;
82 
85  public: std::list<std::string> PluginPaths() const;
86 
88  private: std::unique_ptr<SystemLoaderPrivate> dataPtr;
89  };
90  }
92  }
93 }
94 #endif // GZ_SIM_SYSTEMLOADER_HH_