PluginLoader Class Reference

A convenience class for loading Plugin objects. More...

#include <PluginLoader.h++>

List of all members.

Public Member Functions

 PluginLoader (const String &path=String::null)
 Construct a new PluginLoader with the specified path.
 ~PluginLoader ()
 Destructor.
void setPath (const String &path)
 Set the plugin file path.
String getPath () const
 Get the plugin file path.
void load () throw (IOException)
 Load the plugin.
void unload () throw ()
 Unload the plugin.
bool isLoaded () const
 Determine if the plugin is loaded.
String getName ()
 Get the plugin name.
String getVersion ()
 Get the plugin version number.
String getAuthor ()
 Get the plugin author information.
String getClassName ()
 Get the plugin class name.
String getBuildDate ()
 Get the plugin build date & time.
template<class T >
T * newInstance ()
 Construct a new instance of a plugin of type T, where T is a subclass of Plugin.

Detailed Description

A convenience class for loading Plugin objects.

The template parameter T should be a suitable subclass of Plugin.

Author:
Mark Lindner

Constructor & Destructor Documentation

PluginLoader ( const String path = String::null  ) 

Construct a new PluginLoader with the specified path.

Parameters:
path The path to the loadable object file from which the plugin will be loaded.
~PluginLoader (  ) 

Destructor.

Unloads the plugin.


Member Function Documentation

String getAuthor (  ) 

Get the plugin author information.

Returns:
The author information, or String::null if the author information could not be determined, or if the plugin has not yet been loaded via load().
String getBuildDate (  ) 

Get the plugin build date & time.

Returns:
The build date and time, or String::null if the build date and time could not be determined, or if the plugin has not yet been loaded via load().
String getClassName (  ) 

Get the plugin class name.

Returns:
The plugin class name, or String::null if the class name could not be determined, or if the plugin has not yet been loaded via load().
String getName (  ) 

Get the plugin name.

Returns:
The name, or String::null if the name could not be determined, or if the plugin has not yet been loaded via load().
String getPath (  )  const [inline]

Get the plugin file path.

String getVersion (  ) 

Get the plugin version number.

Returns:
The version number, or String::null if the version number could not be determined, or if the plugin has not yet been loaded via load().
bool isLoaded (  )  const [inline]

Determine if the plugin is loaded.

void load (  )  throw (IOException) [inline]

Load the plugin.

If the plugin is already loaded, the method has no effect.

Exceptions:
IOException If the object could not be loaded, or if no path has been specified.
T* newInstance (  )  [inline]

Construct a new instance of a plugin of type T, where T is a subclass of Plugin.

Returns:
The new instance, or NULL if the plugin could not be instantiated, if the plugin has not yet been loaded via load(), or if the cast to type T failed.
void setPath ( const String path  )  [inline]

Set the plugin file path.

If the plugin is loaded, the call has no effect.

void unload (  )  throw () [inline]

Unload the plugin.

If the plugin has not been loaded, the method has no effect.


The documentation for this class was generated from the following files:
Generated on Sat Nov 26 16:49:09 2011 for libcommonc++ by  doxygen 1.6.3