CppUnit project page FAQ

Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PlugInManager Class Reference

Manges TestPlugIn. More...

#include <PlugInManager.h>

Classes

struct  PlugInInfo
 (INTERNAL) Information about a specific plug-in. More...
 

Public Member Functions

 PlugInManager ()
 
virtual ~PlugInManager ()
 Destructor. More...
 
void load (const std::string &libraryFileName, const PlugInParameters &parameters=PlugInParameters())
 Loads the specified plug-in. More...
 
void unload (const std::string &libraryFileName)
 Unloads the specified plug-in. More...
 
void addListener (TestResult *eventManager)
 Gives a chance to each loaded plug-in to register TestListener. More...
 
void removeListener (TestResult *eventManager)
 Gives a chance to each loaded plug-in to unregister TestListener. For each plug-in, call CppUnitTestPlugIn::removeListener(). More...
 
void addXmlOutputterHooks (XmlOutputter *outputter)
 Provides a way for the plug-in to register some XmlOutputterHook. More...
 
void removeXmlOutputterHooks ()
 Called when the XmlOutputter is destroyed. More...
 

Protected Member Functions

void unload (PlugInInfo &plugIn)
 

Private Types

typedef std::deque< PlugInInfoPlugIns
 

Private Member Functions

 PlugInManager (const PlugInManager &copy)
 Prevents the use of the copy constructor. More...
 
void operator= (const PlugInManager &copy)
 Prevents the use of the copy operator. More...
 

Private Attributes

PlugIns m_plugIns
 

Detailed Description

Manges TestPlugIn.

Member Typedef Documentation

◆ PlugIns

typedef std::deque<PlugInInfo> PlugInManager::PlugIns
private

Constructor & Destructor Documentation

◆ PlugInManager() [1/2]

CPPUNIT_NS_BEGIN PlugInManager::PlugInManager ( )

Constructs a PlugInManager object.

◆ ~PlugInManager()

PlugInManager::~PlugInManager ( )
virtual

Destructor.

◆ PlugInManager() [2/2]

PlugInManager::PlugInManager ( const PlugInManager copy)
private

Prevents the use of the copy constructor.

Member Function Documentation

◆ addListener()

void PlugInManager::addListener ( TestResult eventManager)

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

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

◆ addXmlOutputterHooks()

void PlugInManager::addXmlOutputterHooks ( XmlOutputter outputter)

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

◆ load()

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
libraryFileNameName of the file that contains the TestPlugIn.
parametersList 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
DynamicLibraryManagerExceptionis thrown if an error occurs during loading.

◆ operator=()

void PlugInManager::operator= ( const PlugInManager copy)
private

Prevents the use of the copy operator.

◆ removeListener()

void PlugInManager::removeListener ( TestResult eventManager)

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

◆ removeXmlOutputterHooks()

void PlugInManager::removeXmlOutputterHooks ( )

Called when the XmlOutputter is destroyed.

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

◆ unload() [1/2]

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

Unloads the specified plug-in.

Parameters
libraryFileNameName of the file that contains the TestPlugIn passed to a previous call to load().

◆ unload() [2/2]

void PlugInManager::unload ( PlugInInfo plugIn)
protected

Unloads the specified plug-in.

Parameters
plugInInformation about the plug-in.

Member Data Documentation

◆ m_plugIns

PlugIns PlugInManager::m_plugIns
private

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

Send comments to:
CppUnit Developers