|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
|
3 <title>TB10.1 Example Applications: CAdder Class Reference</title> |
|
4 <link href="doxygen.css" rel="stylesheet" type="text/css"> |
|
5 <link href="tabs.css" rel="stylesheet" type="text/css"> |
|
6 </head><body> |
|
7 <!-- Generated by Doxygen 1.5.3 --> |
|
8 <h1>CAdder Class Reference</h1><!-- doxytag: class="CAdder" --> |
|
9 <p> |
|
10 <a href="class_c_adder-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
|
11 <tr><td></td></tr> |
|
12 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
|
13 <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#76003b0896145aa8d396f596bb8fbe31">~CAdder</a> ()</td></tr> |
|
14 |
|
15 <tr><td class="memItemLeft" nowrap align="right" valign="top">TInt </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#1a7d0002967f1aa090a6beb84a433d4c">Add</a> ()</td></tr> |
|
16 |
|
17 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#258412cf6a78091b2b9f641dadb8e41b">RunL</a> ()</td></tr> |
|
18 |
|
19 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#73d41c81991e4cf7b65e3644aba926cc">DoCancel</a> ()</td></tr> |
|
20 |
|
21 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#004d5ec0fb8626310fdf85843c87ec67">StartTimer</a> ()</td></tr> |
|
22 |
|
23 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#5d5d56b9ce85c971c2e48b575f792d9d">StopTimer</a> ()</td></tr> |
|
24 |
|
25 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#800f42785c37c746dadd65c90b7e0dfa">ReadFunction</a> ()</td></tr> |
|
26 |
|
27 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1a7d0002967f1aa090a6beb84a433d4c"></a><!-- doxytag: member="CAdder::Add" ref="1a7d0002967f1aa090a6beb84a433d4c" args="()" --> |
|
28 void </td><td class="memItemRight" valign="bottom"><b>Add</b> ()</td></tr> |
|
29 |
|
30 <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> |
|
31 <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_c_adder.html">CAdder</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#a703f5386236c2fa9ad3b750f521200a">NewL</a> (<a class="el" href="class_c_long_number.html">CLongNumber</a> *aNum1)</td></tr> |
|
32 |
|
33 <tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_c_adder.html">CAdder</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#c207184f306dec25c5430f2c510f5c3c">NewL</a> (CConsoleBase *aConsole)</td></tr> |
|
34 |
|
35 <tr><td class="memItemLeft" nowrap align="right" valign="top">static TInt </td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_adder.html#6e524c7466f89ca4ab9896f5bae13f3e">AddFunction</a> (TAny *aPtr)</td></tr> |
|
36 |
|
37 </table> |
|
38 <hr><a name="_details"></a><h2>Detailed Description</h2> |
|
39 This class stores an object of the <a class="el" href="class_c_long_number.html">CLongNumber</a> class. It has methods to calculate the sum of all digits of the number represented by the iLongNumber object.<p> |
|
40 The adder class. This class creates the global chunk and periodically adds random values to it. It also creates:<ul> |
|
41 <li>the global condition variable</li><li>the global mutex variable</li><li>the timer object The condition variable ensures that the value of the chunk is always less than 100. </li></ul> |
|
42 |
|
43 <p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2inc_2adder_8h-source.html#l00031">31</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2inc_2adder_8h-source.html">adder.h</a>.</p> |
|
44 <hr><h2>Constructor & Destructor Documentation</h2> |
|
45 <a class="anchor" name="76003b0896145aa8d396f596bb8fbe31"></a><!-- doxytag: member="CAdder::~CAdder" ref="76003b0896145aa8d396f596bb8fbe31" args="()" --> |
|
46 <div class="memitem"> |
|
47 <div class="memproto"> |
|
48 <table class="memname"> |
|
49 <tr> |
|
50 <td class="memname">CAdder::~CAdder </td> |
|
51 <td>(</td> |
|
52 <td class="paramname"> </td> |
|
53 <td> ) </td> |
|
54 <td width="100%"></td> |
|
55 </tr> |
|
56 </table> |
|
57 </div> |
|
58 <div class="memdoc"> |
|
59 |
|
60 <p> |
|
61 Destructor. |
|
62 <p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2src_2adder_8cpp-source.html#l00073">73</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
63 |
|
64 </div> |
|
65 </div><p> |
|
66 <hr><h2>Member Function Documentation</h2> |
|
67 <a class="anchor" name="a703f5386236c2fa9ad3b750f521200a"></a><!-- doxytag: member="CAdder::NewL" ref="a703f5386236c2fa9ad3b750f521200a" args="(CLongNumber *aNum1)" --> |
|
68 <div class="memitem"> |
|
69 <div class="memproto"> |
|
70 <table class="memname"> |
|
71 <tr> |
|
72 <td class="memname"><a class="el" href="class_c_adder.html">CAdder</a> * CAdder::NewL </td> |
|
73 <td>(</td> |
|
74 <td class="paramtype"><a class="el" href="class_c_long_number.html">CLongNumber</a> * </td> |
|
75 <td class="paramname"> <em>aLongNumber</em> </td> |
|
76 <td> ) </td> |
|
77 <td width="100%"><code> [static]</code></td> |
|
78 </tr> |
|
79 </table> |
|
80 </div> |
|
81 <div class="memdoc"> |
|
82 |
|
83 <p> |
|
84 Creates an object of the <a class="el" href="class_c_adder.html">CAdder</a> class. <dl compact><dt><b>Parameters:</b></dt><dd> |
|
85 <table border="0" cellspacing="2" cellpadding="0"> |
|
86 <tr><td valign="top"></td><td valign="top"><em>aLongNumber</em> </td><td>A pointer to the object of the <a class="el" href="class_c_long_number.html">CLongNumber</a> class. </td></tr> |
|
87 </table> |
|
88 </dl> |
|
89 <dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the object of the <a class="el" href="class_c_adder.html">CAdder</a> class. </dd></dl> |
|
90 |
|
91 <p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2src_2adder_8cpp-source.html#l00030">30</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
92 |
|
93 </div> |
|
94 </div><p> |
|
95 <a class="anchor" name="1a7d0002967f1aa090a6beb84a433d4c"></a><!-- doxytag: member="CAdder::Add" ref="1a7d0002967f1aa090a6beb84a433d4c" args="()" --> |
|
96 <div class="memitem"> |
|
97 <div class="memproto"> |
|
98 <table class="memname"> |
|
99 <tr> |
|
100 <td class="memname">void CAdder::Add </td> |
|
101 <td>(</td> |
|
102 <td class="paramname"> </td> |
|
103 <td> ) </td> |
|
104 <td width="100%"></td> |
|
105 </tr> |
|
106 </table> |
|
107 </div> |
|
108 <div class="memdoc"> |
|
109 |
|
110 <p> |
|
111 Performs the addition of all digits of the iLongNumber object. <dl class="return" compact><dt><b>Returns:</b></dt><dd>The sum of all digits of the iLongNumber object.</dd></dl> |
|
112 Adds a random integer value to the global chunk. |
|
113 <p>Definition at line <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2src_2adder_8cpp-source.html#l00047">47</a> of file <a class="el" href="_arrays_and_lists_2linkedlist_2sgllist_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
114 |
|
115 </div> |
|
116 </div><p> |
|
117 <a class="anchor" name="c207184f306dec25c5430f2c510f5c3c"></a><!-- doxytag: member="CAdder::NewL" ref="c207184f306dec25c5430f2c510f5c3c" args="(CConsoleBase *aConsole)" --> |
|
118 <div class="memitem"> |
|
119 <div class="memproto"> |
|
120 <table class="memname"> |
|
121 <tr> |
|
122 <td class="memname"><a class="el" href="class_c_adder.html">CAdder</a> * CAdder::NewL </td> |
|
123 <td>(</td> |
|
124 <td class="paramtype">CConsoleBase * </td> |
|
125 <td class="paramname"> <em>aConsole</em> </td> |
|
126 <td> ) </td> |
|
127 <td width="100%"><code> [static]</code></td> |
|
128 </tr> |
|
129 </table> |
|
130 </div> |
|
131 <div class="memdoc"> |
|
132 |
|
133 <p> |
|
134 Performs the two-phase construction of an object of the <a class="el" href="class_c_adder.html">CAdder</a> class. <dl compact><dt><b>Parameters:</b></dt><dd> |
|
135 <table border="0" cellspacing="2" cellpadding="0"> |
|
136 <tr><td valign="top"></td><td valign="top"><em>aConsole</em> </td><td>The console object. </td></tr> |
|
137 </table> |
|
138 </dl> |
|
139 <dl class="return" compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="class_c_adder.html">CAdder</a> object. </dd></dl> |
|
140 |
|
141 <p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html#l00030">30</a> of file <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
142 |
|
143 </div> |
|
144 </div><p> |
|
145 <a class="anchor" name="258412cf6a78091b2b9f641dadb8e41b"></a><!-- doxytag: member="CAdder::RunL" ref="258412cf6a78091b2b9f641dadb8e41b" args="()" --> |
|
146 <div class="memitem"> |
|
147 <div class="memproto"> |
|
148 <table class="memname"> |
|
149 <tr> |
|
150 <td class="memname">void CAdder::RunL </td> |
|
151 <td>(</td> |
|
152 <td class="paramname"> </td> |
|
153 <td> ) </td> |
|
154 <td width="100%"></td> |
|
155 </tr> |
|
156 </table> |
|
157 </div> |
|
158 <div class="memdoc"> |
|
159 |
|
160 <p> |
|
161 Handles the key press events from the console. It stops the active scheduler for any key press event. |
|
162 <p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html#l00043">43</a> of file <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
163 |
|
164 </div> |
|
165 </div><p> |
|
166 <a class="anchor" name="73d41c81991e4cf7b65e3644aba926cc"></a><!-- doxytag: member="CAdder::DoCancel" ref="73d41c81991e4cf7b65e3644aba926cc" args="()" --> |
|
167 <div class="memitem"> |
|
168 <div class="memproto"> |
|
169 <table class="memname"> |
|
170 <tr> |
|
171 <td class="memname">void CAdder::DoCancel </td> |
|
172 <td>(</td> |
|
173 <td class="paramname"> </td> |
|
174 <td> ) </td> |
|
175 <td width="100%"></td> |
|
176 </tr> |
|
177 </table> |
|
178 </div> |
|
179 <div class="memdoc"> |
|
180 |
|
181 <p> |
|
182 Cancel any outstanding request. |
|
183 <p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html#l00058">58</a> of file <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
184 |
|
185 </div> |
|
186 </div><p> |
|
187 <a class="anchor" name="004d5ec0fb8626310fdf85843c87ec67"></a><!-- doxytag: member="CAdder::StartTimer" ref="004d5ec0fb8626310fdf85843c87ec67" args="()" --> |
|
188 <div class="memitem"> |
|
189 <div class="memproto"> |
|
190 <table class="memname"> |
|
191 <tr> |
|
192 <td class="memname">void CAdder::StartTimer </td> |
|
193 <td>(</td> |
|
194 <td class="paramname"> </td> |
|
195 <td> ) </td> |
|
196 <td width="100%"></td> |
|
197 </tr> |
|
198 </table> |
|
199 </div> |
|
200 <div class="memdoc"> |
|
201 |
|
202 <p> |
|
203 Starts the timer object. <dl class="see" compact><dt><b>See also:</b></dt><dd>CPeriodic::Start(). </dd></dl> |
|
204 |
|
205 <p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html#l00139">139</a> of file <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
206 |
|
207 </div> |
|
208 </div><p> |
|
209 <a class="anchor" name="5d5d56b9ce85c971c2e48b575f792d9d"></a><!-- doxytag: member="CAdder::StopTimer" ref="5d5d56b9ce85c971c2e48b575f792d9d" args="()" --> |
|
210 <div class="memitem"> |
|
211 <div class="memproto"> |
|
212 <table class="memname"> |
|
213 <tr> |
|
214 <td class="memname">void CAdder::StopTimer </td> |
|
215 <td>(</td> |
|
216 <td class="paramname"> </td> |
|
217 <td> ) </td> |
|
218 <td width="100%"></td> |
|
219 </tr> |
|
220 </table> |
|
221 </div> |
|
222 <div class="memdoc"> |
|
223 |
|
224 <p> |
|
225 Stops the timer object. |
|
226 <p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html#l00148">148</a> of file <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
227 |
|
228 </div> |
|
229 </div><p> |
|
230 <a class="anchor" name="800f42785c37c746dadd65c90b7e0dfa"></a><!-- doxytag: member="CAdder::ReadFunction" ref="800f42785c37c746dadd65c90b7e0dfa" args="()" --> |
|
231 <div class="memitem"> |
|
232 <div class="memproto"> |
|
233 <table class="memname"> |
|
234 <tr> |
|
235 <td class="memname">void CAdder::ReadFunction </td> |
|
236 <td>(</td> |
|
237 <td class="paramname"> </td> |
|
238 <td> ) </td> |
|
239 <td width="100%"></td> |
|
240 </tr> |
|
241 </table> |
|
242 </div> |
|
243 <div class="memdoc"> |
|
244 |
|
245 <p> |
|
246 Issues an outstanding request to get a keystroke from the console. |
|
247 <p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html#l00126">126</a> of file <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
248 |
|
249 </div> |
|
250 </div><p> |
|
251 <a class="anchor" name="6e524c7466f89ca4ab9896f5bae13f3e"></a><!-- doxytag: member="CAdder::AddFunction" ref="6e524c7466f89ca4ab9896f5bae13f3e" args="(TAny *aPtr)" --> |
|
252 <div class="memitem"> |
|
253 <div class="memproto"> |
|
254 <table class="memname"> |
|
255 <tr> |
|
256 <td class="memname">TInt CAdder::AddFunction </td> |
|
257 <td>(</td> |
|
258 <td class="paramtype">TAny * </td> |
|
259 <td class="paramname"> <em>aPtr</em> </td> |
|
260 <td> ) </td> |
|
261 <td width="100%"><code> [static]</code></td> |
|
262 </tr> |
|
263 </table> |
|
264 </div> |
|
265 <div class="memdoc"> |
|
266 |
|
267 <p> |
|
268 The call back function for the CAdder::iPeriodic object. <dl compact><dt><b>Parameters:</b></dt><dd> |
|
269 <table border="0" cellspacing="2" cellpadding="0"> |
|
270 <tr><td valign="top"></td><td valign="top"><em>aPtr</em> </td><td>Contains the address of the object passed as an argument to the <a class="el" href="class_c_adder.html#6e524c7466f89ca4ab9896f5bae13f3e">AddFunction()</a>. </td></tr> |
|
271 </table> |
|
272 </dl> |
|
273 <dl class="return" compact><dt><b>Returns:</b></dt><dd>KErrNone. </dd></dl> |
|
274 |
|
275 <p>Definition at line <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html#l00159">159</a> of file <a class="el" href="_i_p_c_2condvar_2condvarglobal_2src_2adder_8cpp-source.html">adder.cpp</a>.</p> |
|
276 |
|
277 </div> |
|
278 </div><p> |
|
279 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 21 10:33:03 2010 for TB10.1 Example Applications by |
|
280 <a href="http://www.doxygen.org/index.html"> |
|
281 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
|
282 </body> |
|
283 </html> |