dtDIS::PluginManager Class Reference

manages a container of available plugins. More...

#include <pluginmanager.h>

List of all members.

Public Types

typedef
dtDIS::details::CreateDestroyPolicy
< IDISPlugin
LibLoaderT
 convenience typedef.
typedef
LibLoaderT::LibraryInterface 
RegistryEntry
 the stored type, also passed to observers upon notification.
typedef sigslot::signal2
< const std::string &,
RegistryEntry & > 
PluginSignal
 specifies the required function signature for slots observing plugin events.
typedef std::map< std::string,
RegistryEntry
LibraryRegistry
 a mapping from the library path loaded to an object with defined entry points.

Public Member Functions

bool LoadPlugin (const std::string &path)
 searches for the file, notifies observers of the new plugin.
bool UnloadPlugin (const std::string &path)
 notifies observers that the memory will be released if the path is a loaded library, releases the memory for library.
PluginSignalGetLoadedSignal ()
 get the signal instance in order to connect or disconnet to the loaded event.
PluginSignalGetUnloadedSignal ()
 get the signal instance in order to connect or disconnet to the unloaded event.
const LibraryRegistryGetRegistry () const
 get the plugin container
LibraryRegistryGetRegistry ()
 get the plugin container
void UnloadAllPlugins ()
 will call this->UnloadPlugin for all of the known plugins.


Detailed Description

manages a container of available plugins.

notifies observers when plugins are added or removed to the container.


Member Typedef Documentation

typedef dtDIS::details::CreateDestroyPolicy<IDISPlugin> dtDIS::PluginManager::LibLoaderT

convenience typedef.

typedef LibLoaderT::LibraryInterface dtDIS::PluginManager::RegistryEntry

the stored type, also passed to observers upon notification.

typedef sigslot::signal2<const std::string&, RegistryEntry&> dtDIS::PluginManager::PluginSignal

specifies the required function signature for slots observing plugin events.

typedef std::map<std::string,RegistryEntry> dtDIS::PluginManager::LibraryRegistry

a mapping from the library path loaded to an object with defined entry points.


Member Function Documentation

bool PluginManager::LoadPlugin ( const std::string &  path  ) 

searches for the file, notifies observers of the new plugin.

Parameters:
path the file path for the library to be loaded.
Returns:
true if the plugin was successfully added to the registry

bool PluginManager::UnloadPlugin ( const std::string &  path  ) 

notifies observers that the memory will be released if the path is a loaded library, releases the memory for library.

Parameters:
path the file path for the library to be loaded.
Returns:
true if the plugin path was found in the registry.

PluginManager::PluginSignal & PluginManager::GetLoadedSignal (  ) 

get the signal instance in order to connect or disconnet to the loaded event.

PluginManager::PluginSignal & PluginManager::GetUnloadedSignal (  ) 

get the signal instance in order to connect or disconnet to the unloaded event.

const PluginManager::LibraryRegistry & PluginManager::GetRegistry (  )  const

get the plugin container

PluginManager::LibraryRegistry & PluginManager::GetRegistry (  ) 

get the plugin container

void PluginManager::UnloadAllPlugins (  ) 

will call this->UnloadPlugin for all of the known plugins.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008