SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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

◆ RWExchangeGroupImpl()

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

Default constructor.

Member Function Documentation

◆ clone()

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

Returns a copy of self allocated off the heap.

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

◆ getExchange()

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 RWDivisionGroup< T >, RWEuroGroup< T >, and RWMultiplicationGroup< T >.

◆ name()

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

Returns a name to be associated with the group.

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

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