Gazebo Rendering

API Reference

7.4.2
gz/rendering/RenderEngineManager.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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_RENDERING_RENDERENGINEMANAGER_HH_
18 #define GZ_RENDERING_RENDERENGINEMANAGER_HH_
19 
20 #include <list>
21 #include <map>
22 #include <memory>
23 #include <string>
24 #include <vector>
25 #include <gz/common/SingletonT.hh>
26 #include <gz/utils/SuppressWarning.hh>
27 #include "gz/rendering/config.hh"
28 #include "gz/rendering/Export.hh"
29 
30 namespace gz
31 {
32  namespace rendering
33  {
34  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
35  //
36  // forward declarations.
37  class RenderEngine;
38  class RenderEngineManagerPrivate;
39 
46  class GZ_RENDERING_VISIBLE RenderEngineManager :
47  public virtual common::SingletonT<RenderEngineManager>
48  {
50  public: RenderEngineManager();
51 
53  public: ~RenderEngineManager();
54 
57  public: unsigned int EngineCount() const;
58 
63  public: bool HasEngine(const std::string &_name) const;
64 
69  public: bool IsEngineLoaded(const std::string &_name) const;
70 
73  public: std::vector<std::string> LoadedEngines() const;
74 
82  public: RenderEngine *Engine(const std::string &_name,
83  const std::map<std::string, std::string> &_params = {},
84  const std::string &_path = "");
85 
92  public: RenderEngine *EngineAt(unsigned int _index,
93  const std::map<std::string, std::string> &_params = {},
94  const std::string &_path = "");
95 
101  public: bool UnloadEngine(const std::string &_name);
102 
108  public: bool UnloadEngineAt(unsigned int _index);
109 
115  public: void RegisterEngine(const std::string &_name,
116  RenderEngine *_engine);
117 
122  public: void UnregisterEngine(const std::string &_name);
123 
127  public: void UnregisterEngine(RenderEngine *_engine);
128 
132  public: void UnregisterEngineAt(unsigned int _index);
133 
136  public: void SetPluginPaths(const std::list<std::string> &_paths);
137 
141  public: static RenderEngineManager *Instance();
142 
143  GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
146  GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
147 
150  };
151  }
152  }
153 }
154 #endif