⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_test_factory_registry.html

📁 c++开发的一个不错的工具
💻 HTML
📖 第 1 页 / 共 2 页
字号:
      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="class_test_factory_registry.html">TestFactoryRegistry</a> &amp; TestFactoryRegistry::getRegistry           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>name</em> = <code>"All&nbsp;Tests"</code>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Returns a named registry. <p>If the <em>name</em> is left to its default value, then the registry that is returned is the one used by <a class="el" href="group___creating_test_suite.html#ga0">CPPUNIT_TEST_SUITE_REGISTRATION()</a>: the 'top' level registry.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>name</em>&nbsp;</td><td>Name of the registry to return. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Registry. If the registry does not exist, it is created with the specified name. </dd></dl>    </td>  </tr></table><a class="anchor" name="e1" doxytag="TestFactoryRegistry::isValid" ></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"> bool TestFactoryRegistry::isValid           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Tests if the registry is valid.<p>This method should be used when unregistering test factory on static variable destruction to ensure that the registry has not been already destroyed (in that case there is no need to unregister the test factory).<p>You should not concern yourself with this method unless you are writing a class like <a class="el" href="class_auto_register_suite.html">AutoRegisterSuite</a>.<p><dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if the specified registry has not been destroyed, otherwise returns <code>false</code>. </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_auto_register_suite.html">AutoRegisterSuite</a>. </dd></dl>    </td>  </tr></table><a class="anchor" name="a2" doxytag="TestFactoryRegistry::makeTest" ></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"> <a class="el" href="class_test.html">Test</a> * TestFactoryRegistry::makeTest           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Returns a new <a class="el" href="class_test_suite.html">TestSuite</a> that contains the registered test. <p><dl compact><dt><b>Returns:</b></dt><dd>A new <a class="el" href="class_test_suite.html">TestSuite</a> which contains all the test added using <a class="el" href="class_test_factory_registry.html#a4">registerFactory(TestFactory *)</a>. </dd></dl><p>Implements <a class="el" href="class_test_factory.html#a1">TestFactory</a>.    </td>  </tr></table><a class="anchor" name="d1" doxytag="TestFactoryRegistry::operator=" ></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"> void TestFactoryRegistry::operator=           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="class_test_factory_registry.html">TestFactoryRegistry</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>copy</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [private]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a class="anchor" name="a7" doxytag="TestFactoryRegistry::registerFactory" ></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"> void TestFactoryRegistry::registerFactory           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>name</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap><a class="el" href="class_test_factory.html">TestFactory</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>factory</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Adds the specified <a class="el" href="class_test_factory.html">TestFactory</a> with a specific name (DEPRECATED). <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>name</em>&nbsp;</td><td>Name associated to the factory. </td></tr>    <tr><td></td><td valign=top><em>factory</em>&nbsp;</td><td>Factory to register. </td></tr>  </table></dl><dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000009">Deprecated:</a></b></dt><dd>Use <a class="el" href="class_test_factory_registry.html#a4">registerFactory( TestFactory *)</a> instead. </dd></dl>    </td>  </tr></table><a class="anchor" name="a4" doxytag="TestFactoryRegistry::registerFactory" ></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"> void TestFactoryRegistry::registerFactory           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_test_factory.html">TestFactory</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>factory</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Adds the specified <a class="el" href="class_test_factory.html">TestFactory</a> to the registry. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>factory</em>&nbsp;</td><td>Factory to register. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a5" doxytag="TestFactoryRegistry::unregisterFactory" ></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"> void TestFactoryRegistry::unregisterFactory           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_test_factory.html">TestFactory</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>factory</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Removes the specified <a class="el" href="class_test_factory.html">TestFactory</a> from the registry.<p>The specified factory is not destroyed. <dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>factory</em>&nbsp;</td><td>Factory to remove from the registry. </td></tr>  </table></dl><dl compact><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Address case when trying to remove a TestRegistryFactory. </dd></dl>    </td>  </tr></table><hr><h2>Member Data Documentation</h2><a class="anchor" name="r0" doxytag="TestFactoryRegistry::m_factories" ></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"> <a class="el" href="class_test_factory_registry.html#y0">Factories</a> <a class="el" href="class_test_factory_registry.html#r0">TestFactoryRegistry::m_factories</a><code> [private]</code>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a class="anchor" name="r1" doxytag="TestFactoryRegistry::m_name" ></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"> std::string <a class="el" href="class_test_factory_registry.html#r1">TestFactoryRegistry::m_name</a><code> [private]</code>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="_test_factory_registry_8h-source.html">TestFactoryRegistry.h</a><li><a class="el" href="_test_factory_registry_8cpp.html">TestFactoryRegistry.cpp</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 + -