rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWMultiplicationGroup< T > Class Template Reference
[Currency Conversions]

Represents a collection of currencies that have a common distinguishing characteristic for converting money from one currency to money of another currency. More...

#include <rw/currency/multexchggrp.h>

Inheritance diagram for RWMultiplicationGroup< T >:
RWExchangeGroupImpl< T >

List of all members.

Public Member Functions

 RWMultiplicationGroup ()
virtual RWExchange< T > getExchange (const RWCString &srcMnemonic, const RWCString &tragetMnemonic, const RWExchangeRateTable &rates) const
virtual RWCString name () const
virtual RWExchangeGroupImpl< T > * clone () const

Static Public Member Functions

static RWExchangeGroup< T > create ()

Static Public Attributes

static const char * groupName

Detailed Description

template<class T>
class RWMultiplicationGroup< T >

Currency exchange groups are collections of currencies that have a common distinguishing characteristic for converting money from one currency to money of another currency. RWMultiplicationGroup<T> is made up of objects that convert a source currency to a target currency by multiplying the amount of the source currency by a conversion factor.

Note:
Currencies that use the triangular conversion method required by the EMU are available in class RWEuroGroup<T>. Currencies that convert a source currency to a target currency by dividing the amount of the source by a conversion factor are available in RWDivisionGroup<T>.

The multiplication exchange group overrides the base class method:

 RWExchange<T>
 const RWCString& target,
 const RWExchangeRateTable& rates);

so that it looks in the exchange rate table for an exchange rate that converts the source currency to the target currency. If it finds one, it creates and returns an RWExchange<T> object with an RWMultiplicationExchange<T> implementation. If it does not find one, it returns an invalid RWExchange<T> object.

Synopsis

 #include <rw/currency/multexchggrp.h>
 RWMultiplicatonGroup multGroup;

Constructor & Destructor Documentation

template<class T >
RWMultiplicationGroup< T >::RWMultiplicationGroup (  )  [inline]

Default constructor. Constructs an empty group.


Member Function Documentation

template<class T >
virtual RWExchangeGroupImpl<T>* RWMultiplicationGroup< T >::clone (  )  const [inline, virtual]

Returns a copy of self allocated off the heap.

Implements RWExchangeGroupImpl< T >.

template<class T >
static RWExchangeGroup<T> RWMultiplicationGroup< T >::create (  )  [static]

Creates an RWExchangeGroup<T> object with an RWMultiplicationGroup<T> implementation.

template<class T >
virtual RWExchange<T> RWMultiplicationGroup< T >::getExchange ( const RWCString srcMnemonic,
const RWCString tragetMnemonic,
const RWExchangeRateTable rates 
) const [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 >.

template<class T >
virtual RWCString RWMultiplicationGroup< T >::name (  )  const [inline, virtual]

Returns a name to be associated with the group.

Implements RWExchangeGroupImpl< T >.


Member Data Documentation

template<class T >
const char* RWMultiplicationGroup< T >::groupName [static]

Name associated with the group. Returned by the name() member function.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.