summaryrefslogtreecommitdiff
path: root/include/cppunit/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'include/cppunit/plugin')
-rw-r--r--include/cppunit/plugin/Makefile.am2
-rw-r--r--include/cppunit/plugin/PlugInManager.h11
-rw-r--r--include/cppunit/plugin/TestPlugIn.h17
-rw-r--r--include/cppunit/plugin/TestPlugInDefaultImpl.h (renamed from include/cppunit/plugin/TestPlugInAdapter.h)10
4 files changed, 33 insertions, 7 deletions
diff --git a/include/cppunit/plugin/Makefile.am b/include/cppunit/plugin/Makefile.am
index 0494373..3fdff64 100644
--- a/include/cppunit/plugin/Makefile.am
+++ b/include/cppunit/plugin/Makefile.am
@@ -4,6 +4,6 @@ libcppunitinclude_HEADERS = \
DynamicLibraryManager.h \
DynamicLibraryManagerException.h \
TestPlugIn.h \
- TestPlugInAdapter.h \
+ TestPlugInDefaultImpl.h \
PlugInManager.h \
Parameters.h
diff --git a/include/cppunit/plugin/PlugInManager.h b/include/cppunit/plugin/PlugInManager.h
index d3bbc5f..f349ab1 100644
--- a/include/cppunit/plugin/PlugInManager.h
+++ b/include/cppunit/plugin/PlugInManager.h
@@ -18,6 +18,7 @@ namespace CppUnit
class DynamicLibraryManager;
class TestResult;
+class XmlOutputter;
/*! \brief Manges TestPlugIn.
@@ -62,6 +63,16 @@ public:
*/
void removeListener( TestResult *eventManager );
+ /*! Provides a way for the plug-in to register some XmlOutputterHook.
+ */
+ void addXmlOutputterHooks( XmlOutputter *outputter );
+
+ /*! Called when the XmlOutputter is destroyed.
+ *
+ * Can be used to free some resources allocated by addXmlOutputterHooks().
+ */
+ void removeXmlOutputterHooks();
+
protected:
struct PlugInInfo
{
diff --git a/include/cppunit/plugin/TestPlugIn.h b/include/cppunit/plugin/TestPlugIn.h
index 0847928..0eaf960 100644
--- a/include/cppunit/plugin/TestPlugIn.h
+++ b/include/cppunit/plugin/TestPlugIn.h
@@ -12,6 +12,7 @@ namespace CppUnit
class Test;
class TestFactoryRegistry;
class TestResult;
+class XmlOutputter;
}
/*! \file
@@ -67,6 +68,16 @@ struct CppUnitTestPlugIn
*/
virtual void removeListener( CppUnit::TestResult *eventManager ) =0;
+ /*! Provides a way for the plug-in to register some XmlOutputterHook.
+ */
+ virtual void addXmlOutputterHooks( CppUnit::XmlOutputter *outputter ) =0;
+
+ /*! Called when the XmlOutputter is destroyed.
+ *
+ * Can be used to free some resources allocated by addXmlOutputterHooks().
+ */
+ virtual void removeXmlOutputterHooks() = 0;
+
/*! Called just before unloading the dynamic library.
*
* Override this method to unregister test factory added in initialize().
@@ -109,7 +120,7 @@ typedef CppUnitTestPlugIn *(*TestPlugInSignature)();
// Note: This include should remain after definition of CppUnitTestPlugIn
-#include <cppunit/plugin/TestPlugInAdapter.h>
+#include <cppunit/plugin/TestPlugInDefaultImpl.h>
/*! \def CPPUNIT_PLUGIN_IMPLEMENT_MAIN()
@@ -170,8 +181,8 @@ typedef CppUnitTestPlugIn *(*TestPlugInSignature)();
* \see CppUnitTestPlugIn
* \see CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL(), CPPUNIT_PLUGIN_IMPLEMENT_MAIN().
*/
-#define CPPUNIT_PLUGIN_IMPLEMENT() \
- CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInAdapter ); \
+#define CPPUNIT_PLUGIN_IMPLEMENT() \
+ CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl ); \
CPPUNIT_PLUGIN_IMPLEMENT_MAIN()
diff --git a/include/cppunit/plugin/TestPlugInAdapter.h b/include/cppunit/plugin/TestPlugInDefaultImpl.h
index 0e54e0e..90d4398 100644
--- a/include/cppunit/plugin/TestPlugInAdapter.h
+++ b/include/cppunit/plugin/TestPlugInDefaultImpl.h
@@ -23,12 +23,12 @@ class TestSuite;
* ( TestFactoryRegistry::getRegistry() ).
*
*/
-class CPPUNIT_API TestPlugInAdapter : public CppUnitTestPlugIn
+class CPPUNIT_API TestPlugInDefaultImpl : public CppUnitTestPlugIn
{
public:
- TestPlugInAdapter();
+ TestPlugInDefaultImpl();
- virtual ~TestPlugInAdapter();
+ virtual ~TestPlugInDefaultImpl();
void initialize( TestFactoryRegistry *registry,
const Parameters &parameters );
@@ -37,6 +37,10 @@ public:
void removeListener( TestResult *eventManager );
+ void addXmlOutputterHooks( XmlOutputter *outputter );
+
+ void removeXmlOutputterHooks();
+
void uninitialize( TestFactoryRegistry *registry );
};