CAdder Class Reference
List of all members.
Detailed Description
This class stores an object of the CLongNumber class. It has methods to calculate the sum of all digits of the number represented by the iLongNumber object.
The adder class. This class creates the global chunk and periodically adds random values to it. It also creates:
- the global condition variable
- the global mutex variable
- the timer object The condition variable ensures that the value of the chunk is always less than 100.
Definition at line 31 of file adder.h.
Constructor & Destructor Documentation
Member Function Documentation
Creates an object of the CAdder class.
- Parameters:
-
| aLongNumber | A pointer to the object of the CLongNumber class. |
- Returns:
- A pointer to the object of the CAdder class.
Definition at line 30 of file adder.cpp.
Performs the addition of all digits of the iLongNumber object.
- Returns:
- The sum of all digits of the iLongNumber object.
Adds a random integer value to the global chunk.
Definition at line 47 of file adder.cpp.
CAdder * CAdder::NewL |
( |
CConsoleBase * |
aConsole |
) |
[static] |
Performs the two-phase construction of an object of the CAdder class.
- Parameters:
-
| aConsole | The console object. |
- Returns:
- A CAdder object.
Definition at line 30 of file adder.cpp.
Handles the key press events from the console. It stops the active scheduler for any key press event.
Definition at line 43 of file adder.cpp.
void CAdder::DoCancel |
( |
|
) |
|
Cancel any outstanding request.
Definition at line 58 of file adder.cpp.
void CAdder::StartTimer |
( |
|
) |
|
Starts the timer object.
- See also:
- CPeriodic::Start().
Definition at line 139 of file adder.cpp.
void CAdder::StopTimer |
( |
|
) |
|
Stops the timer object.
Definition at line 148 of file adder.cpp.
void CAdder::ReadFunction |
( |
|
) |
|
Issues an outstanding request to get a keystroke from the console.
Definition at line 126 of file adder.cpp.
TInt CAdder::AddFunction |
( |
TAny * |
aPtr |
) |
[static] |
The call back function for the CAdder::iPeriodic object.
- Parameters:
-
| aPtr | Contains the address of the object passed as an argument to the AddFunction(). |
- Returns:
- KErrNone.
Definition at line 159 of file adder.cpp.
Generated by
1.6.2
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.