25#ifndef quantlib_currency_hpp
26#define quantlib_currency_hpp
28#include <ql/math/rounding.hpp>
29#include <ql/errors.hpp>
48 const std::string&
code,
54 const std::string& formatString,
61 const std::string&
name()
const;
63 const std::string&
code()
const;
67 const std::string&
symbol()
const;
78 std::string
format()
const;
134 QL_REQUIRE(
data_,
"no currency data provided");
149 return data_->numeric;
154 return data_->symbol;
159 return data_->fractionSymbol;
164 return data_->fractionsPerUnit;
169 return data_->rounding;
174 return data_->formatString;
183 return data_->triangulated;
188 return data_->minorUnitCodes;
const Rounding & rounding() const
rounding convention
const std::string & code() const
ISO 4217 three-letter code, e.g, "USD".
const std::string & name() const
currency name, e.g, "U.S. Dollar"
bool empty() const
is this a usable instance?
Integer numericCode() const
ISO 4217 numeric code, e.g, "840".
const std::set< std::string > & minorUnitCodes() const
minor unit codes, e.g. GBp, GBX for GBP
std::string format() const
output format
Integer fractionsPerUnit() const
number of fractionary parts in a unit, e.g, 100
const Currency & triangulationCurrency() const
currency used for triangulated exchange when required
void checkNonEmpty() const
ext::shared_ptr< Data > data_
const std::string & fractionSymbol() const
fraction symbol, e.g, "ยข"
const std::string & symbol() const
symbol, e.g, "$"
Currency()=default
default constructor
QL_INTEGER Integer
integer number
bool operator==(const Currency &c1, const Currency &c2)
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
bool operator!=(const Currency &c1, const Currency &c2)
std::string fractionSymbol
std::set< std::string > minorUnitCodes