A collection of all currencies replaced by the Euro, in which each object implements the RWTriangularExchange conversion type.
More...
#include <rw/currency/euroexchggrp.h>
|
(Note that these are not member functions.)
|
template<class T > |
std::ostream & | operator<< (std::ostream &strm, const RWEuroGroup< T > &grp) |
|
template<class T > |
std::istream & | operator>> (std::istream &strm, RWEuroGroup< T > &grp) |
|
template<class T>
class RWEuroGroup< T >
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 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 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.
- Synopsis
#include <rw/currency/euroexchggrp.h>
#include <rw/tvslist.h>
Default constructor. Constructs an empty group. The default value of euro_mnemonic identifies the Euro currency and is used to look up rates in the exchange rate table, information in the currency book, and so forth.
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.
Adds the currency mnemonic to the Euro exchange group. Returns false
if the currency was already in the group and true
otherwise.
Removes all Euro currencies from the group.
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.
Creates and returns an RWExchangeGroup object with a RWEuroGroup implementation. The list of Euro currencies contained in the implementation is empty.
Creates and returns an RWExchangeGroup 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
Creates and returns an RWExchangeGroup object with an RWEuroGroup implementation. This implementation uses the currencies in currencyList to define the currencies in the Euro group.
Returns the RWCString for the Euro currency mnemonic.
Returns a list of currency mnemonics that are in the Euro group.
Creates and returns a currency exchange object for converting money in the source currency to money in the target currency using the exchange rates table rates. If the parameters are invalid, the Rogue Wave classes that derive from this class return an invalid exchange object.
Implements RWExchangeGroupImpl< T >.
Returns the number of currencies in the Euro group.
Removes the given currency from the Euro group. Returns false
if the currency was not found in the group, and true
otherwise.
Replaces the list of Euro currencies with list.
Sets the Euro currency mnemonic for this object.
template<class T >
std::ostream & operator<< |
( |
std::ostream & |
strm, |
|
|
const RWEuroGroup< T > & |
grp |
|
) |
| |
|
related |
template<class T >
std::istream & operator>> |
( |
std::istream & |
strm, |
|
|
RWEuroGroup< T > & |
grp |
|
) |
| |
|
related |
Name that identifies the Euro exchange group. Returned by the name() method.