Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWExchangeRate



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

Synopsis

#include <rw/money/exchgrate.h>
RWExchangeRate r("USD", "INR",42.254);

Related Java Class

com.roguewave.money.currency.v1_0.ExchangeRate

Description

Class RWExchangeRate encapsulates a source currency, a target currency, and a conversion factor, which is, by convention, a multiplicative conversion factor. This means that the source currency amount is multiplied by the conversion factor to obtain the equivalent amount in the target currency. Source and target currencies are stored by their mnemonics and the conversion factor is stored as a double precision floating point number.

Public Constructors

RWExchangeRate();
RWExchangeRate(const RWCString& sourceMnemonic,
               const RWCString& targetMnemonic, double f);
RWExchangeRate(const RWEXchangeRate& r);

Public Member Operators

RWExchangeRate& 
operator=(const RWExchangeRate& r);

Public Member Functions

double 
conversionFactor() const;
void 
restoreFrom(RWFile&);
void 
restoreFrom(RWvistream&);
void 
saveOn(RWFile&) const;
void 
saveOn(RWvostream&) const;
void 
setconversionFactor(double factor);
void 
setSource(const RWCString& mnemonic);
void 
setTarget(const RWCString& mnemonic);
RWCString 
source() const;
RWCString 
target() const;

Related Global Operators

RWBoolean 
operator==(const RWExchangeRate& lhs, 
           const RWEXchangeRate& rhs);
RWvostream& 
operator<<(RWvostream& strm, const RWExchangeRate& r);
RWFile& 
operator<<(RWFile& file, const RWExchangeRate& r);
RWvistream& 
operator>>(RWvistream& strm, const RWExchangeRate& r);
RWFile& 
operator>>(RWFile& strm, const RWExchangeRate& r);


Previous fileTop of DocumentContentsIndexNext file

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