Skip to content

Commit

Permalink
Remove features deprecated in version 1.33 (#2140)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio authored Jan 21, 2025
2 parents 70ec1ea + f8054a1 commit 947cab4
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 591 deletions.
46 changes: 14 additions & 32 deletions ql/currencies/africa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,106 +23,88 @@

namespace QuantLib {

QL_DEPRECATED_DISABLE_WARNING

// Angolan kwanza
AOACurrency::AOACurrency() {
static ext::shared_ptr<Data> aoaData(
new Data("Angolan kwanza", "AOA", 973, "AOA", "", 100, Rounding(), "1$.2f %3%"));
static auto aoaData = ext::make_shared<Data>("Angolan kwanza", "AOA", 973, "AOA", "", 100, Rounding());
data_ = aoaData;
}

// Botswanan pula
BWPCurrency::BWPCurrency() {
static ext::shared_ptr<Data> bwpData(
new Data("Botswanan pula", "BWP", 72, "P", "", 100, Rounding(), "1$.2f %3%"));
static auto bwpData = ext::make_shared<Data>("Botswanan pula", "BWP", 72, "P", "", 100, Rounding());
data_ = bwpData;
}

// Egyptian pound
EGPCurrency::EGPCurrency() {
static ext::shared_ptr<Data> egpData(
new Data("Egyptian pound", "EGP", 818, "EGP", "", 100, Rounding(), "1$.2f %3%"));
static auto egpData = ext::make_shared<Data>("Egyptian pound", "EGP", 818, "EGP", "", 100, Rounding());
data_ = egpData;
}

// Ethiopian birr
ETBCurrency::ETBCurrency() {
static ext::shared_ptr<Data> etbData(
new Data("Ethiopian birr", "ETB", 230, "ETB", "", 100, Rounding(), "1$.2f %3%"));
static auto etbData = ext::make_shared<Data>("Ethiopian birr", "ETB", 230, "ETB", "", 100, Rounding());
data_ = etbData;
}

// Ghanaian cedi
GHSCurrency::GHSCurrency() {
static ext::shared_ptr<Data> ghsData(
new Data("Ghanaian cedi", "GHS", 936, "GHS", "", 100, Rounding(), "1$.2f %3%"));
static auto ghsData = ext::make_shared<Data>("Ghanaian cedi", "GHS", 936, "GHS", "", 100, Rounding());
data_ = ghsData;
}

// Kenyan shilling
KESCurrency::KESCurrency() {
static ext::shared_ptr<Data> kesData(
new Data("Kenyan shilling", "KES", 404, "KES", "", 100, Rounding(), "1$.2f %3%"));
static auto kesData = ext::make_shared<Data>("Kenyan shilling", "KES", 404, "KES", "", 100, Rounding());
data_ = kesData;
}

// Moroccan dirham
MADCurrency::MADCurrency() {
static ext::shared_ptr<Data> madData(
new Data("Moroccan dirham", "MAD", 504, "MAD", "", 100, Rounding(), "1$.2f %3%"));
static auto madData = ext::make_shared<Data>("Moroccan dirham", "MAD", 504, "MAD", "", 100, Rounding());
data_ = madData;
}

// Mauritian rupee
MURCurrency::MURCurrency() {
static ext::shared_ptr<Data> murData(
new Data("Mauritian rupee", "MUR", 480, "MUR", "", 100, Rounding(), "1$.2f %3%"));
static auto murData = ext::make_shared<Data>("Mauritian rupee", "MUR", 480, "MUR", "", 100, Rounding());
data_ = murData;
}

// Nigerian Naira
NGNCurrency::NGNCurrency() {
static ext::shared_ptr<Data> ngnData(
new Data("Nigerian Naira", "NGN", 566, "N", "K", 100, Rounding(), "%3% %1N.2f"));
static auto ngnData = ext::make_shared<Data>("Nigerian Naira", "NGN", 566, "N", "K", 100, Rounding());
data_ = ngnData;
}

// Tunisian dinar
TNDCurrency::TNDCurrency() {
static ext::shared_ptr<Data> tndData(
new Data("Tunisian dinar", "TND", 788, "TND", "", 1000, Rounding(), "1$.2f %3%"));
static auto tndData = ext::make_shared<Data>("Tunisian dinar", "TND", 788, "TND", "", 1000, Rounding());
data_ = tndData;
}

// Ugandan shilling
UGXCurrency::UGXCurrency() {
static ext::shared_ptr<Data> ugxData(
new Data("Ugandan shilling", "UGX", 800, "UGX", "", 1, Rounding(), "1$.2f %3%"));
static auto ugxData = ext::make_shared<Data>("Ugandan shilling", "UGX", 800, "UGX", "", 1, Rounding());
data_ = ugxData;
}

// West African CFA franc
XOFCurrency::XOFCurrency() {
static ext::shared_ptr<Data> xofData(new Data("West African CFA franc", "XOF", 952, "XOF",
"", 100, Rounding(), "1$.2f %3%"));
static auto xofData = ext::make_shared<Data>("West African CFA franc", "XOF", 952, "XOF", "", 100, Rounding());
data_ = xofData;
}

// South-African rand
ZARCurrency::ZARCurrency() {
static ext::shared_ptr<Data> zarData(
new Data("South-African rand", "ZAR", 710, "R", "", 100, Rounding(), "%3% %1$.2f"));
static auto zarData = ext::make_shared<Data>("South-African rand", "ZAR", 710, "R", "", 100, Rounding());
data_ = zarData;
}

// Zambian kwacha
ZMWCurrency::ZMWCurrency() {
static ext::shared_ptr<Data> zmwData(
new Data("Zambian kwacha", "ZMW", 967, "ZMW", "", 100, Rounding(), "1$.2f %3%"));
static auto zmwData = ext::make_shared<Data>("Zambian kwacha", "ZMW", 967, "ZMW", "", 100, Rounding());
data_ = zmwData;
}

QL_DEPRECATED_ENABLE_WARNING

}
92 changes: 17 additions & 75 deletions ql/currencies/america.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,12 @@

namespace QuantLib {

QL_DEPRECATED_DISABLE_WARNING

// Argentinian peso
/* The ISO three-letter code is ARS; the numeric code is 32.
It is divided in 100 centavos.
*/
ARSCurrency::ARSCurrency() {
static ext::shared_ptr<Data> arsData(
new Data("Argentinian peso", "ARS", 32,
"", "", 100,
Rounding(),
"%2% %1$.2f"));
ARSCurrency::ARSCurrency() {
static auto arsData = ext::make_shared<Data>("Argentinian peso", "ARS", 32, "", "", 100, Rounding());
data_ = arsData;
}

Expand All @@ -47,11 +41,7 @@ namespace QuantLib {
It is divided in 100 centavos.
*/
BRLCurrency::BRLCurrency() {
static ext::shared_ptr<Data> brlData(
new Data("Brazilian real", "BRL", 986,
"R$", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto brlData = ext::make_shared<Data>("Brazilian real", "BRL", 986, "R$", "", 100, Rounding());
data_ = brlData;
}

Expand All @@ -60,11 +50,7 @@ namespace QuantLib {
It is divided into 100 cents.
*/
CADCurrency::CADCurrency() {
static ext::shared_ptr<Data> cadData(
new Data("Canadian dollar", "CAD", 124,
"Can$", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto cadData = ext::make_shared<Data>("Canadian dollar", "CAD", 124, "Can$", "", 100, Rounding());
data_ = cadData;
}

Expand All @@ -73,11 +59,7 @@ namespace QuantLib {
It is divided in 100 centavos.
*/
CLPCurrency::CLPCurrency() {
static ext::shared_ptr<Data> clpData(
new Data("Chilean peso", "CLP", 152,
"Ch$", "", 100,
Rounding(),
"%3% %1$.0f"));
static auto clpData = ext::make_shared<Data>("Chilean peso", "CLP", 152, "Ch$", "", 100, Rounding());
data_ = clpData;
}

Expand All @@ -86,11 +68,7 @@ namespace QuantLib {
It is divided in 100 centavos.
*/
COPCurrency::COPCurrency() {
static ext::shared_ptr<Data> copData(
new Data("Colombian peso", "COP", 170,
"Col$", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto copData = ext::make_shared<Data>("Colombian peso", "COP", 170, "Col$", "", 100, Rounding());
data_ = copData;
}

Expand All @@ -99,11 +77,7 @@ namespace QuantLib {
It is divided in 100 centavos.
*/
MXNCurrency::MXNCurrency() {
static ext::shared_ptr<Data> mxnData(
new Data("Mexican peso", "MXN", 484,
"Mex$", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto mxnData = ext::make_shared<Data>("Mexican peso", "MXN", 484, "Mex$", "", 100, Rounding());
data_ = mxnData;
}

Expand All @@ -112,11 +86,7 @@ namespace QuantLib {
It is divided in 100 centimos.
*/
PENCurrency::PENCurrency() {
static ext::shared_ptr<Data> penData(
new Data("Peruvian nuevo sol", "PEN", 604,
"S/.", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto penData = ext::make_shared<Data>("Peruvian nuevo sol", "PEN", 604, "S/.", "", 100, Rounding());
data_ = penData;
}

Expand All @@ -126,11 +96,7 @@ namespace QuantLib {
as per ISO 3166-1, we assign 998 as a user-defined code.
*/
PEICurrency::PEICurrency() {
static ext::shared_ptr<Data> peiData(
new Data("Peruvian inti", "PEI", 998,
"I/.", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto peiData = ext::make_shared<Data>("Peruvian inti", "PEI", 998, "I/.", "", 100, Rounding());
data_ = peiData;
}

Expand All @@ -140,11 +106,7 @@ namespace QuantLib {
It was divided in 100 centavos.
*/
PEHCurrency::PEHCurrency() {
static ext::shared_ptr<Data> pehData(
new Data("Peruvian sol", "PEH", 999,
"S./", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto pehData = ext::make_shared<Data>("Peruvian sol", "PEH", 999, "S./", "", 100, Rounding());
data_ = pehData;
}

Expand All @@ -153,11 +115,7 @@ namespace QuantLib {
It is divided in 100 cents.
*/
TTDCurrency::TTDCurrency() {
static ext::shared_ptr<Data> ttdData(
new Data("Trinidad & Tobago dollar", "TTD", 780,
"TT$", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto ttdData = ext::make_shared<Data>("Trinidad & Tobago dollar", "TTD", 780, "TT$", "", 100, Rounding());
data_ = ttdData;
}

Expand All @@ -166,11 +124,7 @@ namespace QuantLib {
It is divided in 100 cents.
*/
USDCurrency::USDCurrency() {
static ext::shared_ptr<Data> usdData(
new Data("U.S. dollar", "USD", 840,
"$", "\xA2", 100,
Rounding(),
"%3% %1$.2f"));
static auto usdData = ext::make_shared<Data>("U.S. dollar", "USD", 840, "$", "\xA2", 100, Rounding());
data_ = usdData;
}

Expand All @@ -179,44 +133,32 @@ namespace QuantLib {
It is divided in 100 centimos.
*/
VEBCurrency::VEBCurrency() {
static ext::shared_ptr<Data> vebData(
new Data("Venezuelan bolivar", "VEB", 862,
"Bs", "", 100,
Rounding(),
"%3% %1$.2f"));
static auto vebData = ext::make_shared<Data>("Venezuelan bolivar", "VEB", 862, "Bs", "", 100, Rounding());
data_ = vebData;
}

// Mexican Unidad de Inversion
MXVCurrency::MXVCurrency() {
static ext::shared_ptr<Data> mxvData(new Data("Mexican Unidad de Inversion", "MXV", 979,
"MXV", "", 1, Rounding(), "1$.2f %3%"));
data_ = mxvData;
static auto mxvData = ext::make_shared<Data>("Mexican Unidad de Inversion", "MXV", 979, "MXV", "", 1, Rounding());
}

// Unidad de Valor Real
COUCurrency::COUCurrency() {
static ext::shared_ptr<Data> couData(new Data("Unidad de Valor Real (UVR) (funds code)",
"COU", 970, "COU", "", 100, Rounding(),
"1$.2f %3%"));
static auto couData = ext::make_shared<Data>("Unidad de Valor Real (UVR) (funds code)", "COU", 970, "COU", "", 100, Rounding());
data_ = couData;
}

// Unidad de Fomento
CLFCurrency::CLFCurrency() {
static ext::shared_ptr<Data> clfData(new Data(
"Unidad de Fomento (funds code)", "CLF", 990, "CLF", "", 1, Rounding(), "1$.2f %3%"));
static auto clfData = ext::make_shared<Data>("Unidad de Fomento (funds code)", "CLF", 990, "CLF", "", 1, Rounding());
data_ = clfData;
}

// Uruguayan peso
UYUCurrency::UYUCurrency() {
static ext::shared_ptr<Data> uyuData(
new Data("Uruguayan peso", "UYU", 858, "UYU", "", 1, Rounding(), "1$.2f %3%"));
static auto uyuData = ext::make_shared<Data>("Uruguayan peso", "UYU", 858, "UYU", "", 1, Rounding());
data_ = uyuData;
}

QL_DEPRECATED_ENABLE_WARNING

}

Loading

0 comments on commit 947cab4

Please sign in to comment.