26#include <ql/currency.hpp>
27#include <ql/patterns/singleton.hpp>
28#include <ql/time/calendar.hpp>
30#include <boost/thread/lock_types.hpp>
31#include <boost/thread/shared_mutex.hpp>
36class CurrencyParser :
public QuantLib::Singleton<CurrencyParser, std::integral_constant<bool, true>> {
44 const std::string& delimiters)
const;
46 void addCurrency(
const std::string& newName,
const QuantLib::Currency& currency);
47 void addMetal(
const std::string& newName,
const QuantLib::Currency& currency);
48 void addCrypto(
const std::string& newName,
const QuantLib::Currency& currency);
std::set< std::string > pseudoCurrencyCodes() const
void addCrypto(const std::string &newName, const QuantLib::Currency ¤cy)
void addMinorCurrencyCodes(const QuantLib::Currency ¤cy)
std::map< std::string, QuantLib::Currency > minorCurrencies_
bool isCryptoCurrency(const std::string &name) const
std::string getMinorCurrency(const std::string &name) const
bool isPreciousMetal(const std::string &name) const
QuantLib::Real convertMinorToMajorCurrency(const std::string &s, QuantLib::Real value)
std::map< std::string, QuantLib::Currency > cryptoCurrencies_
std::map< std::string, QuantLib::Currency > currencies_
bool isPseudoCurrency(const std::string &name) const
bool isMinorCurrency(const std::string &name) const
std::pair< QuantLib::Currency, QuantLib::Currency > parseCurrencyPair(const std::string &name, const std::string &delimiters) const
QuantLib::Currency parseCurrency(const std::string &name) const
QuantLib::Currency parseCurrencyWithMinors(const std::string &name) const
bool isValidCurrency(const std::string &name) const
QuantLib::Currency parseMinorCurrency(const std::string &name) const
boost::shared_mutex mutex_
std::map< std::string, QuantLib::Currency > preciousMetals_
void addCurrency(const std::string &newName, const QuantLib::Currency ¤cy)
void addMetal(const std::string &newName, const QuantLib::Currency ¤cy)
bool hasMinorCurrency(const std::string &name) const
SafeStack< ValueType > value
Serializable Credit Default Swap.