Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <PluginManager.h>
Public Member Functions | |
Plugin * | createPlugin (std::string name, std::string filename="") |
Creates a plugin. | |
void | createPlugins (const std::string &pluginsfile) |
Creates plugins from a plugins configuration file. | |
bool | loadPlugin (Plugin *plugin) |
void | loadPlugins () |
Load all plugins waiting for load. | |
PluginManager () | |
Default constructor. | |
bool | reloadPlugin (Plugin *plugin) |
void | removeAllPlugins () |
void | removePlugin (const u32 &id) |
Remove a Plugin from the managed list, calling it's unload() method. | |
void | unloadPlugin (Plugin *plugin) |
void | unloadPlugins () |
Unload all resources. | |
virtual | ~PluginManager () |
Default destructor. | |
Static Public Member Functions | |
static PluginManager * | getInstance () |
Get instance. | |
Protected Attributes | |
core::ConfigFile * | mConfigFile |
std::map< std::string, u32 > | mCreatedFilenameIDs |
std::list< Plugin * > | mLoadPlugins |
std::map< u32, Plugin * > | mPlugins |
Manager for Dynamic-loading Libraries. This manager keeps a track of all the open dynamic-loading libraries, opens them and returns references to already-open libraries.
engine::PluginManager::PluginManager | ( | ) |
Default constructor.
References getInstance(), mConfigFile, engine::Object::mObjectType, and engine::OT_PLUGIN_MANAGER.
engine::PluginManager::~PluginManager | ( | ) | [virtual] |
Default destructor.
References getInstance(), and removeAllPlugins().
Plugin * engine::PluginManager::createPlugin | ( | std::string | name, |
std::string | filename = "" |
||
) |
Creates a plugin.
References engine::Object::getID(), getInstance(), engine::Object::getName(), core::intToString(), mCreatedFilenameIDs, mLoadPlugins, and mPlugins.
Referenced by createPlugins().
void engine::PluginManager::createPlugins | ( | const std::string & | pluginsfile | ) |
Creates plugins from a plugins configuration file.
References createPlugin(), core::ConfigFile::getMultiSetting(), core::ConfigFile::getSetting(), core::ConfigFile::load(), and mConfigFile.
Referenced by engine::EngineManager::loadPlugins().
PluginManager * engine::PluginManager::getInstance | ( | ) | [static] |
Get instance.
Reimplemented from core::Singleton< PluginManager >.
Referenced by createPlugin(), loadPlugin(), loadPlugins(), PluginManager(), reloadPlugin(), unloadPlugin(), unloadPlugins(), and ~PluginManager().
bool engine::PluginManager::loadPlugin | ( | Plugin * | plugin | ) |
References engine::Object::getID(), getInstance(), engine::Object::getName(), core::intToString(), and engine::Plugin::load().
Referenced by loadPlugins().
void engine::PluginManager::loadPlugins | ( | ) |
Load all plugins waiting for load.
References getInstance(), loadPlugin(), and mLoadPlugins.
Referenced by engine::EngineManager::loadPlugins().
bool engine::PluginManager::reloadPlugin | ( | Plugin * | plugin | ) |
void engine::PluginManager::removeAllPlugins | ( | ) |
References mPlugins, and unloadPlugin().
Referenced by ~PluginManager().
void engine::PluginManager::removePlugin | ( | const u32 & | id | ) |
Remove a Plugin from the managed list, calling it's unload() method.
References engine::Plugin::getFilename(), mCreatedFilenameIDs, mPlugins, and unloadPlugin().
void engine::PluginManager::unloadPlugin | ( | Plugin * | plugin | ) |
References engine::Object::getID(), getInstance(), engine::Object::getName(), core::intToString(), and engine::Plugin::unload().
Referenced by removeAllPlugins(), removePlugin(), and unloadPlugins().
void engine::PluginManager::unloadPlugins | ( | ) |
Unload all resources.
References getInstance(), mPlugins, and unloadPlugin().
Referenced by engine::EngineManager::unloadPlugins().
core::ConfigFile* engine::PluginManager::mConfigFile [protected] |
Referenced by createPlugins(), and PluginManager().
std::map<std::string, u32> engine::PluginManager::mCreatedFilenameIDs [protected] |
Referenced by createPlugin(), and removePlugin().
std::list<Plugin*> engine::PluginManager::mLoadPlugins [protected] |
Referenced by createPlugin(), and loadPlugins().
std::map<u32, Plugin*> engine::PluginManager::mPlugins [protected] |
Referenced by createPlugin(), removeAllPlugins(), removePlugin(), and unloadPlugins().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by
Doxygen
(1.7.4)
|