Castor3D
..
|
Plug-ins manager. More...
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 RenderSystem * | LoadRenderer (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) |
RenderSystem * | SetRenderSystem () const |
Engine * | GetEngine () const |
Castor::String const & | GetObjectTypeName () const |
bool | Has (Castor::Path const &p_name) const |
std::shared_ptr< PluginBase > | Find (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< PluginBase > | Create (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 > | |
RenderSystem * | m_renderSystem |
The RenderSystem. More... | |
Collection | m_elements |
The elements collection. More... | |
Plug-ins manager.
C3D_API Castor3D::PluginManager::PluginManager | ( | Engine & | p_engine | ) |
Constructor.
[in] | p_engine | The engine. |
C3D_API Castor3D::PluginManager::~PluginManager | ( | ) |
Destructor.
C3D_API void Castor3D::PluginManager::Cleanup | ( | ) |
Sets all the elements to be cleaned up.
C3D_API void Castor3D::PluginManager::Clear | ( | ) |
Flushes the collection.
C3D_API PluginStrMap Castor3D::PluginManager::GetPlugins | ( | ePLUGIN_TYPE | p_type | ) |
Retrieves the plug-ins of given type.
[in] | p_type | The plug-ins type |
nullptr
if not found
|
inline |
Retrieves an iterator on the renderer plug-ins array.
C3D_API void Castor3D::PluginManager::LoadAllPlugins | ( | Castor::Path const & | p_folder | ) |
Loads all the plug-ins located in working folder.
[in] | p_folder | The plug-ins' folder |
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)
[in] | p_pluginName | The plug-in name |
[in] | p_pathFolder | Optional path where the plug-in may be looked for |
nullptr
if name was incorrect or path was not valid C3D_API PluginBaseSPtr Castor3D::PluginManager::LoadPlugin | ( | Castor::Path const & | p_fileFullPath | ) | |
throw | ( | ||||
) |
Loads a plug-in, given the plug-in file's full path.
[in] | p_fileFullPath | The plug-in file path |
nullptr
if path was incorrect or if it wasn't a valid plug-in C3D_API RenderSystem* Castor3D::PluginManager::LoadRenderer | ( | eRENDERER_TYPE | p_type | ) |
Loads a renderer plug-in, given the renderer type.
[in] | p_type | The renderer type |
true
if ok