CppUnit project page FAQ CppUnit home page

PlugInManager.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_PLUGIN_PLUGINMANAGER_H
2 #define CPPUNIT_PLUGIN_PLUGINMANAGER_H
3 
4 #include <cppunit/Portability.h>
5 
6 #if !defined(CPPUNIT_NO_TESTPLUGIN)
7 
8 #if CPPUNIT_NEED_DLL_DECL
9 #pragma warning( push )
10 #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
11 #endif
12 
14 struct CppUnitTestPlugIn;
15 
17 
18 
20 class TestResult;
21 class XmlOutputter;
22 
23 
27 {
28 public:
31  PlugInManager();
32 
34  virtual ~PlugInManager();
35 
46  void load( const std::string &libraryFileName,
47  const PlugInParameters &parameters = PlugInParameters() );
48 
53  void unload( const std::string &libraryFileName );
54 
59  void addListener( TestResult *eventManager );
60 
64  void removeListener( TestResult *eventManager );
65 
68  void addXmlOutputterHooks( XmlOutputter *outputter );
69 
74  void removeXmlOutputterHooks();
75 
76 protected:
79  struct PlugInInfo
80  {
81  std::string m_fileName;
84  };
85 
89  void unload( PlugInInfo &plugIn );
90 
91 private:
93  PlugInManager( const PlugInManager &copy );
94 
96  void operator =( const PlugInManager &copy );
97 
98 private:
99  typedef CppUnitDeque<PlugInInfo> PlugIns;
101 };
102 
103 
105 
106 #if CPPUNIT_NEED_DLL_DECL
107 #pragma warning( pop )
108 #endif
109 
110 #endif // !defined(CPPUNIT_NO_TESTPLUGIN)
111 
112 
113 #endif // CPPUNIT_PLUGIN_PLUGINMANAGER_H
CppUnitDeque< PlugInInfo > PlugIns
Definition: PlugInManager.h:99
Test plug-in interface.This class define the interface implemented by test plug-in. A pointer to that interface is returned by the function exported by the test plug-in.
Definition: TestPlugIn.h:43
Manages TestListener.A single instance of this class is used when running the test. It is usually created by the test runner (TestRunner).
Definition: TestResult.h:51
Test plug-ins parameters.
Definition: PlugInParameters.h:15
Outputs a TestResultCollector in XML format.Save the test result as a XML stream. ...
Definition: XmlOutputter.h:39
Manges TestPlugIn.
Definition: PlugInManager.h:26
CppUnitTestPlugIn * m_interface
Definition: PlugInManager.h:83
std::string m_fileName
Definition: PlugInManager.h:81
#define CPPUNIT_NS_END
Definition: Portability.h:120
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
PlugIns m_plugIns
Definition: PlugInManager.h:100
Manages dynamic libraries.
Definition: DynamicLibraryManager.h:34
DynamicLibraryManager * m_manager
Definition: PlugInManager.h:82
(INTERNAL) Information about a specific plug-in.
Definition: PlugInManager.h:79
#define CPPUNIT_API
Definition: CppUnitApi.h:27

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers