osgART::PluginManager Class Reference

List of all members.


Detailed Description

It is using internally the implementation of osgDB::Registry

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 PluginManagerinstance (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 ()

Member Typedef Documentation

typedef std::map< std::string, osg::Referenced* > osgART::PluginManager::PluginInterfaceMap [protected]


Constructor & Destructor Documentation

osgART::PluginManager::PluginManager (  )  [private]

virtual osgART::PluginManager::~PluginManager (  )  [private, virtual]


Member Function Documentation

static PluginManager* osgART::PluginManager::instance ( bool  erase = false  )  [static]

Parameters:
erase explicitly deletes the instance of the plugin manager
Returns:
instance of the PluginManager or 0 if erase was true

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.

Parameters:
filename short version or complete path.

osg::Referenced* osgART::PluginManager::get ( const std::string &  identifier  ) 

Parameters:
identifier to get the plugin instance
Returns:
0 if unsuccessful or a pointer to the plugin

osg::Referenced* osgART::PluginManager::operator[] ( const std::string &  identifier  ) 

Parameters:
identifier to get the plugin instance
Returns:
0 if unsuccessful or a pointer to the plugin

void osgART::PluginManager::add ( const std::string &  name,
osg::Referenced *  plugin 
)

Parameters:
name identifier to retrieve the object
plugin pointer to the instantiated class

Referenced by osgART::PluginProxy< T >::PluginProxy().


Member Data Documentation


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

Generated on Tue Aug 24 15:53:07 2010 for OSGART by  doxygen 1.5.6