?? struct_cpp_unit_test_plug_in.html
字號:
<html><head><title>CppUnit - The Unit Testing Library</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"> <table width="100%"> <tr> <td width="40%" align="left" valign="center"> <a href="http://sourceforge.net/projects/cppunit"> CppUnit project page </a> </td> <td> <a href="FAQ">FAQ</a> </td> <td width="40%" align="right" valign="center"> <a href="http://cppunit.sourceforge.net">CppUnit home page</a> </td> </tr></table><hr><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div><h1>CppUnitTestPlugIn Struct Reference<br><small>[<a class="el" href="group___writing_test_plug_in.html">Writing Test Plug-in</a>]</small></h1><a class="el" href="class_test.html">Test</a> plug-in interface. <a href="#_details">More...</a><p><code>#include <<a class="el" href="_test_plug_in_8h-source.html">TestPlugIn.h</a>></code><p><p>Inheritance diagram for CppUnitTestPlugIn:<p><center><img src="struct_cpp_unit_test_plug_in.png" usemap="#CppUnitTestPlugIn_map" border="0" alt=""></center><map name="CppUnitTestPlugIn_map"><area href="class_test_plug_in_default_impl.html" alt="TestPlugInDefaultImpl" shape="rect" coords="0,56,132,80"></map><a href="struct_cpp_unit_test_plug_in-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="struct_cpp_unit_test_plug_in.html#a0">initialize</a> (CPPUNIT_NS::TestFactoryRegistry *registry, const CPPUNIT_NS::PlugInParameters &parameters)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Called just after loading the dynamic library. <a href="#a0"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="struct_cpp_unit_test_plug_in.html#a1">addListener</a> (CPPUNIT_NS::TestResult *eventManager)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Gives a chance to the plug-in to register <a class="el" href="class_test_listener.html">TestListener</a>. <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="struct_cpp_unit_test_plug_in.html#a2">removeListener</a> (CPPUNIT_NS::TestResult *eventManager)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Gives a chance to the plug-in to remove its registered <a class="el" href="class_test_listener.html">TestListener</a>. <a href="#a2"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="struct_cpp_unit_test_plug_in.html#a3">addXmlOutputterHooks</a> (CPPUNIT_NS::XmlOutputter *outputter)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Provides a way for the plug-in to register some <a class="el" href="class_xml_outputter_hook.html">XmlOutputterHook</a>. <a href="#a3"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="struct_cpp_unit_test_plug_in.html#a4">removeXmlOutputterHooks</a> ()=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Called when the <a class="el" href="class_xml_outputter.html">XmlOutputter</a> is destroyed. <a href="#a4"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="struct_cpp_unit_test_plug_in.html#a5">uninitialize</a> (CPPUNIT_NS::TestFactoryRegistry *registry)=0</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Called just before unloading the dynamic library. <a href="#a5"></a><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2><a class="el" href="class_test.html">Test</a> plug-in interface. <p>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.<p>Plug-in are loaded/unloaded by <a class="el" href="class_plug_in_manager.html">PlugInManager</a>. When a plug-in is loaded, initialize() is called. Before unloading the plug-in, the <a class="el" href="class_plug_in_manager.html">PlugInManager</a> call uninitialize().<p>addListener() and removeListener() are called respectively before and after the test run.<p>addXmlOutputterHooks() and <a class="el" href="struct_cpp_unit_test_plug_in.html#a4">removeXmlOutputterHooks()</a> are called respectively before and after writing the XML output using a <a class="el" href="class_xml_outputter.html">XmlOutputter</a>.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="_test_plug_in_8h.html#a2">CPPUNIT_PLUGIN_IMPLEMENT</a>, <a class="el" href="_test_plug_in_8h.html#a1">CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL</a> <p>CppUnit::TestPlugInDefaultImpl, CppUnit::XmlOutputter. </dd></dl><p><hr><h2>Member Function Documentation</h2><a class="anchor" name="a1" doxytag="CppUnitTestPlugIn::addListener" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void CppUnitTestPlugIn::addListener </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">CPPUNIT_NS::TestResult * </td> <td class="mdname1" valign="top" nowrap> <em>eventManager</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Gives a chance to the plug-in to register <a class="el" href="class_test_listener.html">TestListener</a>. <p>Override this method to add a <a class="el" href="class_test_listener.html">TestListener</a> for the test run. This is useful if you are writing a custom <a class="el" href="class_test_listener.html">TestListener</a>, but also if you need to setUp some global resource: listen to TestListener::startTestRun(), and TestListener::endTestRun(). </td> </tr></table><a class="anchor" name="a3" doxytag="CppUnitTestPlugIn::addXmlOutputterHooks" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void CppUnitTestPlugIn::addXmlOutputterHooks </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">CPPUNIT_NS::XmlOutputter * </td> <td class="mdname1" valign="top" nowrap> <em>outputter</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Provides a way for the plug-in to register some <a class="el" href="class_xml_outputter_hook.html">XmlOutputterHook</a>. <p> </td> </tr></table><a class="anchor" name="a0" doxytag="CppUnitTestPlugIn::initialize" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void CppUnitTestPlugIn::initialize </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">CPPUNIT_NS::TestFactoryRegistry * </td> <td class="mdname" nowrap> <em>registry</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td></td> <td class="md" nowrap>const CPPUNIT_NS::PlugInParameters & </td> <td class="mdname" nowrap> <em>parameters</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Called just after loading the dynamic library. <p>Override this method to add additional suite to the registry, though this is preferably done using the macros (CPPUNIT_TEST_SUITE_REGISTRATION...). If you are creating a custom listener to extends the plug-in runner, you can use this to configure the listener using the <em>parameters</em>.<p>You could also use the parameters to specify some global parameter, such as test datas location, database name...<p>N.B.: Parameters interface is not define yet, and the plug-in runner does not yet support plug-in parameter. </td> </tr></table><a class="anchor" name="a2" doxytag="CppUnitTestPlugIn::removeListener" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void CppUnitTestPlugIn::removeListener </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">CPPUNIT_NS::TestResult * </td> <td class="mdname1" valign="top" nowrap> <em>eventManager</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Gives a chance to the plug-in to remove its registered <a class="el" href="class_test_listener.html">TestListener</a>. <p>Override this method to remove a <a class="el" href="class_test_listener.html">TestListener</a> that has been added. </td> </tr></table><a class="anchor" name="a4" doxytag="CppUnitTestPlugIn::removeXmlOutputterHooks" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void CppUnitTestPlugIn::removeXmlOutputterHooks </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Called when the <a class="el" href="class_xml_outputter.html">XmlOutputter</a> is destroyed. <p>Can be used to free some resources allocated by addXmlOutputterHooks(). <p>Implemented in <a class="el" href="class_test_plug_in_default_impl.html#a6">TestPlugInDefaultImpl</a>. </td> </tr></table><a class="anchor" name="a5" doxytag="CppUnitTestPlugIn::uninitialize" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void CppUnitTestPlugIn::uninitialize </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">CPPUNIT_NS::TestFactoryRegistry * </td> <td class="mdname1" valign="top" nowrap> <em>registry</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Called just before unloading the dynamic library. <p>Override this method to unregister test factory added in initialize(). This is necessary to keep the <a class="el" href="class_test_factory_registry.html">TestFactoryRegistry</a> 'clean'. When the plug-in is unloaded from memory, the <a class="el" href="class_test_factory_registry.html">TestFactoryRegistry</a> will hold reference on test that are no longer available if they are not unregistered. </td> </tr></table><hr>The documentation for this struct was generated from the following file:<ul><li><a class="el" href="_test_plug_in_8h-source.html">TestPlugIn.h</a></ul><hr><table width="100%"> <tr> <td width="10%" align="left" valign="center"> <a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=11795" width="88" height="31" border="0" alt="SourceForge Logo"></a> </td> <td width="20%" align="left" valign="center"> hosts this site. </td> <td> </td> <td align="right" valign="center"> Send comments to:<br> <a href="mailto:cppunit-devel@lists.sourceforge.net">CppUnit Developers</a> </td> </tr></table></body> </html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -