Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Static Public Member Functions | Protected Attributes
engine::PluginManager Class Reference

#include <PluginManager.h>

Inheritance diagram for engine::PluginManager:
engine::Object core::Singleton< PluginManager >

List of all members.

Public Member Functions

PlugincreatePlugin (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 PluginManagergetInstance ()
 Get instance.

Protected Attributes

std::map< std::string, u32mCreatedFilenameIDs
std::list< Plugin * > mLoadPlugins
std::map< u32, Plugin * > mPlugins

Detailed Description

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.

Constructor & Destructor Documentation

engine::PluginManager::PluginManager ( )
engine::PluginManager::~PluginManager ( ) [virtual]

Default destructor.

References getInstance(), and removeAllPlugins().

Member Function Documentation

Plugin * engine::PluginManager::createPlugin ( std::string  name,
std::string  filename = "" 
void engine::PluginManager::createPlugins ( const std::string &  pluginsfile)
PluginManager * engine::PluginManager::getInstance ( ) [static]
bool engine::PluginManager::loadPlugin ( Plugin plugin)
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)
void engine::PluginManager::unloadPlugins ( )

Unload all resources.

References getInstance(), mPlugins, and unloadPlugin().

Referenced by engine::EngineManager::unloadPlugins().

Member Data Documentation

Referenced by createPlugins(), and PluginManager().

std::map<std::string, u32> engine::PluginManager::mCreatedFilenameIDs [protected]

Referenced by createPlugin(), and removePlugin().

Referenced by createPlugin(), and loadPlugins().

std::map<u32, Plugin*> engine::PluginManager::mPlugins [protected]

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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by Doxygen (1.7.4)