CASObject.
More...
#include <casnumeric.h>
Inheritance diagram for CASNumeric:

Public Member Functions | |
| void | AbsoluteIP () |
| Makes the value absolute in place. | |
| CASNumeric (unsigned long r) | |
| Constructor. | |
| CASNumeric (bool n, unsigned long r) | |
| Constructor. | |
| CASNumeric (bool n) | |
| Constructor. | |
| CASNumeric () | |
| Constructor. | |
| unsigned long | GetDivDepth () const |
| Gets the depth of a division. | |
| unsigned long | GetRadix () const |
| Gets the radix of the numerical value. | |
| signedness | GetSign () const |
| Returns the sign. | |
| void | InvertIP () |
| Inverts the sign of the value in place. | |
| bool | IsNegative () const |
| Returns whether or not the value is negative. | |
| bool | IsPositive () const |
| Returns whether or not the value is positive. | |
| void | SetDivDepth (unsigned long d) |
| Sets the depth of a division. | |
| void | SetNegative () |
| Explicitly sets the value to negative. | |
| void | SetPositive () |
| Explicitly sets the value to positive. | |
| void | SetRadix (unsigned long r) |
| Sets the radix of the numerical value. | |
| void | SetSign (signedness s) |
| Sets the sign explicitly. | |
| virtual | ~CASNumeric () |
| Destructor. | |
Private Attributes | |
| unsigned long | div_depth |
| The maximum depth we divide to get the real part. | |
| bool | negative |
| Indicates whether or not the value is negative. | |
| unsigned long | radix |
| Holds the radix. | |
CASObject.
Definition at line 65 of file casnumeric.h.
| CASNumeric::CASNumeric | ( | ) | [inline] |
Constructor. Initializes negative to false, radix to 10, and div_depth to 10.
Definition at line 96 of file casnumeric.h.
| CASNumeric::CASNumeric | ( | bool | n | ) | [inline] |
Constructor. Initializes negative to n, radix to 10, div_depth to 10.
| n | Boolean indicates whether or not the numeric value is negative. |
Definition at line 109 of file casnumeric.h.
| CASNumeric::CASNumeric | ( | bool | n, | |
| unsigned long | r | |||
| ) | [inline] |
Constructor. Initializes negative to n, radix to r , div_depth to 10.
| n | Boolean indicates whether or not the numeric value is negative. | |
| r | Unsigned long specifying the radix. |
Definition at line 123 of file casnumeric.h.
| CASNumeric::CASNumeric | ( | unsigned long | r | ) | [inline] |
Constructor. Initializes negative to false, radix to r , div_depth to 10.
| r | Unsigned long specifying the radix. |
Definition at line 135 of file casnumeric.h.
| virtual CASNumeric::~CASNumeric | ( | ) | [inline, virtual] |
Dummy destructor.
Definition at line 243 of file casnumeric.h.
| void CASNumeric::AbsoluteIP | ( | ) | [inline, virtual] |
Makes the value absolute in place.
Implements CASObject.
Definition at line 228 of file casnumeric.h.
| unsigned long CASNumeric::GetDivDepth | ( | ) | const [inline] |
Gets the depth of a division.
Definition at line 200 of file casnumeric.h.
| unsigned long CASNumeric::GetRadix | ( | ) | const [inline] |
Gets the radix of the numerical value.
Definition at line 219 of file casnumeric.h.
| void CASNumeric::InvertIP | ( | ) | [inline, virtual] |
Inverts the sign of the value in place.
Implements CASObject.
Definition at line 236 of file casnumeric.h.
| bool CASNumeric::IsNegative | ( | ) | const [inline] |
Returns whether or not the value is negative.
true if the value is negative, false if it is positive. Definition at line 147 of file casnumeric.h.
| bool CASNumeric::IsPositive | ( | ) | const [inline] |
Returns whether or not the value is positive.
true if the value is positive, false if it is negative. Definition at line 156 of file casnumeric.h.
| void CASNumeric::SetDivDepth | ( | unsigned long | d | ) | [inline] |
Sets the depth of a division.
| d | Unsigned long specifying the division depth. |
Definition at line 191 of file casnumeric.h.
| void CASNumeric::SetNegative | ( | ) | [inline] |
| void CASNumeric::SetPositive | ( | ) | [inline] |
| void CASNumeric::SetRadix | ( | unsigned long | r | ) | [inline] |
Sets the radix of the numerical value.
| r | Unsigned long specifying the radix. |
Definition at line 210 of file casnumeric.h.
unsigned long CASNumeric::div_depth [private] |
The maximum depth we divide to get the real part. This can be used to determine how decimal places behind the period have to be calculated, given for example the divsion '1/3'.
Definition at line 87 of file casnumeric.h.
bool CASNumeric::negative [private] |
Indicates whether or not the value is negative.
Definition at line 72 of file casnumeric.h.
unsigned long CASNumeric::radix [private] |
Holds the radix.
Definition at line 78 of file casnumeric.h.
1.4.7