CppUnit project page | FAQ | CppUnit home page

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# PlugInManager Class Reference

Manges TestPlugIn. More...

`#include <PlugInManager.h>`

List of all members.

## Public Member Functions
| PlugInManager ()
virtual | ~PlugInManager ()
| Destructor.
void | load (const std::string &libraryFileName, const PlugInParameters &parameters=PlugInParameters())
| Loads the specified plug-in.
void | unload (const std::string &libraryFileName)
| Unloads the specified plug-in.
void | addListener (TestResult *eventManager)
| Gives a chance to each loaded plug-in to register TestListener.
void | removeListener (TestResult *eventManager)
| Gives a chance to each loaded plug-in to unregister TestListener. For each plug-in, call CppUnitTestPlugIn::removeListener().
void | addXmlOutputterHooks (XmlOutputter *outputter)
| Provides a way for the plug-in to register some XmlOutputterHook.
void | removeXmlOutputterHooks ()
| Called when the XmlOutputter is destroyed.
## Protected Member Functions
void | unload (PlugInInfo &plugIn)
## Private Types
typedef CppUnitDeque< PlugInInfo > | PlugIns
## Private Member Functions
| PlugInManager (const PlugInManager &copy)
| Prevents the use of the copy constructor.
void | operator= (const PlugInManager &copy)
| Prevents the use of the copy operator.
## Private Attributes
PlugIns | m_plugIns
## Classes
struct | PlugInInfo
| (INTERNAL) Information about a specific plug-in. More...

## Detailed Description

Manges TestPlugIn.

## Member Typedef Documentation

typedef CppUnitDeque<PlugInInfo> PlugInManager::PlugIns`[private]`

## Constructor & Destructor Documentation

CPPUNIT_NS_BEGIN PlugInManager::PlugInManager | ( |  | ) |

Constructs a PlugInManager object.

PlugInManager::~PlugInManager | ( |  | ) | `[virtual]`

Destructor.

PlugInManager::PlugInManager | ( | const PlugInManager & | copy | ) | `[private]`

Prevents the use of the copy constructor.

## Member Function Documentation

void PlugInManager::load | ( | const std::string & | libraryFileName,
|  | const PlugInParameters & | parameters = `PlugInParameters()` |
| ) |  |  |

Loads the specified plug-in.

After being loaded, the CppUnitTestPlugIn::initialize() is called.

Parameters:

  | libraryFileName | Name of the file that contains the TestPlugIn.
  | parameters | List of string passed to the plug-in.

Returns:
  Pointer on the DynamicLibraryManager associated to the library. Valid until the library is unloaded. Never `NULL`.

Exceptions:

  | DynamicLibraryManagerException | is thrown if an error occurs during loading.

void PlugInManager::unload | ( | const std::string & | libraryFileName | ) |

Unloads the specified plug-in.

Parameters:

  | libraryFileName | Name of the file that contains the TestPlugIn passed to a previous call to load().

void PlugInManager::addListener | ( | TestResult * | eventManager | ) |

Gives a chance to each loaded plug-in to register TestListener.

For each plug-in, call CppUnitTestPlugIn::addListener().

void PlugInManager::removeListener | ( | TestResult * | eventManager | ) |

Gives a chance to each loaded plug-in to unregister TestListener. For each plug-in, call CppUnitTestPlugIn::removeListener().

void PlugInManager::addXmlOutputterHooks | ( | XmlOutputter * | outputter | ) |

Provides a way for the plug-in to register some XmlOutputterHook.

void PlugInManager::removeXmlOutputterHooks | ( |  | ) |

Called when the XmlOutputter is destroyed.

Can be used to free some resources allocated by addXmlOutputterHooks().

void PlugInManager::unload | ( | PlugInInfo & | plugIn | ) | `[protected]`

Unloads the specified plug-in.

Parameters:

  | plugIn | Information about the plug-in.

void PlugInManager::operator= | ( | const PlugInManager & | copy | ) | `[private]`

Prevents the use of the copy operator.

## Member Data Documentation

PlugIns PlugInManager::m_plugIns`[private]`

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

- PlugInManager.h
- PlugInManager.cpp

| hosts this site. |  | Send comments to: CppUnit Developers