Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWDecimalPortable

Module:  Essential Tools Module   Group:  Traditional Collection


RWDecimalPortable RWDecimalBase

Local Index

Members

Non-Members

Synopsis

#include <rw/tools/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 Functions

virtual RWspace
binaryStoreSize() const;
friend unsigned
hash() const;
RWBoolean
isNumber() const;

NOTE -- Note: In this instance, the mathematical rather than the RDBMS meaning of NULL is intended. Please see the entry for the RWDBNullIndicator class in the SourcePro DB Reference Guide.
RWCString
asString(const RWLocale&) const;
RWCString
asString() 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 DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.