Rogue Wave banner
Previous fileTop of DocumentContentsIndexNo Next file

RWDecimalPortable


RWDecimalPortable RWDecimalBase

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/db/decport.h>

RWDecimalPortable dec;     // construct a decimal == 0
dec = "1.23";              // construct a decimal == 1.23

Description

RWDecimalPortable represents an arbitrary precision decimal fraction.

Related Classes

RWDecimalBase contains the following enum, used by the round() method:

enum RoundingMethod { PLAIN = 0, UP = 1, DOWN = 2,
BANKERS = 3, TRUNCATE = 2 };

Public Constructors

RWDecimalPortable();
RWDecimalPortable(const char* input);
RWDecimalPortable(long intPart);

Public Member Operator

operator RWCString();

Public Member Functions

virtual RWspace
binaryStoreSize() const;
friend unsigned
hash() const;
RWBoolean
isNumber() const;
friend void
restoreFrom(RWFile& file);
friend void
restoreFrom(RWvistream& vis);
friend void
saveOn(RWFile& file) const;
friend void
saveOn(RWvostream& vos) const;
void
trimZeros();

Related Global Functions

RWDecimalPortable
round(const RWDecimalPortable&,
      int digits,
      RoundingMethod = RWDecimalBase::PLAIN);
double
toDouble(const RWDecimalPortable&);

Related Global Operators

RWDecimalPortable 
operator-(const RWDecimalPortable&);
RWDecimalPortable 
operator+(const RWDecimalPortable&, const RWDecimalPortable&);
RWDecimalPortable 
operator-(const RWDecimalPortable&, const RWDecimalPortable&);
RWDecimalPortable 
operator*(const RWDecimalPortable&, const RWDecimalPortable&);
RWBoolean 
operator==(const RWDecimalPortable& x,
           const RWDecimalPortable& y);
RWBoolean 
operator>=(const RWDecimalPortable& x,
           const RWDecimalPortable& y);
RWBoolean 
operator!=(const RWDecimalPortable& x,
           const RWDecimalPortable& y);
RWBoolean 
operator<(const RWDecimalPortable& x,
          const RWDecimalPortable& y);
RWBoolean 
operator>(const RWDecimalPortable& x,
          const RWDecimalPortable& y);
RWBoolean 
operator<=(const RWDecimalPortable& x,
           const RWDecimalPortable& y);
ostream&
operator<<(ostream&, const RWDecimalPortable&);
ostream&
operator>>(istream&, RWDecimalPortable&);


Previous fileTop of DocumentContentsIndexNo Next file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.