Coverage Report

Created: 2025-08-05 06:45

/src/quantlib/ql/indexes/region.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2007 Chris Kenyon
5
 Copyright (C) 2014 StatPro Italia srl
6
7
 This file is part of QuantLib, a free-software/open-source library
8
 for financial quantitative analysts and developers - http://quantlib.org/
9
10
 QuantLib is free software: you can redistribute it and/or modify it
11
 under the terms of the QuantLib license.  You should have received a
12
 copy of the license along with this program; if not, please email
13
 <quantlib-dev@lists.sf.net>. The license is also available online at
14
 <http://quantlib.org/license.shtml>.
15
16
 This program is distributed in the hope that it will be useful, but WITHOUT
17
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
 FOR A PARTICULAR PURPOSE.  See the license for more details.
19
*/
20
21
#include <ql/indexes/region.hpp>
22
23
namespace QuantLib {
24
25
    CustomRegion::CustomRegion(const std::string& name,
26
0
                               const std::string& code) {
27
0
        data_ = ext::make_shared<Data>(name,code);
28
0
    }
29
30
31
0
    AustraliaRegion::AustraliaRegion() {
32
0
        static ext::shared_ptr<Data> AUdata(new Data("Australia","AU"));
33
0
        data_ = AUdata;
34
0
    }
35
36
0
    EURegion::EURegion() {
37
0
        static ext::shared_ptr<Data> EUdata(new Data("EU","EU"));
38
0
        data_ = EUdata;
39
0
    }
40
41
0
    FranceRegion::FranceRegion() {
42
0
        static ext::shared_ptr<Data> FRdata(new Data("France","FR"));
43
0
        data_ = FRdata;
44
0
    }
45
46
0
    UKRegion::UKRegion() {
47
0
        static ext::shared_ptr<Data> UKdata(new Data("UK","UK"));
48
0
        data_ = UKdata;
49
0
    }
50
51
0
    USRegion::USRegion() {
52
0
        static ext::shared_ptr<Data> USdata(new Data("USA","US"));
53
0
        data_ = USdata;
54
0
    }
55
56
0
    ZARegion::ZARegion() {
57
0
        static ext::shared_ptr<Data> ZAdata(new Data("South Africa","ZA"));
58
0
        data_ = ZAdata;
59
0
    }
60
61
62
}
63