Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_user_interface.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TB9.2 Example Applications: CUserInterface Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>CUserInterface Class Reference</h1><!-- doxytag: class="CUserInterface" -->
<p><a href="class_c_user_interface-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#aa8a0207b3e2e8fa75dc320249bc55439">Initialize</a> (CConsoleBase *aConsole, <a class="el" href="class_c_timer_entry.html">CTimerEntry</a> *aTimerEntry)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#a8c143ef7ca363188ea135090f5de77b5">RunL</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#ae05bc833da45def9d5f78b766bd36fc4">DoCancel</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#ae5fc74a4d70f9a30f027aa56cd3827d2">~CUserInterface</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#a9f9158c56f74b7c8da6c527f346c9952">ReadFunc</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#a3f4f73849ca681db69f9c5cf546de0c2">Initialize</a> (CConsoleBase *aConsole, <a class="el" href="class_c_producer.html">CProducer</a> *aProducer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c143ef7ca363188ea135090f5de77b5"></a><!-- doxytag: member="CUserInterface::RunL" ref="a8c143ef7ca363188ea135090f5de77b5" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>RunL</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae05bc833da45def9d5f78b766bd36fc4"></a><!-- doxytag: member="CUserInterface::DoCancel" ref="ae05bc833da45def9d5f78b766bd36fc4" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>DoCancel</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f9158c56f74b7c8da6c527f346c9952"></a><!-- doxytag: member="CUserInterface::ReadFunc" ref="a9f9158c56f74b7c8da6c527f346c9952" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>ReadFunc</b> ()</td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_c_user_interface.html">CUserInterface</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#acb29c660858994d24137bb413fee4af8">NewL</a> (CConsoleBase *aConsole, <a class="el" href="class_c_timer_entry.html">CTimerEntry</a> *aTimerEntry)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_c_user_interface.html">CUserInterface</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_user_interface.html#abc39d0697d4b335dc3567726ea1b2a16">NewL</a> (CConsoleBase *aConsole, <a class="el" href="class_c_producer.html">CProducer</a> *aProducer)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class processes key press events from the console. The example prints a menu and waits for the user to select an option from the menu. The <a class="el" href="class_c_user_interface.html#a8c143ef7ca363188ea135090f5de77b5">CUserInterface::RunL()</a> function handles the asynchronous key press event. </p>

<p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2inc_2userinterface_8h_source.html#l00032">32</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2inc_2userinterface_8h_source.html">userinterface.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae5fc74a4d70f9a30f027aa56cd3827d2"></a><!-- doxytag: member="CUserInterface::~CUserInterface" ref="ae5fc74a4d70f9a30f027aa56cd3827d2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CUserInterface::~CUserInterface </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor. </p>

<p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html#l00099">99</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acb29c660858994d24137bb413fee4af8"></a><!-- doxytag: member="CUserInterface::NewL" ref="acb29c660858994d24137bb413fee4af8" args="(CConsoleBase *aConsole, CTimerEntry *aTimerEntry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_user_interface.html">CUserInterface</a> * CUserInterface::NewL </td>
          <td>(</td>
          <td class="paramtype">CConsoleBase *&nbsp;</td>
          <td class="paramname"> <em>aConsole</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_timer_entry.html">CTimerEntry</a> *&nbsp;</td>
          <td class="paramname"> <em>aTimerEntry</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The static function to create an object of the <a class="el" href="class_c_user_interface.html">CUserInterface</a> class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aConsole</em>&nbsp;</td><td>The console object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aTimerEntry</em>&nbsp;</td><td>A pointer to an object of the <a class="el" href="class_c_timer_entry.html">CTimerEntry</a> class. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="class_c_user_interface.html">CUserInterface</a> object. </dd></dl>

<p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html#l00030">30</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa8a0207b3e2e8fa75dc320249bc55439"></a><!-- doxytag: member="CUserInterface::Initialize" ref="aa8a0207b3e2e8fa75dc320249bc55439" args="(CConsoleBase *aConsole, CTimerEntry *aTimerEntry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUserInterface::Initialize </td>
          <td>(</td>
          <td class="paramtype">CConsoleBase *&nbsp;</td>
          <td class="paramname"> <em>aConsole</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_timer_entry.html">CTimerEntry</a> *&nbsp;</td>
          <td class="paramname"> <em>aTimerEntry</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initialize the data members of the <a class="el" href="class_c_user_interface.html">CUserInterface</a> class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aConsole</em>&nbsp;</td><td>The console object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aTimerEntry</em>&nbsp;</td><td>A pointer to an object of the <a class="el" href="class_c_timer_entry.html">CTimerEntry</a> class. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html#l00042">42</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8c143ef7ca363188ea135090f5de77b5"></a><!-- doxytag: member="CUserInterface::RunL" ref="a8c143ef7ca363188ea135090f5de77b5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUserInterface::RunL </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Handles the key press events from the console. It stops the active scheduler if any key is pressed.</p>
<p>Handles the key press events from the console. The following actions are defined for a key press event:</p>
<ul>
<li>Call the CPRoducer::Produce() function if 'p' is pressed</li>
<li>Call the CPRoducer::Display() function if 'd' is pressed</li>
<li>Stop the active scheduler if any other key is pressed </li>
</ul>

<p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html#l00061">61</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae05bc833da45def9d5f78b766bd36fc4"></a><!-- doxytag: member="CUserInterface::DoCancel" ref="ae05bc833da45def9d5f78b766bd36fc4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUserInterface::DoCancel </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Cancel any outstanding request. </p>

<p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html#l00087">87</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9f9158c56f74b7c8da6c527f346c9952"></a><!-- doxytag: member="CUserInterface::ReadFunc" ref="a9f9158c56f74b7c8da6c527f346c9952" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUserInterface::ReadFunc </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Issues an outstanding request to get a keystroke from the console. </p>

<p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html#l00074">74</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2deltaque_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="abc39d0697d4b335dc3567726ea1b2a16"></a><!-- doxytag: member="CUserInterface::NewL" ref="abc39d0697d4b335dc3567726ea1b2a16" args="(CConsoleBase *aConsole, CProducer *aProducer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_user_interface.html">CUserInterface</a> * CUserInterface::NewL </td>
          <td>(</td>
          <td class="paramtype">CConsoleBase *&nbsp;</td>
          <td class="paramname"> <em>aConsole</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_producer.html">CProducer</a> *&nbsp;</td>
          <td class="paramname"> <em>aProducer</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The static function to create an object of the <a class="el" href="class_c_user_interface.html">CUserInterface</a> class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aConsole</em>&nbsp;</td><td>The console object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aProducer</em>&nbsp;</td><td>A pointer to an object of the <a class="el" href="class_c_producer.html">CProducer</a> class. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aConsumer</em>&nbsp;</td><td>A pointer to an object of the <a class="el" href="class_c_consumer.html">CConsumer</a> class. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="class_c_user_interface.html">CUserInterface</a> object. </dd></dl>

<p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarlocal_2src_2userinterface_8cpp_source.html#l00032">32</a> of file <a class="el" href="_i_p_c_2condvar_2condvarlocal_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3f4f73849ca681db69f9c5cf546de0c2"></a><!-- doxytag: member="CUserInterface::Initialize" ref="a3f4f73849ca681db69f9c5cf546de0c2" args="(CConsoleBase *aConsole, CProducer *aProducer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUserInterface::Initialize </td>
          <td>(</td>
          <td class="paramtype">CConsoleBase *&nbsp;</td>
          <td class="paramname"> <em>aConsole</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_producer.html">CProducer</a> *&nbsp;</td>
          <td class="paramname"> <em>aProducer</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initialize the data members of the <a class="el" href="class_c_user_interface.html">CUserInterface</a> class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>aConsole</em>&nbsp;</td><td>The console object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aProducer</em>&nbsp;</td><td>A pointer to an object of the <a class="el" href="class_c_producer.html">CProducer</a> class. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>aConsumer</em>&nbsp;</td><td>A pointer to an object of the <a class="el" href="class_c_consumer.html">CConsumer</a> class. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarlocal_2src_2userinterface_8cpp_source.html#l00045">45</a> of file <a class="el" href="_i_p_c_2condvar_2condvarlocal_2src_2userinterface_8cpp_source.html">userinterface.cpp</a>.</p>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>