25#ifndef quantlib_currency_hpp
26#define quantlib_currency_hpp
48 const std::string&
code,
61 const std::string&
code,
67 const std::string& formatString,
74 const std::string&
name()
const;
76 const std::string&
code()
const;
80 const std::string&
symbol()
const;
94 [[deprecated(
"Copy the formatting into your project if you need it.")]]
95 std::string
format()
const;
185 return data_->numeric;
190 return data_->symbol;
195 return data_->fractionSymbol;
200 return data_->fractionsPerUnit;
205 return data_->rounding;
212 return data_->formatString;
223 return data_->triangulated;
228 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
std::string format() const
output format
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)
#define QL_DEPRECATED_DISABLE_WARNING
#define QL_DEPRECATED_ENABLE_WARNING
std::string fractionSymbol
QL_DEPRECATED std::string formatString
std::set< std::string > minorUnitCodes