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

📄 _synchronized_object_8h-source.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>SynchronizedObject.h</h1><a href="_synchronized_object_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="preprocessor">#ifndef CPPUNIT_SYNCHRONIZEDOBJECT_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CPPUNIT_SYNCHRONIZEDOBJECT_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include &lt;<a class="code" href="_portability_8h.html">cppunit/Portability.h</a>&gt;</span>00005 00006 00007 <a class="code" href="_portability_8h.html#a6">CPPUNIT_NS_BEGIN</a>00008 00009 <a name="l00022"></a><a class="code" href="class_synchronized_object.html">00022</a> <span class="keyword">class </span>CPPUNIT_API SynchronizedObject00023 {00024 <span class="keyword">public</span>:<a name="l00027"></a><a class="code" href="class_synchronized_object_1_1_synchronization_object.html">00027</a>   <span class="keyword">class </span><a class="code" href="class_synchronized_object_1_1_synchronization_object.html">SynchronizationObject</a>00028   {00029     <span class="keyword">public</span>:<a name="l00030"></a><a class="code" href="class_synchronized_object_1_1_synchronization_object.html#a0">00030</a>       <a class="code" href="class_synchronized_object_1_1_synchronization_object.html">SynchronizationObject</a>() {}<a name="l00031"></a><a class="code" href="class_synchronized_object_1_1_synchronization_object.html#a1">00031</a>       <span class="keyword">virtual</span> ~<a class="code" href="class_synchronized_object_1_1_synchronization_object.html">SynchronizationObject</a>() {}00032 <a name="l00033"></a><a class="code" href="class_synchronized_object_1_1_synchronization_object.html#a2">00033</a>       <span class="keyword">virtual</span> <span class="keywordtype">void</span> lock() {}<a name="l00034"></a><a class="code" href="class_synchronized_object_1_1_synchronization_object.html#a3">00034</a>       <span class="keyword">virtual</span> <span class="keywordtype">void</span> unlock() {}00035   };00036 00039   SynchronizedObject( SynchronizationObject *syncObject =0 );00040 00042   <span class="keyword">virtual</span> ~SynchronizedObject();00043 00044 <span class="keyword">protected</span>:<a name="l00047"></a><a class="code" href="class_synchronized_object_1_1_exclusive_zone.html">00047</a>   <span class="keyword">class </span><a class="code" href="class_synchronized_object_1_1_exclusive_zone.html">ExclusiveZone</a>00048   {<a name="l00049"></a><a class="code" href="class_synchronized_object_1_1_exclusive_zone.html#r0">00049</a>     <a class="code" href="class_synchronized_object_1_1_synchronization_object.html">SynchronizationObject</a> *m_syncObject;00050 00051   <span class="keyword">public</span>:<a name="l00052"></a><a class="code" href="class_synchronized_object_1_1_exclusive_zone.html#a0">00052</a>     <a class="code" href="class_synchronized_object_1_1_exclusive_zone.html">ExclusiveZone</a>( <a class="code" href="class_synchronized_object_1_1_synchronization_object.html">SynchronizationObject</a> *syncObject ) 00053         : m_syncObject( syncObject ) 00054     { 00055       m_syncObject-&gt;lock(); 00056     }00057 <a name="l00058"></a><a class="code" href="class_synchronized_object_1_1_exclusive_zone.html#a1">00058</a>     ~<a class="code" href="class_synchronized_object_1_1_exclusive_zone.html">ExclusiveZone</a>() 00059     { 00060       m_syncObject-&gt;unlock (); 00061     }00062   };00063 00064   <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSynchronizationObject( SynchronizationObject *syncObject );00065 00066 <span class="keyword">protected</span>:<a name="l00067"></a><a class="code" href="class_synchronized_object.html#p0">00067</a>   <a class="code" href="class_synchronized_object_1_1_synchronization_object.html">SynchronizationObject</a> *m_syncObject;00068 00069 <span class="keyword">private</span>:00071   SynchronizedObject( <span class="keyword">const</span> SynchronizedObject &amp;copy );00072 00074   <span class="keywordtype">void</span> operator =( <span class="keyword">const</span> SynchronizedObject &amp;copy );00075 };00076 00077 00078 <a class="code" href="_portability_8h.html#a7">CPPUNIT_NS_END</a>00079 00080 <span class="preprocessor">#endif  // CPPUNIT_SYNCHRONIZEDOBJECT_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 + -