currencygithub.com/castedo/isomon

isomon Documentation

Castedo Ellerman


Table of Contents

Overview
Structure
Purpose
Currency Library
Class currency
Low-level C functions
Other Currency Classes
Acknowledgements
Money Library
isomon::money
isomon::money_calc
Other Money (or Decimal) Classes

Overview

Structure

The isomon library has a low-level C interface which provide safe simple access to ISO currency data. See the Reference or currency.h if you are only interested in accessing ISO currency data from C.

For those programming in C++ the isomon::currency class provides essentially the same service as the low-level C interface but in the friendly and type-safe interface of a C++ class.

For quantities of money you can us isomon::money which depends on isomon::currency. But if you only need to represent world currencies then you can use only isomon::currency without any dependecy on the isomon::money class.

Purpose

Quantities of money are more than just numbers. Money today is usually denominated in a government backed currency and has a smallest unit for concrete transactions. Most currencies have a smallest unit which is smaller than one, which create special challenges when using the most popular data representation for fractional numbers: binary floating-point, in particular the C type double.

The isomon classes provide a efficient high-level and type-safe representation of the real-world constructs of currency and quantities of money. They are value types which have comparable time and space performance to the built-in types of C.