SourcePro® 2024.1 |
SourcePro® API Reference Guide |
A collection of all currencies replaced by the Euro, in which each object implements the RWTriangularExchange conversion type. More...
#include <rw/currency/euroexchggrp.h>
Public Member Functions | |
RWEuroGroup (const char *euro_mnemonic="EUR") | |
RWEuroGroup (const RWEuroGroup< T > &) | |
RWEuroGroup (const RWTValSlist< RWCString > &euroCurrencies, const char *euroMnemonic="EUR") | |
bool | addCurrency (const RWCString &) |
void | clear () |
virtual RWExchangeGroupImpl< T > * | clone () const |
bool | containsCurrency (const RWCString &) const |
RWCString | euroMnemonic () const |
RWTValSlist< RWCString > | getCurrencies () const |
virtual RWExchange< T > | getExchange (const RWCString &srcMnemonic, const RWCString &tragetMnemonic, const RWExchangeRateTable &rates) const |
virtual RWCString | name () const |
size_t | numCurrencies () const |
RWEuroGroup< T > & | operator= (const RWEuroGroup< T > &) |
bool | removeCurrency (const RWCString &) |
void | setCurrencies (const RWTValSlist< RWCString > &list) |
void | setEuroMnemonic (const RWCString &em) |
Public Member Functions inherited from RWExchangeGroupImpl< T > | |
RWExchangeGroupImpl () | |
Static Public Member Functions | |
static RWExchangeGroup< T > | create () |
static RWExchangeGroup< T > | create (const RWTValSlist< RWCString > ¤cyList, const char *euroMnem="EUR") |
static RWExchangeGroup< T > | create (std::istream &strm, const char *euroMnem="EUR") |
Static Public Attributes | |
static const char * | groupName |
Related Symbols | |
(Note that these are not member symbols.) | |
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) |
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.
|
inline |
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.
RWEuroGroup< T >::RWEuroGroup | ( | const RWEuroGroup< T > & | ) |
Copy constructor.
RWEuroGroup< T >::RWEuroGroup | ( | 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.
bool RWEuroGroup< T >::addCurrency | ( | const RWCString & | ) |
Adds the currency mnemonic to the Euro exchange group. Returns false
if the currency was already in the group and true
otherwise.
void RWEuroGroup< T >::clear | ( | ) |
Removes all Euro currencies from the group.
|
inlinevirtual |
Returns a copy of self allocated off the heap.
Implements RWExchangeGroupImpl< T >.
bool RWEuroGroup< T >::containsCurrency | ( | const RWCString & | ) | const |
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.
|
static |
Creates and returns an RWExchangeGroup object with a RWEuroGroup implementation. The list of Euro currencies contained in the implementation is empty.
|
static |
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.
|
static |
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:
|
inline |
Returns the RWCString for the Euro currency mnemonic.
RWTValSlist< RWCString > RWEuroGroup< T >::getCurrencies | ( | ) | const |
Returns a list of currency mnemonics that are in the Euro group.
|
virtual |
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 >.
|
inlinevirtual |
Returns a name to be associated with the group.
Implements RWExchangeGroupImpl< T >.
size_t RWEuroGroup< T >::numCurrencies | ( | ) | const |
Returns the number of currencies in the Euro group.
RWEuroGroup< T > & RWEuroGroup< T >::operator= | ( | const RWEuroGroup< T > & | ) |
Assignment operator.
bool RWEuroGroup< T >::removeCurrency | ( | const RWCString & | ) |
Removes the given currency from the Euro group. Returns false
if the currency was not found in the group, and true
otherwise.
void RWEuroGroup< T >::setCurrencies | ( | const RWTValSlist< RWCString > & | list | ) |
Replaces the list of Euro currencies with list.
|
inline |
Sets the Euro currency mnemonic for this object.
|
related |
Writes grp to a stream. The stream has the format described in the RWEuroGroup::create(std::istream&, const char*) method.
|
related |
Reads grp from a stream. The stream has the format described in the RWEuroGroup::create(std::istream&, const char*) method.
|
static |
Name that identifies the Euro exchange group. Returned by the name() method.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |