Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_calculation_interface_definition.html
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 16:16:55 +0100
changeset 6 43e37759235e
permissions -rw-r--r--
Week 12 contribution of example code"

<!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: CCalculationInterfaceDefinition 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>CCalculationInterfaceDefinition Class Reference</h1><!-- doxytag: class="CCalculationInterfaceDefinition" -->
<p>Inherited by <a class="el" href="class_c_implementation_class_multiply.html">CImplementationClassMultiply</a>, and <a class="el" href="class_c_implementation_class_plus.html">CImplementationClassPlus</a>.</p>

<p><a href="class_c_calculation_interface_definition-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">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_calculation_interface_definition.html#a7c76e2d8ad48a27b54c8ed32f3e86791">~CCalculationInterfaceDefinition</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual TReal&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_calculation_interface_definition.html#aa0f96f52f4d5b6c55d7aa6b0aea0c3b7">Calculate</a> (TReal aA, TReal aB)=0</td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <br class="typebreak"/>
<a class="el" href="class_c_calculation_interface_definition.html">CCalculationInterfaceDefinition</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_calculation_interface_definition.html#a0c188739edb316bd3a93843f6d997593">NewL</a> (const TDesC8 &amp;aOperationName)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Class: <a class="el" href="class_c_calculation_interface_definition.html">CCalculationInterfaceDefinition</a></p>
<p>Description: Custom ECOM interface definition. This interface is used by clients to find specific instance and do corresponding calculation operation for given too numbers. Plugin implementations implement the Calculate function. </p>

<p>Definition at line <a class="el" href="_e_com_interface_definition_8h_source.html#l00042">42</a> of file <a class="el" href="_e_com_interface_definition_8h_source.html">EComInterfaceDefinition.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7c76e2d8ad48a27b54c8ed32f3e86791"></a><!-- doxytag: member="CCalculationInterfaceDefinition::~CCalculationInterfaceDefinition" ref="a7c76e2d8ad48a27b54c8ed32f3e86791" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CCalculationInterfaceDefinition::~CCalculationInterfaceDefinition </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Function: ~CCalculationInterfaceDefinition</p>
<p>Description: Wraps ECom object destruction. Notifies the ECOM framework that specific instance is being destroyed. See <a class="el" href="_e_com_interface_definition_8inl_source.html">EcomInterfaceDefinition.inl</a> for details. </p>

<p>Definition at line <a class="el" href="_e_com_interface_definition_8inl_source.html#l00012">12</a> of file <a class="el" href="_e_com_interface_definition_8inl_source.html">EComInterfaceDefinition.inl</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0c188739edb316bd3a93843f6d997593"></a><!-- doxytag: member="CCalculationInterfaceDefinition::NewL" ref="a0c188739edb316bd3a93843f6d997593" args="(const TDesC8 &amp;aOperationName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_calculation_interface_definition.html">CCalculationInterfaceDefinition</a> * CCalculationInterfaceDefinition::NewL </td>
          <td>(</td>
          <td class="paramtype">const TDesC8 &amp;&nbsp;</td>
          <td class="paramname"> <em>aOperationName</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Function: NewL</p>
<p>Description: Wraps ECom object instantitation. Will search for interface implementation, which matches to given aOperationName.</p>
<p>Param: aOperationName name of requested implementation. Implementations advertise their "name" as specified in their resource file field IMPLEMENTATION_INFO::default_data. For details, see <a class="el" href="_e_com_interface_definition_8inl_source.html">EcomInterfaceDefinition.inl</a> comments. In this example, the allowed values are "sum" and "multiply".</p>
<p>Note: This is not a "normal" NewL method, since normally NewL methods are only defined for concrete classes. Note that also implementations of this interface provide NewL methods. They are the familiar NewL's, which create instance of classes. </p>

<p>Definition at line <a class="el" href="_e_com_interface_definition_8inl_source.html#l00027">27</a> of file <a class="el" href="_e_com_interface_definition_8inl_source.html">EComInterfaceDefinition.inl</a>.</p>

</div>
</div>
<a class="anchor" id="aa0f96f52f4d5b6c55d7aa6b0aea0c3b7"></a><!-- doxytag: member="CCalculationInterfaceDefinition::Calculate" ref="aa0f96f52f4d5b6c55d7aa6b0aea0c3b7" args="(TReal aA, TReal aB)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual TReal CCalculationInterfaceDefinition::Calculate </td>
          <td>(</td>
          <td class="paramtype">TReal&nbsp;</td>
          <td class="paramname"> <em>aA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TReal&nbsp;</td>
          <td class="paramname"> <em>aB</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Function: Calculate</p>
<p>Description: Public interface service. Implementation does some calculation for given a and b. The result of calculation depends on the implementation.</p>
<p>Param: aA one of the numbers used for calculation</p>
<p>Param: aB the other of the numbers used for calculation</p>
<p>Returns: Result of calculation. </p>

<p>Implemented in <a class="el" href="class_c_implementation_class_multiply.html#a98bf35aa5af5c34252b4393f6ae12d7b">CImplementationClassMultiply</a>, and <a class="el" href="class_c_implementation_class_plus.html#a70d7373c904aaacf3bacb493a1aa34e3">CImplementationClassPlus</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>