Calculator Class Reference

A simple class to test. More...

#include <Calculator.h>

List of all members.

Public Member Functions

 Calculator (int in_base)
 Construct the object.
int add (int num)
 Add a value.
int sub (int num)
 Subtract a value.

Detailed Description

A simple class to test.

The class is constructed with a value which serves as a base for different calculations.

Definition at line 25 of file Calculator.h.


Constructor & Destructor Documentation

Calculator::Calculator ( int  in_base  )  [inline]

Construct the object.

Parameters:
in_base the base value for all calculations

Definition at line 32 of file Calculator.h.


Member Function Documentation

int Calculator::add ( int  num  )  [inline]

Add a value.

Parameters:
num value to add
Returns:
result of base and input

Definition at line 40 of file Calculator.h.

References global_error.

Referenced by Calculator_test::test_add().

int Calculator::sub ( int  num  )  [inline]

Subtract a value.

Parameters:
num value to subtract
Returns:
result of base and input

Definition at line 49 of file Calculator.h.

References global_error.

Referenced by Calculator_test::test_sub().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 18:03:33 2010 for mockpp-tutorial by  doxygen 1.6.1