Quark  0.1
PluginLoader< T > Class Template Reference

A convenient wrapper template for QPluginLoader that loads and instantiates plugins of a given type. More...

#include <PluginLoader.h++>

Public Member Functions

 PluginLoader (const QString &pluginDirectory)
 Constructs a new PluginLoader that will load plugins from the given plugin directory. More...
 
 ~PluginLoader ()
 Destructor. More...
 
T * loadPlugin (const QString &name)
 Loads, instantiates, and returns a plugin with the given name. More...
 

Detailed Description

template<class T>
class quark::util::PluginLoader< T >

A convenient wrapper template for QPluginLoader that loads and instantiates plugins of a given type.

Template Parameters
TThe plugin type.
Author
Mark Lindner

Constructor & Destructor Documentation

◆ PluginLoader()

PluginLoader ( const QString &  pluginDirectory)

Constructs a new PluginLoader that will load plugins from the given plugin directory.

Parameters
pluginDirectoryThe path of a plugin directory.

◆ ~PluginLoader()

Destructor.

Member Function Documentation

◆ loadPlugin()

T* loadPlugin ( const QString &  name)

Loads, instantiates, and returns a plugin with the given name.

Parameters
nameThe base name of the dynamic object file containing the plugin.
Returns
The plugin instance, or NULL if the plugin could not be loaded.

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