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

📄 class_additional_message.html

📁 c++开发的一个不错的工具
💻 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&nbsp;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&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>AdditionalMessage Class Reference<br><small>[<a class="el" href="group___creating_new_assertions.html">Creating custom assertions</a>]</small></h1>An additional <a class="el" href="class_message.html">Message</a> for assertions.  <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="_additional_message_8h-source.html">AdditionalMessage.h</a>&gt;</code><p><p>Inheritance diagram for AdditionalMessage:<p><center><img src="class_additional_message.png" usemap="#AdditionalMessage_map" border="0" alt=""></center><map name="AdditionalMessage_map"><area href="class_message.html" alt="Message" shape="rect" coords="0,0,119,24"></map><a href="class_additional_message-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 Types</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="class_message.html">Message</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_additional_message.html#w0">SuperClass</a></td></tr><tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_additional_message.html#a0">AdditionalMessage</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs an empty <a class="el" href="class_message.html">Message</a>.  <a href="#a0"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_additional_message.html#a1">AdditionalMessage</a> (const std::string &amp;detail1)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="class_message.html">Message</a> with the specified detail string.  <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_additional_message.html#a2">AdditionalMessage</a> (const char *detail1)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="class_message.html">Message</a> with the specified detail string.  <a href="#a2"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_additional_message.html#a3">AdditionalMessage</a> (const <a class="el" href="class_message.html">Message</a> &amp;other)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a copy of the specified message.  <a href="#a3"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="class_additional_message.html">AdditionalMessage</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="class_additional_message.html#a4">operator=</a> (const <a class="el" href="class_message.html">Message</a> &amp;other)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#a4"></a><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>An additional <a class="el" href="class_message.html">Message</a> for assertions. <p>Provides a implicit constructor that takes a single string. This allow this class to be used as the message arguments in macros.<p>The constructed object is either a <a class="el" href="class_message.html">Message</a> with a single detail string if a string was passed to the macro, or a copy of the <a class="el" href="class_message.html">Message</a> passed to the macro.<p>Here is an example of usage: <pre><div class="fragment">   <span class="keywordtype">void</span> checkStringEquals( <span class="keyword">const</span> std::string &amp;expected,                          <span class="keyword">const</span> std::string &amp;actual,                           <span class="keyword">const</span> CppUnit::SourceLine &amp;sourceLine,                           <span class="keyword">const</span> CppUnit::AdditionalMessage &amp;message );  <span class="preprocessor">   #define XTLUT_ASSERT_STRING_EQUAL_MESSAGE( expected, actual, message )  \</span><span class="preprocessor">     ::XtlUt::Impl::checkStringEquals( ::Xtl::toString(expected),        \</span><span class="preprocessor">                                       ::Xtl::toString(actual),          \</span><span class="preprocessor">                                       CPPUNIT_SOURCELINE(),             \</span><span class="preprocessor">                                       message )</span></div></pre><p>In the previous example, the user can specify a simple string for <em>message</em>, or a complex <a class="el" href="class_message.html">Message</a> object.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_message.html">Message</a> </dd></dl><p><hr><h2>Member Typedef Documentation</h2><a class="anchor" name="w0" doxytag="AdditionalMessage::SuperClass" ></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"> typedef <a class="el" href="class_message.html">Message</a> <a class="el" href="class_message.html">AdditionalMessage::SuperClass</a>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="a0" doxytag="AdditionalMessage::AdditionalMessage" ></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"> CPPUNIT_NS_BEGIN AdditionalMessage::AdditionalMessage           </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></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Constructs an empty <a class="el" href="class_message.html">Message</a>. <p>    </td>  </tr></table><a class="anchor" name="a1" doxytag="AdditionalMessage::AdditionalMessage" ></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"> AdditionalMessage::AdditionalMessage           </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>detail1</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>Constructs a <a class="el" href="class_message.html">Message</a> with the specified detail string. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>detail1</em>&nbsp;</td><td>Detail string of the message. If empty, then it is not added. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a2" doxytag="AdditionalMessage::AdditionalMessage" ></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"> AdditionalMessage::AdditionalMessage           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>detail1</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>Constructs a <a class="el" href="class_message.html">Message</a> with the specified detail string. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>detail1</em>&nbsp;</td><td>Detail string of the message. If empty, then it is not added. </td></tr>  </table></dl>    </td>  </tr></table><a class="anchor" name="a3" doxytag="AdditionalMessage::AdditionalMessage" ></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"> AdditionalMessage::AdditionalMessage           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="class_message.html">Message</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>other</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>Constructs a copy of the specified message. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>other</em>&nbsp;</td><td><a class="el" href="class_message.html">Message</a> to copy. </td></tr>  </table></dl>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="a4" doxytag="AdditionalMessage::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"> <a class="el" href="class_additional_message.html">AdditionalMessage</a> &amp; AdditionalMessage::operator=           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="class_message.html">Message</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>other</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>Assignment operator. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td></td><td valign=top><em>other</em>&nbsp;</td><td><a class="el" href="class_message.html">Message</a> to copy. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Reference on this object. </dd></dl>    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="_additional_message_8h-source.html">AdditionalMessage.h</a><li><a class="el" href="_additional_message_8cpp.html">AdditionalMessage.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 + -