RWEuroGroup<T> RWExchangeGroupImpl<T>
Data Types | |
groupName |
#include <rw/money/euroexchggrp.h> #include <rw/tvslist.h> RWTValSlist<RWCString> euroCurrencies; RWEuroGroup<double> euroGroup(euroCurrencies);
com.roguewave.money.currency.v1_0.EuroGroup
Currency exchange groups are collections of currencies that have a common distinguishing characteristic when it comes to converting money from one currency to money of another currency. RWEuroGroup<T> is a currency exchange group class that consists of all currencies replaced by the Euro. RWEuroGroup objects create and return RWExchange objects with the RWTriangularExchange<T> implementation.
NOTE:The Euro itself is not in the Euro exchange group because the triangular exchange algorithm is not used when converting to or from Euros.
const char* groupName;
Name that identifies the euro exchange group. Returned by the name() method inherited from RWExchangeGroupImpl<T>.
RWEuroGroup<T>(const char* euroMnemonic="EUR");
Default constructor. Constructs an empty group. The default value of euroMnemonic identifies the Euro currency and is used to look up rates in the exchange rate table, information in the currency book, and so forth.
RWEuroGroup<T>(const RWEuroGroup<T>& e);
Copy constructor.
RWEuroGroup<T>(const RWTValSlist<RWCString> euroCurrencies,const char* euroMnemonic="EUR");
Constructs a Euro exchange group containing the currencies whose mnemonics are contained in euroCurrencies. The default value of euroMnemonic identifies the Euro currency and is used to look up rates in the exchange rate table, information in the currency book, and so forth.
RWEuroGroup<T>& operator=(const RWEuroGroup<T>& e);
Assignment operator.
RWExchangeGroup<T> create();
Creates and returns an RWExchangeGroup<T> object with a RWEuroGroup implementation. The list of Euro currencies contained in the implementation is empty.
RWExchangeGroup<T> create(const RWTValSlist<RWCString>& currencyList, const char* euroMnemonic);
Creates and returns an RWExchangeGroup<T> object with a RWEuroGroup implementation. This implementation uses the currencies in currencyList to define the currencies in the Euro group.
RWExchangeGroup<T> create(istream& strm, const char* euroMnemonic);
Creates and returns an RWExchangeGroup<T> object with a RWEuroGroup implementation. This implementation uses strm to define the currencies in the Euro group. The stream format must have one currency mnemonic per line, as in the following example:
ATS BEF FIM FRF DEM IEP ITL LUF NLG ESP PTE
RWBoolean addCurrency(const RWCString& currencyMnemonic);
Adds the currency mnemonic to the Euro exchange group. Returns FALSE if the currency was already in the group and TRUE otherwise.
void clear();
Removes all Euro currencies from the group.
RWExchangeGroupImpl<T>* clone() const;
Inherited from RWExchangeGroupImpl<T>.
RWBoolean containsCurrency(const RWCString& currencyMnemonic);
Returns TRUE if the given currency is in the Euro exchange group. Note that the Euro is not in the Euro exchange group since you do not use the triangulation algorithm when converting from or to Euros.
RWCString euroMnemonic() const
Returns the RWCString for the Euro currency mnemonic.
RWTValSlist<RWCString> getCurrencies() const;
Returns a list of currency mnemonics that are in the Euro group.
RWExchange<T> getExchange(const RWCString& srcMnemonic, const RWCString& tragetMnemonic, const RWExchangeRateTable& rates ) const;
Inherited from RWExchangeGroupImpl<T>.
RWCString name() const;
Inherited from RWExchangeGroupImpl<T>.
size_t numCurrencies() const;
Returns the number of currencies in the Euro group.
RWBoolean removeCurrency(const RWCString& currencyMnemonic);
Removes the given currency from the Euro group. Returns FALSE if the currency was not found in the group and TRUE otherwise.
void setCurrencies(const RWTValSlist<RWCString>& l);
Replaces the list of Euro currencies with l.
void setEuroMnemonic(const RWCString& mnemonic);
Sets the Euro currency mnemonic for this object.
ostream& operator<<(ostream& strm, const RWEuroGroup<T>& grp); istream& operator>>(istream& strm, RWEuroGroup<T>& grp);
Reads and writes grp to a stream. The stream has the format described in the static create() method included above.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.