GG
|
A singleton that loads and stores textures for use by GG. More...
#include <PluginInterface.h>
Static Public Member Functions | |
static void | InitDynamicLoader () |
static void | AddSearchDirectory (const std::string &dir) |
static void | CleanupDynamicLoader () |
Friends | |
GG_API PluginManager & | GetPluginManager () |
Mutators | |
boost::shared_ptr < PluginInterface > | GetPlugin (const std::string &name) |
void | FreePlugin (const std::string &name) |
A singleton that loads and stores textures for use by GG.
This class is essentially a very thin wrapper around a map of PluginInterface smart pointers, keyed on std::string plugin names. The user need only request a plugin through GetPlugin(); if the plugin is not already resident, it will be loaded.
Definition at line 140 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.