Castor3D  ..
Public Member Functions | List of all members
Castor3D::PluginManager Class Reference

Plug-ins manager. More...

+ Inheritance diagram for Castor3D::PluginManager:
+ Collaboration diagram for Castor3D::PluginManager:

Public Member Functions

C3D_API PluginManager (Engine &p_engine)
 Constructor. More...
 
C3D_API ~PluginManager ()
 Destructor. More...
 
C3D_API void Cleanup ()
 Sets all the elements to be cleaned up. More...
 
C3D_API void Clear ()
 Flushes the collection. More...
 
C3D_API PluginBaseSPtr LoadPlugin (Castor::String const &p_pluginName, Castor::Path const &p_pathFolder) throw ()
 Loads a plug-in, given the plug-in name (ex: libGlRenderSystem.dll => GlRenderSystem) More...
 
C3D_API PluginBaseSPtr LoadPlugin (Castor::Path const &p_fileFullPath) throw ()
 Loads a plug-in, given the plug-in file's full path. More...
 
C3D_API PluginStrMap GetPlugins (ePLUGIN_TYPE p_type)
 Retrieves the plug-ins of given type. More...
 
C3D_API RenderSystemLoadRenderer (eRENDERER_TYPE p_type)
 Loads a renderer plug-in, given the renderer type. More...
 
C3D_API void LoadAllPlugins (Castor::Path const &p_folder)
 Loads all the plug-ins located in working folder. More...
 
RendererPtrArray const & GetRenderersList () const
 Retrieves an iterator on the renderer plug-ins array. More...
 
- Public Member Functions inherited from Castor3D::Manager< Castor::Path, PluginBase, Engine, ResourceManagerEngineGetter >
void Cleanup ()
 Sets all the elements to be cleaned up. More...
 
void Clear ()
 Flushes the collection. More...
 
bool IsEmpty ()
 
void Insert (Castor::Path const &p_name, std::shared_ptr< PluginBase > p_element)
 Removes an object, given a name. More...
 
void Remove (Castor::Path const &p_name)
 Removes an object, given a name. More...
 
void SetRenderSystem (RenderSystem *p_renderSystem)
 
RenderSystemSetRenderSystem () const
 
EngineGetEngine () const
 
Castor::String const & GetObjectTypeName () const
 
bool Has (Castor::Path const &p_name) const
 
std::shared_ptr< PluginBaseFind (Castor::Path const &p_name) const
 Looks for an element with given name. More...
 
void lock () const
 Locks the collection mutex. More...
 
void unlock () const
 Unlocks the collection mutex. More...
 
Collection::TObjPtrMapIt begin ()
 Returns an iterator to the first element of the collection. More...
 
Collection::TObjPtrMapConstIt begin () const
 Returns an constant iterator to the first element of the collection. More...
 
Collection::TObjPtrMapIt end ()
 Returns an iterator to the after last element of the collection. More...
 
Collection::TObjPtrMapConstIt end () const
 Returns an constant iterator to the after last element of the collection. More...
 
std::shared_ptr< PluginBaseCreate (Castor::Path const &p_name, Parameters &&... p_params)
 Creates an object. More...
 

Additional Inherited Members

- Public Types inherited from Castor3D::Manager< Castor::Path, PluginBase, Engine, ResourceManagerEngineGetter >
typedef Castor::Collection< PluginBase, Castor::Path > Collection
 
- Protected Member Functions inherited from Castor3D::ResourceManager< Castor::Path, PluginBase >
 ResourceManager (Engine &p_owner)
 Constructor. More...
 
 ~ResourceManager ()
 Destructor. More...
 
- Protected Member Functions inherited from Castor3D::Manager< Castor::Path, PluginBase, Engine, ResourceManagerEngineGetter >
 Manager (Engine &p_owner)
 Constructor. More...
 
 ~Manager ()
 Destructor. More...
 
- Protected Attributes inherited from Castor3D::Manager< Castor::Path, PluginBase, Engine, ResourceManagerEngineGetter >
RenderSystemm_renderSystem
 The RenderSystem. More...
 
Collection m_elements
 The elements collection. More...
 

Detailed Description

Plug-ins manager.

Author
Sylvain DOREMUS
Date
13/10/2015
Version
0.8.0

Constructor & Destructor Documentation

◆ PluginManager()

C3D_API Castor3D::PluginManager::PluginManager ( Engine p_engine)

Constructor.

Parameters
[in]p_engineThe engine.

◆ ~PluginManager()

C3D_API Castor3D::PluginManager::~PluginManager ( )

Destructor.

Member Function Documentation

◆ Cleanup()

C3D_API void Castor3D::PluginManager::Cleanup ( )

Sets all the elements to be cleaned up.

◆ Clear()

C3D_API void Castor3D::PluginManager::Clear ( )

Flushes the collection.

◆ GetPlugins()

C3D_API PluginStrMap Castor3D::PluginManager::GetPlugins ( ePLUGIN_TYPE  p_type)

Retrieves the plug-ins of given type.

Parameters
[in]p_typeThe plug-ins type
Returns
nullptr if not found

◆ GetRenderersList()

RendererPtrArray const& Castor3D::PluginManager::GetRenderersList ( ) const
inline

Retrieves an iterator on the renderer plug-ins array.

Returns
The iterator

◆ LoadAllPlugins()

C3D_API void Castor3D::PluginManager::LoadAllPlugins ( Castor::Path const &  p_folder)

Loads all the plug-ins located in working folder.

Parameters
[in]p_folderThe plug-ins' folder

◆ LoadPlugin() [1/2]

C3D_API PluginBaseSPtr Castor3D::PluginManager::LoadPlugin ( Castor::String const &  p_pluginName,
Castor::Path const &  p_pathFolder 
)
throw (
)

Loads a plug-in, given the plug-in name (ex: libGlRenderSystem.dll => GlRenderSystem)

Parameters
[in]p_pluginNameThe plug-in name
[in]p_pathFolderOptional path where the plug-in may be looked for
Returns
The loaded plug-in, nullptr if name was incorrect or path was not valid

◆ LoadPlugin() [2/2]

C3D_API PluginBaseSPtr Castor3D::PluginManager::LoadPlugin ( Castor::Path const &  p_fileFullPath)
throw (
)

Loads a plug-in, given the plug-in file's full path.

Parameters
[in]p_fileFullPathThe plug-in file path
Returns
The loaded plug-in, nullptr if path was incorrect or if it wasn't a valid plug-in

◆ LoadRenderer()

C3D_API RenderSystem* Castor3D::PluginManager::LoadRenderer ( eRENDERER_TYPE  p_type)

Loads a renderer plug-in, given the renderer type.

Parameters
[in]p_typeThe renderer type
Returns
true if ok

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