Castor3D 0.12.0
Multiplatform 3D engine
Public Types | Public Member Functions | List of all members
castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits > Class Referencefinal

Plug-ins cache. More...

#include <PluginCache.hpp>

Inheritance diagram for castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >:
Inheritance graph
[legend]
Collaboration diagram for castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >:
Collaboration graph
[legend]

Public Types

using ElementT = castor3d::Plugin
 
using ElementKeyT = String
 
using ElementCacheTraitsT = castor3d::PluginCacheTraits
 
using ElementCacheT = ResourceCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT >
 
using ElementPtrT = typename ElementCacheT::ElementPtrT
 
using ElementContT = typename ElementCacheT::ElementContT
 
using ElementInitialiserT = typename ElementCacheT::ElementInitialiserT
 
using ElementCleanerT = typename ElementCacheT::ElementCleanerT
 
using ElementMergerT = typename ElementCacheT::ElementMergerT
 

Public Member Functions

C3D_API ResourceCacheT (castor3d::Engine &engine)
 Constructor. More...
 
C3D_API ~ResourceCacheT ()=default
 Destructor. More...
 
C3D_API void clear ()
 Flushes the collection. More...
 
C3D_API ElementPtrT loadPlugin (String const &pluginName, Path const &pathFolder) noexcept
 Loads a plug-in, given the plug-in name (ex: libGlRenderSystem.dll => GlRenderSystem) More...
 
C3D_API ElementPtrT loadPlugin (Path const &fileFullPath) noexcept
 Loads a plug-in, given the plug-in file's full path. More...
 
C3D_API castor3d::PluginStrMap getPlugins (castor3d::PluginType type)
 Retrieves the plug-ins of given type. More...
 
C3D_API void loadAllPlugins (Path const &folder)
 Loads all the plug-ins located in working folder. More...
 

Detailed Description

Plug-ins cache.

Member Typedef Documentation

◆ ElementCacheT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementCacheT = ResourceCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT >

◆ ElementCacheTraitsT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementCacheTraitsT = castor3d::PluginCacheTraits

◆ ElementCleanerT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementCleanerT = typename ElementCacheT::ElementCleanerT

◆ ElementContT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementContT = typename ElementCacheT::ElementContT

◆ ElementInitialiserT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementInitialiserT = typename ElementCacheT::ElementInitialiserT

◆ ElementKeyT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementKeyT = String

◆ ElementMergerT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementMergerT = typename ElementCacheT::ElementMergerT

◆ ElementPtrT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementPtrT = typename ElementCacheT::ElementPtrT

◆ ElementT

using castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ElementT = castor3d::Plugin

Constructor & Destructor Documentation

◆ ResourceCacheT()

C3D_API castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::ResourceCacheT ( castor3d::Engine engine)

Constructor.

Parameters
[in]engineThe engine.

◆ ~ResourceCacheT()

C3D_API castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::~ResourceCacheT ( )
default

Destructor.

Member Function Documentation

◆ clear()

C3D_API void castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::clear ( )

Flushes the collection.

◆ getPlugins()

C3D_API castor3d::PluginStrMap castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::getPlugins ( castor3d::PluginType  type)

Retrieves the plug-ins of given type.

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

◆ loadAllPlugins()

C3D_API void castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::loadAllPlugins ( Path const &  folder)

Loads all the plug-ins located in working folder.

Parameters
[in]folderThe plug-ins' folder

◆ loadPlugin() [1/2]

C3D_API ElementPtrT castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::loadPlugin ( Path const &  fileFullPath)
noexcept

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

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

◆ loadPlugin() [2/2]

C3D_API ElementPtrT castor::ResourceCacheT< castor3d::Plugin, String, castor3d::PluginCacheTraits >::loadPlugin ( String const &  pluginName,
Path const &  pathFolder 
)
noexcept

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

Parameters
[in]pluginNameThe plug-in name
[in]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

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