PixelLightAPI
.
|
Manager providing access to RTTI classes. More...
#include <ClassManager.h>
Public Member Functions | |
const List< const Module * > & | GetModules () const |
Get all registered modules. | |
const Module * | GetModuleByID (uint32 nModuleID) const |
Get module by ID. | |
PLCORE_API const Module * | GetModuleByName (const String &sModuleName) const |
Get module by name. | |
PLCORE_API const Module * | LoadModule (const String &sAbsFilename, bool bForceBuildTypeMatch=false) |
Load a module. | |
PLCORE_API bool | ScanPlugins (const String &sPath, ERecursive nRecursive=Recursive, bool bDelayedPluginLoading=true) |
Scan a directory for compatible plugins and load them in. | |
PLCORE_API bool | LoadPlugin (const String &sFilename, bool bDelayedPluginLoading=true) |
Load plugin. | |
PLCORE_API bool | UnloadPlugin (Module *pModule) |
Unload plugin. | |
PLCORE_API bool | UnloadAllPlugins () |
Unload all plugins. | |
const List< const Class * > & | GetClasses () const |
Get all registered classes. | |
PLCORE_API void | GetClasses (List< const Class * > &lstClasses, const String &sClass, ERecursive nRecursive=Recursive, EIncludeBase nIncludeBase=IncludeBase, EIncludeAbstract nIncludeAbstract=IncludeAbstract, uint32 nModuleID=0) const |
Get classes based on their base class and/or module (search for classes) | |
const Class * | GetClass (const String &sClass) const |
Get class. | |
Static Public Member Functions | |
static PLCORE_API ClassManager * | GetInstance () |
static PLCORE_API bool | HasInstance () |
Public Attributes | |
Event< const Module * > | EventModuleLoaded |
Event< const Module * > | EventModuleUnloaded |
Event< const Class * > | EventClassLoaded |
Event< const Class * > | EventClassUnloaded |
Manager providing access to RTTI classes.
static PLCORE_API ClassManager* PLCore::ClassManager::GetInstance | ( | ) | [static] |
static PLCORE_API bool PLCore::ClassManager::HasInstance | ( | ) | [static] |
const List< const Module * > & PLCore::ClassManager::GetModules | ( | ) | const [inline] |
Get all registered modules.
const Module * PLCore::ClassManager::GetModuleByID | ( | uint32 | nModuleID | ) | const [inline] |
Get module by ID.
[in] | nModuleID | Module ID |
PLCORE_API const Module* PLCore::ClassManager::GetModuleByName | ( | const String & | sModuleName | ) | const |
Get module by name.
[in] | sModuleName | Module name |
PLCORE_API const Module* PLCore::ClassManager::LoadModule | ( | const String & | sAbsFilename, |
bool | bForceBuildTypeMatch = false |
||
) |
Load a module.
[in] | sAbsFilename | Absolute filename of the shared library to load in |
[in] | bForceBuildTypeMatch | 'true' to force a build type match, else 'false' |
PLCORE_API bool PLCore::ClassManager::ScanPlugins | ( | const String & | sPath, |
ERecursive | nRecursive = Recursive , |
||
bool | bDelayedPluginLoading = true |
||
) |
Scan a directory for compatible plugins and load them in.
[in] | sPath | Directory to search in |
[in] | nRecursive | Also take sub-directories into account? |
[in] | bDelayedPluginLoading | 'true' if it's allowed to perform delayed shared library loading to speed up the program start, else 'false' |
PLCORE_API bool PLCore::ClassManager::LoadPlugin | ( | const String & | sFilename, |
bool | bDelayedPluginLoading = true |
||
) |
Load plugin.
[in] | sFilename | Filename of the plugin (must be a '.plugin'-file!) |
[in] | bDelayedPluginLoading | 'true' if it's allowed to perform delayed shared library loading to speed up the program start, else 'false' |
PLCORE_API bool PLCore::ClassManager::UnloadPlugin | ( | Module * | pModule | ) |
Unload plugin.
[in] | pModule | Module to unload (must be valid!) |
PLCORE_API bool PLCore::ClassManager::UnloadAllPlugins | ( | ) |
Unload all plugins.
const List< const Class * > & PLCore::ClassManager::GetClasses | ( | ) | const [inline] |
Get all registered classes.
PLCORE_API void PLCore::ClassManager::GetClasses | ( | List< const Class * > & | lstClasses, |
const String & | sClass, | ||
ERecursive | nRecursive = Recursive , |
||
EIncludeBase | nIncludeBase = IncludeBase , |
||
EIncludeAbstract | nIncludeAbstract = IncludeAbstract , |
||
uint32 | nModuleID = 0 |
||
) | const |
Get classes based on their base class and/or module (search for classes)
[out] | lstClasses | List that receives the found classes (do not destroy the returned instances) |
[in] | sClass | Name of base class (with namespace) |
[in] | nRecursive | 'Recursive' to list all subclasses of the base class, 'NonRecursive' to only list direct subclasses |
[in] | nIncludeBase | 'IncludeBase' to include the base class itself, 'NoBase' to exclude it |
[in] | nIncludeAbstract | 'IncludeAbstract' to include classes without a constructor, 'NoAbstract' to exclude them |
[in] | nModuleID | ID of module, or 0 to include the classes from all modules |
const Class * PLCore::ClassManager::GetClass | ( | const String & | sClass | ) | const [inline] |
Get class.
[in] | sClass | Class name |
A module has been registered (do not destroy the given instance)
A module has been removed (do not destroy the given instance)
A class has been registered. Please note: At the time you receive this event, the class may not yet be fully initialized, this means that even "IsDerivedFrom" may not work, yet. (do not destroy the given instance)
A class has been removed (do not destroy the given instance)
|