#include <PluginInterface.h>
Mutators | |
boost::shared_ptr< PluginInterface > | GetPlugin (const std::string &name) |
void | FreePlugin (const std::string &name) |
Static Public Member Functions | |
static void | InitDynamicLoader () |
static void | AddSearchDirectory (const std::string &dir) |
static void | CleanupDynamicLoader () |
Friends | |
GG_API PluginManager & | GetPluginManager () |
The user need only request a plugin through GetPlugin(); if the plugin is not already resident, it will be loaded.
Definition at line 122 of file PluginInterface.h.
boost::shared_ptr<PluginInterface> GG::PluginManager::GetPlugin | ( | const std::string & | name | ) |
returns a shared_ptr to the plugin interface created from plugin name.
If the plugin is not present in the manager's pool, it will be loaded from disk.
void GG::PluginManager::FreePlugin | ( | const std::string & | name | ) |
removes the manager's shared_ptr to the plugin created from file name, if it exists.
static void GG::PluginManager::InitDynamicLoader | ( | ) | [static] |
initializes the dynamic loader system that loads and unloads plugins.
This is available as a convenience only; it will be called automatically as needed.
static void GG::PluginManager::AddSearchDirectory | ( | const std::string & | dir | ) | [static] |
adds a directory which should be searched for plugins.
static void GG::PluginManager::CleanupDynamicLoader | ( | ) | [static] |
cleans up the dynamic loader system that loads and unloads plugins.
This should be called manually when desiredl it will never be called by other PluginInterface code.
GG_API PluginManager& GetPluginManager | ( | ) | [friend] |
Returns the singleton PluginManager instance.