Gazebo Rendering

API Reference

3.7.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/common/SuppressWarning.hh>
27 #include "gz/rendering/config.hh"
28 #include "gz/rendering/Export.hh"
29 
30 namespace ignition
31 {
32  namespace rendering
33  {
34  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
35  //
36  // forward declarations.
37  class RenderEngine;
38  class RenderEngineManagerPrivate;
39 
46  class IGNITION_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 
142 
144  private: friend class gz::common::SingletonT<RenderEngineManager>;
145  };
146  }
147  }
148 }
149 #endif
std::vector< std::string > LoadedEngines() const
Get the list of all engines already loaded.
bool UnloadEngine(const std::string &_name)
Unload the render-engine with the given name. If the no render-engine is registered under the given n...
void UnregisterEngineAt(unsigned int _index)
Unregister a render-engine at the given index. If the no render-engine is registered at the given ind...
bool UnloadEngineAt(unsigned int _index)
Unload the render-engine at the given index. If the no render-engine is registered under the given na...
STL class.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
STL class.
void SetPluginPaths(const std::list< std::string > &_paths)
Set the plugin paths from which render engines can be loaded.
unsigned int EngineCount() const
Get the number of available render-engines.
void UnregisterEngine(const std::string &_name)
Unregister a render-engine registered under the given name. If no render-engine is registered under t...
bool HasEngine(const std::string &_name) const
Determine if a render-engine with the given name is avaiable. It also checks the list of default engi...
RenderEngine * Engine(const std::string &_name, const std::map< std::string, std::string > &_params={}, const std::string &_path="")
Get the render-engine with the given name. If the no render-engine is registered under the given name...
STL class.
bool IsEngineLoaded(const std::string &_name) const
Determine if a render-engine with the given name is already loaded.
RenderEngine * EngineAt(unsigned int _index, const std::map< std::string, std::string > &_params={}, const std::string &_path="")
Get the render-engine at the given index. If no render-engine is exists at the given index,...
An abstract interface to a concrete render-engine. A RenderEngine is responsible for initializing a r...
Definition: gz/rendering/RenderEngine.hh:36
Collection of render-engines. This provides access to all the render-engines available at runtime....
Definition: gz/rendering/RenderEngineManager.hh:46
void RegisterEngine(const std::string &_name, RenderEngine *_engine)
Register a new render-engine under the given name. If the given name is already in use,...
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING