SourcePro Analysis : Currency Module User’s Guide : Currency Conversions : Creating Custom Exchange Objects and Groups
Creating Custom Exchange Objects and Groups
Imagine that you have the following problem. You have exchange rates for many currencies, but all of the rates are for converting currencies to and from US Dollars. There are no rates for directly converting currency A to currency B when neither A nor B are US Dollars. However, it’s likely that you have rates for exchanging A and B to and from US Dollars. In such cases, you can employ an indirect conversion strategy for converting A to B, using US Dollars as the base currency.
This section describes how you can create a class called USDollarBaseExchange to implement such an exchange strategy. The class created here can be used by itself or as an implementation for the RWExchange class.
NOTE: Source code for the classes and programs described throughout Creating Custom Exchange Objects and Groups are available in buildspace\examples\currency.