📄 _message_8h-source.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>Message.h</h1><a href="_message_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef CPPUNIT_MESSAGE_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_MESSAGE_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include <<a class="code" href="_portability_8h.html">cppunit/Portability.h</a>></span>00005 00006 <span class="preprocessor">#if CPPUNIT_NEED_DLL_DECL</span>00007 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( push )</span>00008 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z</span>00009 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00010 <span class="preprocessor"></span>00011 <span class="preprocessor">#include <<a class="code" href="_cpp_unit_deque_8h.html">cppunit/portability/CppUnitDeque.h</a>></span>00012 <span class="preprocessor">#include <string></span>00013 00014 00015 <a class="code" href="_portability_8h.html#a6">CPPUNIT_NS_BEGIN</a>00016 00017 00018 <span class="preprocessor">#if CPPUNIT_NEED_DLL_DECL</span>00019 <span class="preprocessor"></span><span class="comment">// template class CPPUNIT_API std::deque<std::string>;</span>00020 <span class="preprocessor">#endif</span>00021 <span class="preprocessor"></span><a name="l00038"></a><a class="code" href="class_message.html">00038</a> <span class="keyword">class </span>CPPUNIT_API Message00039 {00040 <span class="keyword">public</span>:00041 Message();00042 00043 <span class="keyword">explicit</span> Message( <span class="keyword">const</span> std::string &shortDescription );00044 00045 Message( <span class="keyword">const</span> std::string &shortDescription,00046 <span class="keyword">const</span> std::string &detail1 );00047 00048 Message( <span class="keyword">const</span> std::string &shortDescription,00049 <span class="keyword">const</span> std::string &detail1,00050 <span class="keyword">const</span> std::string &detail2 );00051 00052 Message( <span class="keyword">const</span> std::string &shortDescription,00053 <span class="keyword">const</span> std::string &detail1,00054 <span class="keyword">const</span> std::string &detail2,00055 <span class="keyword">const</span> std::string &detail3 );00056 00060 <span class="keyword">const</span> std::string &shortDescription() <span class="keyword">const</span>;00061 00065 <span class="keywordtype">int</span> detailCount() <span class="keyword">const</span>;00066 00072 std::string detailAt( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;00073 00087 std::string details() <span class="keyword">const</span>;00088 00091 <span class="keywordtype">void</span> clearDetails();00092 00096 <span class="keywordtype">void</span> addDetail( <span class="keyword">const</span> std::string &detail );00097 00102 <span class="keywordtype">void</span> addDetail( <span class="keyword">const</span> std::string &detail1,00103 <span class="keyword">const</span> std::string &detail2 );00104 00110 <span class="keywordtype">void</span> addDetail( <span class="keyword">const</span> std::string &detail1,00111 <span class="keyword">const</span> std::string &detail2,00112 <span class="keyword">const</span> std::string &detail3 );00113 00117 <span class="keywordtype">void</span> addDetail( <span class="keyword">const</span> Message &message );00118 00122 <span class="keywordtype">void</span> setShortDescription( <span class="keyword">const</span> std::string &shortDescription );00123 00128 <span class="keywordtype">bool</span> operator ==( <span class="keyword">const</span> Message &other ) <span class="keyword">const</span>;00129 00130 00135 <span class="keywordtype">bool</span> operator !=( <span class="keyword">const</span> Message &other ) <span class="keyword">const</span>;00136 00137 <span class="keyword">private</span>:<a name="l00138"></a><a class="code" href="class_message.html#r0">00138</a> std::string m_shortDescription;00139 <a name="l00140"></a><a class="code" href="class_message.html#y0">00140</a> <span class="keyword">typedef</span> CppUnitDeque<std::string> Details;<a name="l00141"></a><a class="code" href="class_message.html#r1">00141</a> Details m_details;00142 };00143 00144 00145 <a class="code" href="_portability_8h.html#a7">CPPUNIT_NS_END</a>00146 00147 <span class="preprocessor">#if CPPUNIT_NEED_DLL_DECL</span>00148 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span>00149 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00150 <span class="preprocessor"></span>00151 00152 <span class="preprocessor">#endif // CPPUNIT_MESSAGE_H</span></div></pre><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 + -