PWToolBox::Plugin Class Reference

A base plugin that all plugins must inherit. More...

#include <Plugin.h>

List of all members.

Public Member Functions

std::string const getName () const
 Retrieves the name of the plugin.
std::string const & getType () const
 Retrieves the type of the plugin.
VersionInformation const & getVersion () const
 Retrieves the version of the plugin.
SharedLibrary *const & getSharedLibrary () const
 Retrieves the shared library associated with the plugin.
virtual ~Plugin (void)

Protected Member Functions

 Plugin (std::string const &name, std::string const &type, VersionInformation const &version)
 Creates a new plugin with the given name and type.

Protected Attributes

std::string const m_name
 The name of the plugin.
std::string const m_type
 The type of the plugin.
SharedLibrarym_library
 A pointer to the library that loaded this plugin. This is used for calling PluginManager::PLUGIN_INIT_FUNC_NAME and PluginManager::PLUGIN_DESTROY_FUNC_NAME, as well as for loading other symbols not found in the plugin class.
VersionInformation m_version
 The version of the plugin.


Detailed Description

A base plugin that all plugins must inherit.

Plugins have at least a name, a type, and a version, all of which are set by the derived type(s) when inheriting. The type can be used as a hint for determining what base type to cast to. This cast should be checked with dynamic_cast or with boost::polymorphic_[down]cast.


Constructor & Destructor Documentation

virtual PWToolBox::Plugin::~Plugin ( void   )  [inline, virtual]

PWToolBox::Plugin::Plugin ( std::string const &  name,
std::string const &  type,
VersionInformation const &  version 
) [inline, protected]

Creates a new plugin with the given name and type.

Parameters:
name The name of the plugin.
type The type of the plugin
version The version of the plugin


Member Function Documentation

std::string const PWToolBox::Plugin::getName (  )  const [inline]

Retrieves the name of the plugin.

Returns:
The name of the plugin

std::string const& PWToolBox::Plugin::getType (  )  const [inline]

Retrieves the type of the plugin.

Returns:
The type of the plugin

VersionInformation const& PWToolBox::Plugin::getVersion (  )  const [inline]

Retrieves the version of the plugin.

Returns:
The version of the plugin

SharedLibrary* const& PWToolBox::Plugin::getSharedLibrary (  )  const [inline]

Retrieves the shared library associated with the plugin.

Returns:
The shared library associated with the plugin


Member Data Documentation

std::string const PWToolBox::Plugin::m_name [protected]

The name of the plugin.

std::string const PWToolBox::Plugin::m_type [protected]

The type of the plugin.

SharedLibrary* PWToolBox::Plugin::m_library [protected]

A pointer to the library that loaded this plugin. This is used for calling PluginManager::PLUGIN_INIT_FUNC_NAME and PluginManager::PLUGIN_DESTROY_FUNC_NAME, as well as for loading other symbols not found in the plugin class.

VersionInformation PWToolBox::Plugin::m_version [protected]

The version of the plugin.


The documentation for this class was generated from the following file:
Generated on Sun Jul 13 14:18:26 2008 for PWToolBox by  doxygen 1.5.1