xmltooling  3.0.3
xmltooling::PluginManager< T, Key, Params > Class Template Reference

Template for management/access to plugins constructed based on a Key type and arbitrary parameters. More...

#include <xmltooling/PluginManager.h>

Public Types

typedef T * Factory (const Params &, bool deprecationSupport)
 Factory function for plugin. More...
 

Public Member Functions

void registerFactory (const Key &type, typename PluginManager::Factory *factory)
 Registers the factory for a given type. More...
 
void deregisterFactory (const Key &type)
 Unregisters the factory for a given type. More...
 
void deregisterFactories ()
 Unregisters all registered factories.
 
T * newPlugin (const Key &type, const Params &p, bool deprecationSupport) const
 Builds a new instance of a plugin of a given type, configuring it with the supplied parameters. More...
 

Detailed Description

template<class T, class Key, typename Params>
class xmltooling::PluginManager< T, Key, Params >

Template for management/access to plugins constructed based on a Key type and arbitrary parameters.

Parameters
Tclass of plugin to manage
Keythe key for type lookup
Paramsparameters for plugin construction

Member Typedef Documentation

template<class T, class Key, typename Params>
typedef T* xmltooling::PluginManager< T, Key, Params >::Factory(const Params &, bool deprecationSupport)

Factory function for plugin.

Member Function Documentation

template<class T, class Key, typename Params>
void xmltooling::PluginManager< T, Key, Params >::deregisterFactory ( const Key &  type)
inline

Unregisters the factory for a given type.

Parameters
typethe key to the plugin type
template<class T, class Key, typename Params>
T* xmltooling::PluginManager< T, Key, Params >::newPlugin ( const Key &  type,
const Params &  p,
bool  deprecationSupport 
) const
inline

Builds a new instance of a plugin of a given type, configuring it with the supplied parameters.

Parameters
typethe key to the plugin type
pparameters to configure plugin
deprecationSupporttrue iff the plugin should recognize/support its deprecated features
Returns
the constructed plugin
template<class T, class Key, typename Params>
void xmltooling::PluginManager< T, Key, Params >::registerFactory ( const Key &  type,
typename PluginManager< T, Key, Params >::Factory factory 
)
inline

Registers the factory for a given type.

Parameters
typethe key to the plugin type
factorythe factory function for the plugin type

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