Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Currency Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWExchangeGroup<T>

Module:  Currency   Group:  Conversion


Does not inherit

Local Index

Members

Synopsis

#include<rw/currency/exchggroup.h>

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:

Currency Module 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 DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, 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.