CASNumeric Class Reference
[NumericValues]

Base class for providing an interface to numeric CASObject. More...

#include <casnumeric.h>

Inheritance diagram for CASNumeric:

CASObject LongInt List of all members.

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.

Detailed Description

Inline base class for providing an interface to numeric CASObject.

Definition at line 65 of file casnumeric.h.


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.


Member Function Documentation

void CASNumeric::AbsoluteIP (  )  [inline, virtual]

Makes the value absolute in place.

Returns:
void.

Implements CASObject.

Definition at line 228 of file casnumeric.h.

unsigned long CASNumeric::GetDivDepth (  )  const [inline]

Gets the depth of a division.

Returns:
an unsigned long indicating 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.

Returns:
unsigned long indicating 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.

Returns:
void.

Implements CASObject.

Definition at line 236 of file casnumeric.h.

bool CASNumeric::IsNegative (  )  const [inline]

Returns whether or not the value is negative.

Returns:
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.

Returns:
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.

Parameters:
d Unsigned long specifying the division depth.
Returns:
void.

Definition at line 191 of file casnumeric.h.

void CASNumeric::SetNegative (  )  [inline]

Explicitly sets the value to negative.

Returns:
void.

Definition at line 164 of file casnumeric.h.

void CASNumeric::SetPositive (  )  [inline]

Explicitly sets the value to positive.

Returns:
void.

Definition at line 172 of file casnumeric.h.

void CASNumeric::SetRadix ( unsigned long  r  )  [inline]

Sets the radix of the numerical value.

Parameters:
r Unsigned long specifying the radix.
Returns:
void.

Definition at line 210 of file casnumeric.h.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Generated on Sun Dec 31 01:57:31 2006 for ECAS by  doxygen 1.4.7