25#ifndef quantlib_currency_hpp
26#define quantlib_currency_hpp
48 const std::string&
code,
60 const std::string&
name()
const;
62 const std::string&
code()
const;
66 const std::string&
symbol()
const;
142 return data_->numeric;
147 return data_->symbol;
152 return data_->fractionSymbol;
157 return data_->fractionsPerUnit;
162 return data_->rounding;
171 return data_->triangulated;
176 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
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
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
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