Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWExchangeRateTable



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

Synopsis

#include<rw/money/exchgratetbl.h>
ifstream strm(" exchange_rates.in");
RWExchangeRateTable rates;
rates.initialize();

Related Java Class

com.roguewave.money.currency.v1_0.ExchangeRateTable

Description

Class RWExchangeRateTable stores exchange rates as unique pairs of source and target currencies. No two exchange rates in the table have the same source-target currency pair.

The RWExchangeRateTable class can be initialized from a stream, in particular, from an ifstream (file). The format for the stream is:

Public Static Data Members

The following values are used for the names in the name/value pairs described in the RWExchangeRateTable::intialize() member function.

const RWCString sourceTag;
const RWCString targetTag;
const RWCstring conversionFactorTag;

Public Constructors

RWExchangeRateTable();
RWExchangeRateTable(const RWExchangeRateTable& t);

Public Member Operators

RWExchangeRateTable& 
operator=(const RWExchangeRateTable& rhs);

Public Member Functions

RWBoolean 
add(const RWExchangeRate& exchangeRate);
RWBoolean
add(const RWCString& source, const RWCString& target,
    double convFactor);
void
clear();
RWBoolean 
contains(const RWExchangeRate& rate);
RWBoolean 
contains(const RWCString& sourceMnemonic, 
         const RWCString& targetMnemonic);
size_t
entries() const;
RWBoolean 
findConversionFactor(const RWCString& sourceMnemonic, 
            RWCString targetMnemonic, double& factor);
RWBoolean 
findExchangeRate(const RWCString& sourceMnemonic, 
                 RWCString targetMnemonic,
                 RWExchangeRate& rate);
RWTValSlist<RWExchangeRate>
getAllExchangeRates()const;
RWBoolean
initialize(istream& strm);
RWBoolean 
remove(const RWExchangeRate& exchangeRate);
RWBoolean 
remove(const RWCString& sourceMnemonic, 
       const RWCString targetMnemonic);
void 
restoreFrom(RWFile&);
void 
restoreFrom(RWvistream&);
void 
saveOn(RWvostream&) const;
void 
saveOn(RWFile&) const;
RWBoolean 
setConversionFactor(const RWCString& source,
                    const RWCString& target, 
                    double convFactor);

Related Global Operators

RWvostream& 
operator<<(RWvostream& strm, const RWExchangeRateTable& r);
RWFile& 
operator<<(RWFile& file, const RWExchangeRateTable& r);
RWvistream& 
operator>>(RWvistream& strm, const RWExchangeRateTable& r);
RWFile& 
operator>>(RWFile& strm, const RWExchangeRateTable& r);
ostream& rwdcmlexport
operator<<(ostream& strm, const RWExchangeRateTable& t);
istream& rwdcmlexport
operator>>(istream& strm, RWExchangeRateTable& t);


Previous fileTop of DocumentContentsIndexNext file

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