Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWExchangeGroup<T>



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

Synopsis

#include<rw/money/exchggroup.h>

Related Java Class

com.roguewave.money.currency.v1_0.ExchangeGroup

Description

A currency exchange group is a collection of currencies that have a common distinguishing characteristic related to converting money from one currency to money of another currency. For example, the Euro Currency Exchange Group consists of all the currencies that will eventually be replaced by the Euro. All currencies in the Euro Currency Exchange Group use the same, special rule for converting money between currencies in this group.

The exchange group classes are implemented using a handle/body or bridge design pattern. The handle class is RWExchangeGroup<T>. This class contains a pointer to implementation class RWExchangeGroupImpl<T>. RWExchangeGroupImpl is an abstract base class from which all currency group implementations must derive. The purpose of an exchange group object is to take as input a source currency, target currency, and an exchange rate table, then produce an exchange object. Thus a key component of the class RWExchangeGroupImpl is a pure virtual method:

Money.h++ includes three currency exchange group implementation classes:

Public Constructors

RWExchangeGroup();
RWExchangeGroup(const RWExchangeGroup<T>& eg);
RWExchangeGroup(RWExchangeGroupImpl<T>* imp);

Public Member Functions

RWExchange<T>
getExchange(const RWCString& sourceMnemonic
            const RWCString& targetMnemnoic
            const RWExchangeRateTable& rates)const;
RWExchangeGroupImpl<T>* 
impl() const;
RWCString
name() const = 0;
void
setImpl(RWExchangeGroupImpl<T>* i);

Public Member Operators

RWExchangeGroup<T>& 
operator=(const RWExchange<T>& eg);


Previous fileTop of DocumentContentsIndexNext file

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