?? _protector_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>Protector.h</h1><a href="_protector_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef CPPUNIT_PROTECTOR_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_PROTECTOR_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include <<a class="code" href="_source_line_8h.html">cppunit/SourceLine.h</a>></span>00005 00006 <a class="code" href="_portability_8h.html#a6">CPPUNIT_NS_BEGIN</a>00007 00008 <span class="keyword">class </span><a class="code" href="class_exception.html">Exception</a>;00009 <span class="keyword">class </span><a class="code" href="class_message.html">Message</a>;00010 <span class="keyword">class </span><a class="code" href="class_protector_context.html">ProtectorContext</a>;00011 <span class="keyword">class </span><a class="code" href="class_test_result.html">TestResult</a>;00012 00013 <a name="l00014"></a><a class="code" href="class_functor.html">00014</a> <span class="keyword">class </span>CPPUNIT_API Functor00015 {00016 <span class="keyword">public</span>:00017 <span class="keyword">virtual</span> ~Functor();00018 00019 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> operator()() <span class="keyword">const</span> =0;00020 };00021 00022 <a name="l00047"></a><a class="code" href="class_protector.html">00047</a> <span class="keyword">class </span>CPPUNIT_API Protector00048 {00049 <span class="keyword">public</span>:00050 <span class="keyword">virtual</span> ~Protector();00051 00052 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> protect( <span class="keyword">const</span> Functor &functor,00053 <span class="keyword">const</span> <a class="code" href="class_protector_context.html">ProtectorContext</a> &context ) =0;00054 00055 <span class="keyword">protected</span>:00056 <span class="keywordtype">void</span> reportError( <span class="keyword">const</span> <a class="code" href="class_protector_context.html">ProtectorContext</a> &context,00057 <span class="keyword">const</span> <a class="code" href="class_exception.html">Exception</a> &error ) <span class="keyword">const</span>;00058 00059 <span class="keywordtype">void</span> reportError( <span class="keyword">const</span> <a class="code" href="class_protector_context.html">ProtectorContext</a> &context,00060 <span class="keyword">const</span> <a class="code" href="class_message.html">Message</a> &message,00061 <span class="keyword">const</span> <a class="code" href="class_source_line.html">SourceLine</a> &sourceLine = <a class="code" href="class_source_line.html">SourceLine</a>() ) <span class="keyword">const</span>;00062 00063 <span class="keywordtype">void</span> reportFailure( <span class="keyword">const</span> <a class="code" href="class_protector_context.html">ProtectorContext</a> &context,00064 <span class="keyword">const</span> <a class="code" href="class_exception.html">Exception</a> &failure ) <span class="keyword">const</span>;00065 00066 <a class="code" href="class_message.html">Message</a> actualMessage( <span class="keyword">const</span> <a class="code" href="class_message.html">Message</a> &message,00067 <span class="keyword">const</span> <a class="code" href="class_protector_context.html">ProtectorContext</a> &context ) <span class="keyword">const</span>;00068 };00069 00070 <a name="l00076"></a><a class="code" href="class_protector_guard.html">00076</a> <span class="keyword">class </span>CPPUNIT_API ProtectorGuard00077 {00078 <span class="keyword">public</span>:00080 ProtectorGuard( <a class="code" href="class_test_result.html">TestResult</a> *result,00081 Protector *protector );00082 00084 ~ProtectorGuard();00085 00086 <span class="keyword">private</span>:<a name="l00087"></a><a class="code" href="class_protector_guard.html#r0">00087</a> <a class="code" href="class_test_result.html">TestResult</a> *m_result;00088 };00089 00090 <a class="code" href="_portability_8h.html#a7">CPPUNIT_NS_END</a>00091 00092 00093 <span class="preprocessor">#endif // CPPUNIT_PROTECTOR_H</span>00094 <span class="preprocessor"></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 + -