Gazebo Gazebo

API Reference

3.15.2
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_GAZEBO_SYSTEMLOADER_HH_
18 #define GZ_GAZEBO_SYSTEMLOADER_HH_
19 
20 #include <memory>
21 #include <optional>
22 #include <string>
23 
24 #include <sdf/Element.hh>
25 
26 #include <gz/sim/Export.hh>
27 #include <gz/sim/System.hh>
29 
30 namespace ignition
31 {
32  namespace gazebo
33  {
34  // Inline bracket to help doxygen filtering.
35  inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
36  // Forward declarations.
37  class IGNITION_GAZEBO_HIDDEN SystemLoaderPrivate;
38 
41  class IGNITION_GAZEBO_VISIBLE SystemLoader
42  {
44  public: explicit SystemLoader();
45 
47  public: ~SystemLoader();
48 
51  public: void AddSystemPluginPath(const std::string &_path);
52 
56  public: std::optional<SystemPluginPtr> LoadPlugin(
57  const sdf::ElementPtr &_sdf);
58 
64  public: std::optional<SystemPluginPtr> LoadPlugin(
65  const std::string &_filename,
66  const std::string &_name,
67  const sdf::ElementPtr &_sdf);
68 
71  public: std::string PrettyStr() const;
72 
74  private: std::unique_ptr<SystemLoaderPrivate> dataPtr;
75  };
76  }
78  }
79 }
80 #endif // GZ_GAZEBO_SYSTEMLOADER_HH_
81 
This library is part of the Ignition Robotics project.
STL class.
STL class.
std::string PrettyStr() const
Makes a printable string with info about systems.
class IGNITION_GAZEBO_HIDDEN SystemLoaderPrivate
Definition: gz/sim/SystemLoader.hh:37
void AddSystemPluginPath(const std::string &_path)
Add path to search for plugins.
std::optional< SystemPluginPtr > LoadPlugin(const sdf::ElementPtr &_sdf)
Load and instantiate system plugin from an SDF element.
Class for loading/unloading System plugins.
Definition: gz/sim/SystemLoader.hh:41