Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWCurrency



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

Synopsis

#include<rw/money/currency.h>
RWCurrency USDollars("USD", 840, "dollar", "cents", 0.01);

Related Java Class

com.roguewave.money.currency.v1_0.Currency

Description

The RWCurrency class provides a repository for the following currency information:

If you omit the introduction date and the expiration date when constructing an RWCurrency object, the constructor assigns them values of the public static data members RWCurrency::noIntroductionDate and RWCurrency::noExpirationDate, respectively.

Static Public Data Members

static const RWDate noExpirationDate;
static const RWDate noIntroductionDate;

Public Constructors

RWCurrency();
RWCurrency(const RWCurrency& c);
RWCurrency(const RWCString& mnemonic, 
           int code, const RWCString& name,
           const RWCString& fractionName, 
           double wholeToFractRatio);
RWCurrency(const RWCString& mnemonic, 
           int code, const RWCString& name,
           const RWCString& fractionName, 
           double wholeToFractRatio, const RWDate& intro,
           constRWDate& expire);

Public Member Operators

RWCurrency&
operator=(const RWCurrency& c);

Public Member Functions

int 
code() const;
RWDate
expirationDate() const;
RWCString 
fractionName() const;
RWBoolean
hasExpired() const;
RWDate
introductionDate() const;
RWBoolean
isActive() const;
RWCString 
mnemonic() const;
RWCString 
name() const;
void 
restoreFrom(RWFile&);
void 
restoreFrom(RWvistream&);
void 
setCode(int code);
RWDate
setExpirationDate(const RWDate& d);
RWDate
setIntroductionDate(const RWDate& d);
void 
saveOn(RWFile&) const;
void 
saveOn(RWvostream&) const;
void 
setFractionName(const RWCString& name);
void 
setName(const RWCString& name);
void 
setMnemonic(const RWCString& mnemonic);
void 
setWholeToFractionRatio(double ratio);
RWCString 
wholeToFractionRatio() const;

Related Global Operators

RWBoolean 
operator==(const RWCurrency& lhs, const RWCurrency& rhs);
RWvostream& 
operator<<(RWvostream& strm, const RWCurrency& c);
RWFile& 
operator<<(RWFile& file, const RWCurrency& c);
RWvistream& 
operator>>(RWvistream& strm, const RWCurrency& c);
RWFile& 
operator>>(RWFile& strm, const RWCurrency& c);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.