Ocean
Ocean::Rendering::Manager Class Reference

This class manages all scene graphs. More...

Inheritance diagram for Ocean::Rendering::Manager:

Data Structures

class  EngineInformation
 Class holding engine informations. More...
 

Public Types

typedef std::vector< std::string > EngineNames
 Definition of a vector holding engine names. More...
 

Public Member Functions

EngineRef engine (const std::string &engine=std::string(), const Engine::GraphicAPI graphicAPI=Engine::API_DEFAULT)
 Returns a render engine of a specific scene graph. More...
 
EngineNames engines ()
 Returns all names of registered engines. More...
 
Engine::GraphicAPI supportedGraphicAPI (const std::string &engine)
 Returns the graphic API supported by a specified engine. More...
 
void release ()
 Releases all registered rendering engines. More...
 

Private Types

typedef std::multimap< unsigned int, EngineInformationEngineMap
 Definition of a map mapping rendering engine priorities to engine information objects. More...
 

Private Member Functions

virtual ~Manager ()
 Destructs the manager. More...
 
void registerEngine (const std::string &engineName, const Engine::CreateCallback &callback, const Engine::GraphicAPI graphicAPI, const unsigned int priority)
 Registers a new render engine. More...
 
bool unregisterEngine (const std::string &engine)
 Unregisters a render engine. More...
 
void onRemoveEngine (const Engine *engine)
 Callback function to inform this manager that an engine is not in use anymore. More...
 

Private Attributes

EngineMap engineMap_
 Registered engines. More...
 
Lock lock_
 Manager lock. More...
 

Friends

class Engine
 
class Singleton< Manager >
 

Additional Inherited Members

- Static Public Member Functions inherited from Ocean::Singleton< Manager >
static Manager & get ()
 Returns a reference to the unique object. More...
 
- Protected Member Functions inherited from Ocean::Singleton< Manager >
 Singleton ()=default
 Default constructor. More...
 

Detailed Description

This class manages all scene graphs.


Use this manager to receive a specific render engine.

Member Typedef Documentation

◆ EngineMap

typedef std::multimap<unsigned int, EngineInformation> Ocean::Rendering::Manager::EngineMap
private

Definition of a map mapping rendering engine priorities to engine information objects.

◆ EngineNames

typedef std::vector<std::string> Ocean::Rendering::Manager::EngineNames

Definition of a vector holding engine names.

Constructor & Destructor Documentation

◆ ~Manager()

virtual Ocean::Rendering::Manager::~Manager ( )
privatevirtual

Destructs the manager.

Member Function Documentation

◆ engine()

EngineRef Ocean::Rendering::Manager::engine ( const std::string &  engine = std::string(),
const Engine::GraphicAPI  graphicAPI = Engine::API_DEFAULT 
)

Returns a render engine of a specific scene graph.

If no engine name is specified one of the registered engines is returned.

Parameters
engineName of the engine to return
graphicAPIPreferred graphic API used for rendering, however there is no guarantee for this API
Returns
Specified render engine

◆ engines()

EngineNames Ocean::Rendering::Manager::engines ( )

Returns all names of registered engines.

Returns
Engine names

◆ onRemoveEngine()

void Ocean::Rendering::Manager::onRemoveEngine ( const Engine engine)
private

Callback function to inform this manager that an engine is not in use anymore.

Parameters
engineEngine which is out of use

◆ registerEngine()

void Ocean::Rendering::Manager::registerEngine ( const std::string &  engineName,
const Engine::CreateCallback callback,
const Engine::GraphicAPI  graphicAPI,
const unsigned int  priority 
)
private

Registers a new render engine.

Parameters
engineNameName of the render engine
callbackCallback function which will create the engine object requested
graphicAPIGraphic API supported by the engine
priorityPriority of this engine, if a default engine is requested the engine with higher priority will be retuned

◆ release()

void Ocean::Rendering::Manager::release ( )

Releases all registered rendering engines.

◆ supportedGraphicAPI()

Engine::GraphicAPI Ocean::Rendering::Manager::supportedGraphicAPI ( const std::string &  engine)

Returns the graphic API supported by a specified engine.

Parameters
engineName of the engine to return the graphic API for
Returns
Supported graphic API, default api if the engine is unknown

◆ unregisterEngine()

bool Ocean::Rendering::Manager::unregisterEngine ( const std::string &  engine)
private

Unregisters a render engine.

Parameters
engineName of the render engine to unregister
Returns
True, if succeeded

Friends And Related Function Documentation

◆ Engine

friend class Engine
friend

◆ Singleton< Manager >

friend class Singleton< Manager >
friend

Field Documentation

◆ engineMap_

EngineMap Ocean::Rendering::Manager::engineMap_
private

Registered engines.

◆ lock_

Lock Ocean::Rendering::Manager::lock_
private

Manager lock.


The documentation for this class was generated from the following file: