Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_semaphore_example.html
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 6 43e37759235e
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>TB10.1 Example Applications: CSemaphoreExample Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<h1>CSemaphoreExample Class Reference</h1><!-- doxytag: class="CSemaphoreExample" -->
<p>
<a href="class_c_semaphore_example-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 Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_semaphore_example.html#a1bde5ce9ac1befd3249c4ea56a2d214">~CSemaphoreExample</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_semaphore_example.html#518cb178a863033b0eb4899035802924">StartThreads</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9760b73a11133bc1237d09ae2fc58242"></a><!-- doxytag: member="CSemaphoreExample::PrintMessage" ref="9760b73a11133bc1237d09ae2fc58242" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_semaphore_example.html#9760b73a11133bc1237d09ae2fc58242">PrintMessage</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <br>
<a class="el" href="class_c_semaphore_example.html">CSemaphoreExample</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_semaphore_example.html#12ed690de78daccf113004ba4ba02f42">NewL</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_semaphore_example.html#9a32bdc9ccf1e50c38b4accb4d7dfa56">ReadThreadFuncL</a> (TAny *aPtr)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static TInt&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_semaphore_example.html#38d9e05692b6122e501d04a4c481bdeb">WriteThreadFuncL</a> (TAny *aPtr)</td></tr>

<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_semaphore_example.html#206ff3d040178008062e201ecf67577f">ConstructL</a> ()</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class is the main class which starts the application, and starts two threads to read to/write from a database. 
<p>Definition at line <a class="el" href="_semaphore_example_8h-source.html#l00027">27</a> of file <a class="el" href="_semaphore_example_8h-source.html">SemaphoreExample.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a1bde5ce9ac1befd3249c4ea56a2d214"></a><!-- doxytag: member="CSemaphoreExample::~CSemaphoreExample" ref="a1bde5ce9ac1befd3249c4ea56a2d214" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CSemaphoreExample::~CSemaphoreExample           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor 
<p>Definition at line <a class="el" href="_semaphore_example_8cpp-source.html#l00023">23</a> of file <a class="el" href="_semaphore_example_8cpp-source.html">SemaphoreExample.cpp</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="12ed690de78daccf113004ba4ba02f42"></a><!-- doxytag: member="CSemaphoreExample::NewL" ref="12ed690de78daccf113004ba4ba02f42" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_semaphore_example.html">CSemaphoreExample</a> * CSemaphoreExample::NewL           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="class_c_semaphore_example.html#12ed690de78daccf113004ba4ba02f42">NewL()</a> 
<p>Definition at line <a class="el" href="_semaphore_example_8cpp-source.html#l00033">33</a> of file <a class="el" href="_semaphore_example_8cpp-source.html">SemaphoreExample.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="9a32bdc9ccf1e50c38b4accb4d7dfa56"></a><!-- doxytag: member="CSemaphoreExample::ReadThreadFuncL" ref="9a32bdc9ccf1e50c38b4accb4d7dfa56" args="(TAny *aPtr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TInt CSemaphoreExample::ReadThreadFuncL           </td>
          <td>(</td>
          <td class="paramtype">TAny *&nbsp;</td>
          <td class="paramname"> <em>aPtr</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function is called when iReadThread is resumed. It creates a cleanup stack and calls ReadDbFunc(). 
<p>Definition at line <a class="el" href="_semaphore_example_8cpp-source.html#l00161">161</a> of file <a class="el" href="_semaphore_example_8cpp-source.html">SemaphoreExample.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="38d9e05692b6122e501d04a4c481bdeb"></a><!-- doxytag: member="CSemaphoreExample::WriteThreadFuncL" ref="38d9e05692b6122e501d04a4c481bdeb" args="(TAny *aPtr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TInt CSemaphoreExample::WriteThreadFuncL           </td>
          <td>(</td>
          <td class="paramtype">TAny *&nbsp;</td>
          <td class="paramname"> <em>aPtr</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This function is called when iWriteThread is resumed. It creates a cleanup stack and calls WriteDbFunc(). 
<p>Definition at line <a class="el" href="_semaphore_example_8cpp-source.html#l00208">208</a> of file <a class="el" href="_semaphore_example_8cpp-source.html">SemaphoreExample.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="518cb178a863033b0eb4899035802924"></a><!-- doxytag: member="CSemaphoreExample::StartThreads" ref="518cb178a863033b0eb4899035802924" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSemaphoreExample::StartThreads           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Starts iReadThread and iWriteThread. 
<p>Definition at line <a class="el" href="_semaphore_example_8cpp-source.html#l00070">70</a> of file <a class="el" href="_semaphore_example_8cpp-source.html">SemaphoreExample.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="206ff3d040178008062e201ecf67577f"></a><!-- doxytag: member="CSemaphoreExample::ConstructL" ref="206ff3d040178008062e201ecf67577f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSemaphoreExample::ConstructL           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates and resumes two threads, one for reading from the database and other for writing into the database. Prints messages to console depending on whether the USE_SEMAPHORE macro is enabled or disabled. 
<p>Definition at line <a class="el" href="_semaphore_example_8cpp-source.html#l00046">46</a> of file <a class="el" href="_semaphore_example_8cpp-source.html">SemaphoreExample.cpp</a>.</p>

</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 21 10:33:07 2010 for TB10.1 Example Applications by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>