SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWExchangeGroupImpl< T > Class Template Referenceabstract

Abstract base class from which all exchange group implementation classes must derive. Implements the handle-body pattern in which RWExchangeGroup is the handle. More...

#include <rw/currency/exchggroup.h>

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

Public Member Functions

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

Detailed Description

template<class T>
class RWExchangeGroupImpl< T >

RWExchangeGroupImpl is an abstract base class from which all exchange group implementation classes must derive. Class RWExchangeGroup is the handle class, which forwards all conversion requests to its associated implementation class.

Synopsis
#include <rw/currency/exchggroup.h>

Constructor & Destructor Documentation

template<class T >
RWExchangeGroupImpl< T >::RWExchangeGroupImpl ( )
inline

Default constructor.

Member Function Documentation

template<class T >
virtual RWExchangeGroupImpl<T>* RWExchangeGroupImpl< T >::clone ( ) const
pure virtual

Returns a copy of self allocated off the heap.

Implemented in RWEuroGroup< T >, RWDivisionGroup< T >, and RWMultiplicationGroup< T >.

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

Implemented in RWEuroGroup< T >, RWDivisionGroup< T >, and RWMultiplicationGroup< T >.

template<class T >
virtual RWCString RWExchangeGroupImpl< T >::name ( ) const
pure virtual

Returns a name to be associated with the group.

Implemented in RWEuroGroup< T >, RWDivisionGroup< T >, and RWMultiplicationGroup< T >.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.