University of Sheffield   

    The Simons
    Component Library

Introduction   Class Hierarchy   Class Listing   Index of Classes   Index of Methods   Header Files  

DecimalBox Class Reference

#include <Value.h>

Inheritance diagram for DecimalBox:

Value Object List of all members.

Detailed Description

DecimalBox: the wrapper for a Decimal value.


Public Member Functions

 DecimalBox ()
 Construct a default DecimalBox.

 ~DecimalBox ()
 Release a DecimalBox.

 DecimalBox (Decimal)
 Initialise a DecimalBox to a Decimal value.

virtual ObjectID clone () const
 Clone a deep copy of this DecimalBox.

virtual TypeID type () const
 Return the Type of this DecimalBox.

virtual Natural hash () const
 Return a quasi-unique hash code for this DecimalBox.

virtual Order compare (ObjectID) const
 Compare this DecimalBox with another.

Void readOn (ReaderID)
 Read this DecimalBox on a Reader stream.

Void writeOn (WriterID) const
 Write this DecimalBox on a Writer stream.

virtual Decimal toDecimal () const
 Convert this DecimalBox to a Decimal value.


Constructor & Destructor Documentation

DecimalBox::DecimalBox  ) 
 

Construct a default DecimalBox.

Returns:
a DecimalBox.

DecimalBox::~DecimalBox  ) 
 

Release a DecimalBox.

DecimalBox::DecimalBox Decimal  value  ) 
 

Initialise a DecimalBox to a Decimal value.

Parameters:
value - the Decimal value.
Returns:
a DecimalBox.


Member Function Documentation

ObjectID DecimalBox::clone  )  const [virtual]
 

Clone a deep copy of this DecimalBox.

Returns:
a copy of this DecimalBox.

Reimplemented from Object.

Order DecimalBox::compare ObjectID  other  )  const [virtual]
 

Compare this DecimalBox with another.

Two Decimal numbers x, y are considered EQUAL if 1 + (x - y) - 1 is indistinguishable from zero.

Parameters:
other - the other DecimalBox.
Returns:
an Order in { NONE, LESS, EQUAL, MORE }

Reimplemented from Object.

Natural DecimalBox::hash  )  const [virtual]
 

Return a quasi-unique hash code for this DecimalBox.

A folding hash which treats the Decimal as a block of two Natural numbers and returns the XOR of these.

Returns:
a quasi-unique hash code.

Reimplemented from Object.

Void DecimalBox::readOn ReaderID  in  )  [virtual]
 

Read this DecimalBox on a Reader stream.

Read in the wrapped Decimal value.

Reimplemented from Object.

Decimal DecimalBox::toDecimal  )  const [inline, virtual]
 

Convert this DecimalBox to a Decimal value.

Returns:
a Decimal value.

Reimplemented from Object.

TypeID DecimalBox::type  )  const [virtual]
 

Return the Type of this DecimalBox.

Returns:
the type descriptor for "Decimal".

Reimplemented from Object.

Void DecimalBox::writeOn WriterID  out  )  const [virtual]
 

Write this DecimalBox on a Writer stream.

Write out the wrapped Decimal value.

Reimplemented from Object.


The documentation for this class was generated from the following files:
Generated on Fri May 5 17:17:16 2006 for The Simons Component Library by doxygen1.3