Public Member Functions | |
| bool | load (const std::string &filename) |
| Load an external plugin. | |
| osg::Referenced * | get (const std::string &identifier) |
| Return a pointer to the plugin. | |
| osg::Referenced * | operator[] (const std::string &identifier) |
| Shorthand for the get method. | |
| void | add (const std::string &name, osg::Referenced *plugin) |
| Add a new instance of a dynamically loaded class. | |
Static Public Member Functions | |
| static PluginManager * | instance (bool erase=false) |
| Returns an instance of a plugin manager as it is singleton. | |
Protected Types | |
| typedef std::map< std::string, osg::Referenced * > | PluginInterfaceMap |
Protected Attributes | |
| PluginInterfaceMap | _plugininterfaces |
Private Member Functions | |
| PluginManager () | |
| virtual | ~PluginManager () |
typedef std::map< std::string, osg::Referenced* > osgART::PluginManager::PluginInterfaceMap [protected] |
| osgART::PluginManager::PluginManager | ( | ) | [private] |
| virtual osgART::PluginManager::~PluginManager | ( | ) | [private, virtual] |
| static PluginManager* osgART::PluginManager::instance | ( | bool | erase = false |
) | [static] |
| erase | explicitly deletes the instance of the plugin manager |
Referenced by osgART::PluginProxy< T >::PluginProxy().
| bool osgART::PluginManager::load | ( | const std::string & | filename | ) |
The plugin will be loaded and stays in memory unless explicitly unloaded.
| filename | short version or complete path. |
| osg::Referenced* osgART::PluginManager::get | ( | const std::string & | identifier | ) |
| identifier | to get the plugin instance |
| osg::Referenced* osgART::PluginManager::operator[] | ( | const std::string & | identifier | ) |
| identifier | to get the plugin instance |
| void osgART::PluginManager::add | ( | const std::string & | name, | |
| osg::Referenced * | plugin | |||
| ) |
| name | identifier to retrieve the object | |
| plugin | pointer to the instantiated class |
Referenced by osgART::PluginProxy< T >::PluginProxy().
1.5.6