Coverage Report

Created: 2026-01-25 06:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/quantlib/ql/handle.hpp
Line
Count
Source
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
 Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
5
 Copyright (C) 2003, 2004, 2005, 2006, 2007 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
 <https://www.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
/*! \file handle.hpp
22
    \brief Globally accessible relinkable pointer
23
*/
24
25
#ifndef quantlib_handle_hpp
26
#define quantlib_handle_hpp
27
28
#include <ql/patterns/observable.hpp>
29
30
namespace QuantLib {
31
32
    //! Shared handle to an observable
33
    /*! All copies of an instance of this class refer to the same
34
        observable by means of a relinkable smart pointer. When such
35
        pointer is relinked to another observable, the change will be
36
        propagated to all the copies.
37
38
        \pre Class T must inherit from Observable
39
    */
40
    template <class T>
41
    class Handle {
42
      protected:
43
        class Link : public Observable, public Observer {
44
          public:
45
            Link(const ext::shared_ptr<T>& h,
46
                 bool registerAsObserver);
47
            Link(ext::shared_ptr<T>&& h,
48
                 bool registerAsObserver);
49
            void linkTo(ext::shared_ptr<T>,
50
                        bool registerAsObserver);
51
0
            bool empty() const { return !h_; }
Unexecuted instantiation: QuantLib::Handle<QuantLib::Quote>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DeltaVolQuote>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorCopula>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPICapFloorTermPriceSurface>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackAtmVolCurve>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::InterestRateVolSurface>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AbcdAtmVolCurve>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LocalVolTermStructure>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::Link::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CapFloorTermVolCurve>::Link::empty() const
52
0
            const ext::shared_ptr<T>& currentLink() const { return h_; }
Unexecuted instantiation: QuantLib::Handle<QuantLib::Quote>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DeltaVolQuote>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorCopula>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPICapFloorTermPriceSurface>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackAtmVolCurve>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::InterestRateVolSurface>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AbcdAtmVolCurve>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LocalVolTermStructure>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::Link::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CapFloorTermVolCurve>::Link::currentLink() const
53
1.12M
            void update() override { notifyObservers(); }
QuantLib::Handle<QuantLib::Quote>::Link::update()
Line
Count
Source
53
640k
            void update() override { notifyObservers(); }
QuantLib::Handle<QuantLib::YieldTermStructure>::Link::update()
Line
Count
Source
53
320k
            void update() override { notifyObservers(); }
QuantLib::Handle<QuantLib::BlackVolTermStructure>::Link::update()
Line
Count
Source
53
160k
            void update() override { notifyObservers(); }
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::LocalVolTermStructure>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::Link::update()
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::Link::update()
54
55
          private:
56
            ext::shared_ptr<T> h_;
57
            bool isObserver_ = false;
58
        };
59
        ext::shared_ptr<Link> link_;
60
      public:
61
        /*! \name Constructors
62
63
            \warning <tt>registerAsObserver</tt> is left as a backdoor
64
                     in case the programmer cannot guarantee that the
65
                     object pointed to will remain alive for the whole
66
                     lifetime of the handle---namely, it should be set
67
                     to <tt>false</tt> when the passed shared pointer
68
                     does not own the pointee (this should only happen
69
                     in a controlled environment, so that the
70
                     programmer is aware of it). Failure to do so can
71
                     very likely result in a program crash.  If the
72
                     programmer does want the handle to register as
73
                     observer of such a shared pointer, it is his
74
                     responsibility to ensure that the handle gets
75
                     destroyed before the pointed object does.
76
        */
77
        //@{
78
        Handle()
79
972
        : Handle(ext::shared_ptr<T>()) {}
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::Handle()
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::Handle()
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Handle()
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::Handle()
Unexecuted instantiation: QuantLib::Handle<QuantLib::Quote>::Handle()
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::Handle()
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Handle()
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Handle()
QuantLib::Handle<QuantLib::LocalVolTermStructure>::Handle()
Line
Count
Source
79
972
        : Handle(ext::shared_ptr<T>()) {}
80
        explicit Handle(const ext::shared_ptr<T>& p,
81
                        bool registerAsObserver = true)
82
2.91k
        : link_(new Link(p, registerAsObserver)) {}
QuantLib::Handle<QuantLib::YieldTermStructure>::Handle(boost::shared_ptr<QuantLib::YieldTermStructure> const&, bool)
Line
Count
Source
82
1.94k
        : link_(new Link(p, registerAsObserver)) {}
QuantLib::Handle<QuantLib::BlackVolTermStructure>::Handle(boost::shared_ptr<QuantLib::BlackVolTermStructure> const&, bool)
Line
Count
Source
82
972
        : link_(new Link(p, registerAsObserver)) {}
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::Handle(boost::shared_ptr<QuantLib::ShortRateModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::Handle(boost::shared_ptr<QuantLib::ExtOUWithJumpsProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::Handle(boost::shared_ptr<QuantLib::KlugeExtOUProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::Handle(boost::shared_ptr<QuantLib::ExtendedOrnsteinUhlenbeckProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::Handle(boost::shared_ptr<QuantLib::LiborForwardModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::Handle(boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Handle(boost::shared_ptr<QuantLib::HestonModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::Handle(boost::shared_ptr<QuantLib::HestonProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::Handle(boost::shared_ptr<QuantLib::AffineModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::Handle(boost::shared_ptr<QuantLib::G2> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::Handle(boost::shared_ptr<QuantLib::HullWhite> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::Handle(boost::shared_ptr<QuantLib::GJRGARCHModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::Handle(boost::shared_ptr<QuantLib::PiecewiseTimeDependentHestonModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::Handle(boost::shared_ptr<QuantLib::BatesModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::Handle(boost::shared_ptr<QuantLib::BatesProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Handle(boost::shared_ptr<QuantLib::FdmQuantoHelper> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::Handle(boost::shared_ptr<QuantLib::CoxIngersollRossProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::Handle(boost::shared_ptr<QuantLib::HullWhiteProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::Handle(boost::shared_ptr<QuantLib::BlackVarianceCurve> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::Handle(boost::shared_ptr<QuantLib::Gaussian1dModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Handle(boost::shared_ptr<QuantLib::OptionletVolatilityStructure> const&, bool)
83
        explicit Handle(ext::shared_ptr<T>&& p,
84
                        bool registerAsObserver = true)
85
5.83k
        : link_(new Link(std::move(p), registerAsObserver)) {}
QuantLib::Handle<QuantLib::Quote>::Handle(boost::shared_ptr<QuantLib::Quote>&&, bool)
Line
Count
Source
85
3.88k
        : link_(new Link(std::move(p), registerAsObserver)) {}
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::Handle(boost::shared_ptr<QuantLib::YieldTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::Handle(boost::shared_ptr<QuantLib::CPIVolatilitySurface>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Handle(boost::shared_ptr<QuantLib::OptionletVolatilityStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::Handle(boost::shared_ptr<QuantLib::YoYOptionletVolatilitySurface>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::Handle(boost::shared_ptr<QuantLib::CallableBondVolatilityStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::Handle(boost::shared_ptr<QuantLib::Basket>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::Handle(boost::shared_ptr<QuantLib::RecoveryRateQuote>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::Handle(boost::shared_ptr<QuantLib::DefaultProbabilityTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::Handle(boost::shared_ptr<QuantLib::BlackVolTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::Handle(boost::shared_ptr<QuantLib::SwaptionVolatilityStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Handle(boost::shared_ptr<QuantLib::FdmQuantoHelper>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::Handle(boost::shared_ptr<QuantLib::PricingEngine>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Handle(boost::shared_ptr<QuantLib::HestonModel>&&, bool)
QuantLib::Handle<QuantLib::LocalVolTermStructure>::Handle(boost::shared_ptr<QuantLib::LocalVolTermStructure>&&, bool)
Line
Count
Source
85
1.94k
        : link_(new Link(std::move(p), registerAsObserver)) {}
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::Handle(boost::shared_ptr<QuantLib::ZeroInflationTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::Handle(boost::shared_ptr<QuantLib::YoYInflationTermStructure>&&, bool)
86
        //@}
87
        //! dereferencing
88
        const ext::shared_ptr<T>& currentLink() const;
89
        const ext::shared_ptr<T>& operator->() const;
90
        const ext::shared_ptr<T>& operator*() const;
91
        //! checks if the contained shared pointer points to anything
92
        bool empty() const;
93
        //! allows registration as observable
94
        operator ext::shared_ptr<Observable>() const;
95
        //! equality test
96
        template <class U>
97
        bool operator==(const Handle<U>& other) const { return link_==other.link_; }
98
        //! disequality test
99
        template <class U>
100
        bool operator!=(const Handle<U>& other) const { return link_!=other.link_; }
101
        //! strict weak ordering
102
        template <class U>
103
        bool operator<(const Handle<U>& other) const { return link_ < other.link_; }
104
    };
105
106
    //! Relinkable handle to an observable
107
    /*! An instance of this class can be relinked so that it points to
108
        another observable. The change will be propagated to all
109
        handles that were created as copies of such instance.
110
111
        \pre Class T must inherit from Observable
112
113
        \warning see the Handle documentation for issues
114
                 relatives to <tt>registerAsObserver</tt>.
115
    */
116
    template <class T>
117
    class RelinkableHandle : public Handle<T> {
118
      public:
119
        RelinkableHandle()
120
972
        : RelinkableHandle(ext::shared_ptr<T>()) {}
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::Basket>::RelinkableHandle()
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::DefaultProbabilityTermStructure>::RelinkableHandle()
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::YieldTermStructure>::RelinkableHandle()
QuantLib::RelinkableHandle<QuantLib::LocalVolTermStructure>::RelinkableHandle()
Line
Count
Source
120
972
        : RelinkableHandle(ext::shared_ptr<T>()) {}
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::ZeroInflationTermStructure>::RelinkableHandle()
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::YoYInflationTermStructure>::RelinkableHandle()
121
        explicit RelinkableHandle(
122
                       const ext::shared_ptr<T>& p,
123
                       bool registerAsObserver = true);
124
        explicit RelinkableHandle(
125
                       ext::shared_ptr<T>&& p,
126
                       bool registerAsObserver = true);
127
        void linkTo(const ext::shared_ptr<T>& h,
128
                    bool registerAsObserver = true);
129
        void linkTo(ext::shared_ptr<T>&& h,
130
                    bool registerAsObserver = true);
131
        void reset();
132
    };
133
134
135
    // inline definitions
136
137
    template <class T>
138
2.91k
    inline Handle<T>::Link::Link(const ext::shared_ptr<T>& h, bool registerAsObserver) {
139
2.91k
        linkTo(h, registerAsObserver);
140
2.91k
    }
QuantLib::Handle<QuantLib::YieldTermStructure>::Link::Link(boost::shared_ptr<QuantLib::YieldTermStructure> const&, bool)
Line
Count
Source
138
1.94k
    inline Handle<T>::Link::Link(const ext::shared_ptr<T>& h, bool registerAsObserver) {
139
1.94k
        linkTo(h, registerAsObserver);
140
1.94k
    }
QuantLib::Handle<QuantLib::BlackVolTermStructure>::Link::Link(boost::shared_ptr<QuantLib::BlackVolTermStructure> const&, bool)
Line
Count
Source
138
972
    inline Handle<T>::Link::Link(const ext::shared_ptr<T>& h, bool registerAsObserver) {
139
972
        linkTo(h, registerAsObserver);
140
972
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::Link::Link(boost::shared_ptr<QuantLib::ShortRateModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::Link::Link(boost::shared_ptr<QuantLib::ExtOUWithJumpsProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::Link::Link(boost::shared_ptr<QuantLib::KlugeExtOUProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::Link::Link(boost::shared_ptr<QuantLib::ExtendedOrnsteinUhlenbeckProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::Link::Link(boost::shared_ptr<QuantLib::LiborForwardModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::Link::Link(boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Link::Link(boost::shared_ptr<QuantLib::HestonModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::Link::Link(boost::shared_ptr<QuantLib::HestonProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::Link::Link(boost::shared_ptr<QuantLib::AffineModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::Link::Link(boost::shared_ptr<QuantLib::G2> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::Link::Link(boost::shared_ptr<QuantLib::HullWhite> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::Link::Link(boost::shared_ptr<QuantLib::GJRGARCHModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::Link::Link(boost::shared_ptr<QuantLib::PiecewiseTimeDependentHestonModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::Link::Link(boost::shared_ptr<QuantLib::BatesModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::Link::Link(boost::shared_ptr<QuantLib::BatesProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Link::Link(boost::shared_ptr<QuantLib::FdmQuantoHelper> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::Link::Link(boost::shared_ptr<QuantLib::CoxIngersollRossProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::Link::Link(boost::shared_ptr<QuantLib::HullWhiteProcess> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::Link::Link(boost::shared_ptr<QuantLib::BlackVarianceCurve> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::Link::Link(boost::shared_ptr<QuantLib::Gaussian1dModel> const&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Link::Link(boost::shared_ptr<QuantLib::OptionletVolatilityStructure> const&, bool)
141
142
    template <class T>
143
5.83k
    inline Handle<T>::Link::Link(ext::shared_ptr<T>&& h, bool registerAsObserver) {
144
5.83k
        linkTo(std::move(h), registerAsObserver);
145
5.83k
    }
QuantLib::Handle<QuantLib::Quote>::Link::Link(boost::shared_ptr<QuantLib::Quote>&&, bool)
Line
Count
Source
143
3.88k
    inline Handle<T>::Link::Link(ext::shared_ptr<T>&& h, bool registerAsObserver) {
144
3.88k
        linkTo(std::move(h), registerAsObserver);
145
3.88k
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::Link::Link(boost::shared_ptr<QuantLib::YieldTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::Link::Link(boost::shared_ptr<QuantLib::CPIVolatilitySurface>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Link::Link(boost::shared_ptr<QuantLib::OptionletVolatilityStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::Link::Link(boost::shared_ptr<QuantLib::YoYOptionletVolatilitySurface>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::Link::Link(boost::shared_ptr<QuantLib::CallableBondVolatilityStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::Link::Link(boost::shared_ptr<QuantLib::Basket>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::Link::Link(boost::shared_ptr<QuantLib::RecoveryRateQuote>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::Link::Link(boost::shared_ptr<QuantLib::DefaultProbabilityTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::Link::Link(boost::shared_ptr<QuantLib::BlackVolTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::Link::Link(boost::shared_ptr<QuantLib::SwaptionVolatilityStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Link::Link(boost::shared_ptr<QuantLib::FdmQuantoHelper>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::Link::Link(boost::shared_ptr<QuantLib::PricingEngine>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Link::Link(boost::shared_ptr<QuantLib::HestonModel>&&, bool)
QuantLib::Handle<QuantLib::LocalVolTermStructure>::Link::Link(boost::shared_ptr<QuantLib::LocalVolTermStructure>&&, bool)
Line
Count
Source
143
1.94k
    inline Handle<T>::Link::Link(ext::shared_ptr<T>&& h, bool registerAsObserver) {
144
1.94k
        linkTo(std::move(h), registerAsObserver);
145
1.94k
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::Link::Link(boost::shared_ptr<QuantLib::ZeroInflationTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::Link::Link(boost::shared_ptr<QuantLib::YoYInflationTermStructure>&&, bool)
146
147
    template <class T>
148
    inline void Handle<T>::Link::linkTo(ext::shared_ptr<T> h,
149
8.74k
                                        bool registerAsObserver) {
150
8.74k
        if ((h != h_) || (isObserver_ != registerAsObserver)) {
151
8.74k
            if (h_ && isObserver_)
152
0
                unregisterWith(h_);
153
8.74k
            h_ = std::move(h);
154
8.74k
            isObserver_ = registerAsObserver;
155
8.74k
            if (h_ && isObserver_)
156
6.80k
                registerWith(h_);
157
8.74k
            notifyObservers();
158
8.74k
        }
159
8.74k
    }
QuantLib::Handle<QuantLib::Quote>::Link::linkTo(boost::shared_ptr<QuantLib::Quote>, bool)
Line
Count
Source
149
3.88k
                                        bool registerAsObserver) {
150
3.88k
        if ((h != h_) || (isObserver_ != registerAsObserver)) {
151
3.88k
            if (h_ && isObserver_)
152
0
                unregisterWith(h_);
153
3.88k
            h_ = std::move(h);
154
3.88k
            isObserver_ = registerAsObserver;
155
3.88k
            if (h_ && isObserver_)
156
3.88k
                registerWith(h_);
157
3.88k
            notifyObservers();
158
3.88k
        }
159
3.88k
    }
QuantLib::Handle<QuantLib::YieldTermStructure>::Link::linkTo(boost::shared_ptr<QuantLib::YieldTermStructure>, bool)
Line
Count
Source
149
1.94k
                                        bool registerAsObserver) {
150
1.94k
        if ((h != h_) || (isObserver_ != registerAsObserver)) {
151
1.94k
            if (h_ && isObserver_)
152
0
                unregisterWith(h_);
153
1.94k
            h_ = std::move(h);
154
1.94k
            isObserver_ = registerAsObserver;
155
1.94k
            if (h_ && isObserver_)
156
1.94k
                registerWith(h_);
157
1.94k
            notifyObservers();
158
1.94k
        }
159
1.94k
    }
QuantLib::Handle<QuantLib::BlackVolTermStructure>::Link::linkTo(boost::shared_ptr<QuantLib::BlackVolTermStructure>, bool)
Line
Count
Source
149
972
                                        bool registerAsObserver) {
150
972
        if ((h != h_) || (isObserver_ != registerAsObserver)) {
151
972
            if (h_ && isObserver_)
152
0
                unregisterWith(h_);
153
972
            h_ = std::move(h);
154
972
            isObserver_ = registerAsObserver;
155
972
            if (h_ && isObserver_)
156
972
                registerWith(h_);
157
972
            notifyObservers();
158
972
        }
159
972
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::Link::linkTo(boost::shared_ptr<QuantLib::OptionletVolatilityStructure>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::Link::linkTo(boost::shared_ptr<QuantLib::YoYOptionletVolatilitySurface>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::Link::linkTo(boost::shared_ptr<QuantLib::CPIVolatilitySurface>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::Link::linkTo(boost::shared_ptr<QuantLib::CallableBondVolatilityStructure>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::Link::linkTo(boost::shared_ptr<QuantLib::ShortRateModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::Link::linkTo(boost::shared_ptr<QuantLib::Basket>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::Link::linkTo(boost::shared_ptr<QuantLib::RecoveryRateQuote>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::Link::linkTo(boost::shared_ptr<QuantLib::DefaultProbabilityTermStructure>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::Link::linkTo(boost::shared_ptr<QuantLib::ExtOUWithJumpsProcess>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::Link::linkTo(boost::shared_ptr<QuantLib::KlugeExtOUProcess>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::Link::linkTo(boost::shared_ptr<QuantLib::ExtendedOrnsteinUhlenbeckProcess>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::Link::linkTo(boost::shared_ptr<QuantLib::Gaussian1dModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::Link::linkTo(boost::shared_ptr<QuantLib::LiborForwardModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::Link::linkTo(boost::shared_ptr<QuantLib::SwaptionVolatilityStructure>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::Link::linkTo(boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::Link::linkTo(boost::shared_ptr<QuantLib::FdmQuantoHelper>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::Link::linkTo(boost::shared_ptr<QuantLib::HestonModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::Link::linkTo(boost::shared_ptr<QuantLib::HestonProcess>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::Link::linkTo(boost::shared_ptr<QuantLib::AffineModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::Link::linkTo(boost::shared_ptr<QuantLib::PricingEngine>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::Link::linkTo(boost::shared_ptr<QuantLib::G2>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::Link::linkTo(boost::shared_ptr<QuantLib::HullWhite>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::Link::linkTo(boost::shared_ptr<QuantLib::OneFactorAffineModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::Link::linkTo(boost::shared_ptr<QuantLib::GJRGARCHModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::Link::linkTo(boost::shared_ptr<QuantLib::PiecewiseTimeDependentHestonModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::Link::linkTo(boost::shared_ptr<QuantLib::BatesModel>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::Link::linkTo(boost::shared_ptr<QuantLib::BatesProcess>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::Link::linkTo(boost::shared_ptr<QuantLib::CoxIngersollRossProcess>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::Link::linkTo(boost::shared_ptr<QuantLib::HullWhiteProcess>, bool)
QuantLib::Handle<QuantLib::LocalVolTermStructure>::Link::linkTo(boost::shared_ptr<QuantLib::LocalVolTermStructure>, bool)
Line
Count
Source
149
1.94k
                                        bool registerAsObserver) {
150
1.94k
        if ((h != h_) || (isObserver_ != registerAsObserver)) {
151
1.94k
            if (h_ && isObserver_)
152
0
                unregisterWith(h_);
153
1.94k
            h_ = std::move(h);
154
1.94k
            isObserver_ = registerAsObserver;
155
1.94k
            if (h_ && isObserver_)
156
0
                registerWith(h_);
157
1.94k
            notifyObservers();
158
1.94k
        }
159
1.94k
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::Link::linkTo(boost::shared_ptr<QuantLib::BlackVarianceCurve>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::Link::linkTo(boost::shared_ptr<QuantLib::ZeroInflationTermStructure>, bool)
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::Link::linkTo(boost::shared_ptr<QuantLib::YoYInflationTermStructure>, bool)
160
161
162
    template <class T>
163
0
    inline const ext::shared_ptr<T>& Handle<T>::currentLink() const {
164
0
        QL_REQUIRE(!empty(), "empty Handle cannot be dereferenced");
165
0
        return link_->currentLink();
166
0
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::Quote>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LocalVolTermStructure>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::currentLink() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::currentLink() const
167
168
    template <class T>
169
0
    inline const ext::shared_ptr<T>& Handle<T>::operator->() const {
170
0
        QL_REQUIRE(!empty(), "empty Handle cannot be dereferenced");
171
0
        return link_->currentLink();
172
0
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::Quote>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DeltaVolQuote>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorCopula>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPICapFloorTermPriceSurface>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackAtmVolCurve>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::InterestRateVolSurface>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AbcdAtmVolCurve>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LocalVolTermStructure>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::operator->() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CapFloorTermVolCurve>::operator->() const
173
174
    template <class T>
175
0
    inline const ext::shared_ptr<T>& Handle<T>::operator*() const {
176
0
        QL_REQUIRE(!empty(), "empty Handle cannot be dereferenced");
177
0
        return link_->currentLink();
178
0
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Quote>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::operator*() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::operator*() const
179
180
    template <class T>
181
0
    inline bool Handle<T>::empty() const {
182
0
        return link_->empty();
183
0
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::Quote>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YieldTermStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVolTermStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DeltaVolQuote>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorCopula>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Basket>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPICapFloorTermPriceSurface>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackAtmVolCurve>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::InterestRateVolSurface>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AbcdAtmVolCurve>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LocalVolTermStructure>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::empty() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CapFloorTermVolCurve>::empty() const
184
185
    template <class T>
186
6.80k
    inline Handle<T>::operator ext::shared_ptr<Observable>() const {
187
6.80k
        return link_;
188
6.80k
    }
QuantLib::Handle<QuantLib::Quote>::operator boost::shared_ptr<QuantLib::Observable>() const
Line
Count
Source
186
3.88k
    inline Handle<T>::operator ext::shared_ptr<Observable>() const {
187
3.88k
        return link_;
188
3.88k
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::OptionletVolatilityStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
QuantLib::Handle<QuantLib::YieldTermStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Line
Count
Source
186
1.94k
    inline Handle<T>::operator ext::shared_ptr<Observable>() const {
187
1.94k
        return link_;
188
1.94k
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPIVolatilitySurface>::operator boost::shared_ptr<QuantLib::Observable>() const
QuantLib::Handle<QuantLib::BlackVolTermStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Line
Count
Source
186
972
    inline Handle<T>::operator ext::shared_ptr<Observable>() const {
187
972
        return link_;
188
972
    }
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYOptionletVolatilitySurface>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DeltaVolQuote>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CallableBondVolatilityStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ShortRateModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorCopula>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::RecoveryRateQuote>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::KlugeExtOUProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtOUWithJumpsProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ExtendedOrnsteinUhlenbeckProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CPICapFloorTermPriceSurface>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::ZeroInflationTermStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::YoYInflationTermStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LiborForwardModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GeneralizedBlackScholesProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::FdmQuantoHelper>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::G2>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhiteProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CoxIngersollRossProcess>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HullWhite>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::LocalVolTermStructure>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::HestonModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::AffineModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::Gaussian1dModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PricingEngine>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::OneFactorAffineModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::GJRGARCHModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::PiecewiseTimeDependentHestonModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BatesModel>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::BlackVarianceCurve>::operator boost::shared_ptr<QuantLib::Observable>() const
Unexecuted instantiation: QuantLib::Handle<QuantLib::CapFloorTermVolCurve>::operator boost::shared_ptr<QuantLib::Observable>() const
189
190
191
    template <class T>
192
    inline RelinkableHandle<T>::RelinkableHandle(const ext::shared_ptr<T>& p,
193
                                                 bool registerAsObserver)
194
0
    : Handle<T>(p,registerAsObserver) {}
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::YieldTermStructure>::RelinkableHandle(boost::shared_ptr<QuantLib::YieldTermStructure> const&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::BlackVolTermStructure>::RelinkableHandle(boost::shared_ptr<QuantLib::BlackVolTermStructure> const&, bool)
195
196
    template <class T>
197
    inline RelinkableHandle<T>::RelinkableHandle(ext::shared_ptr<T>&& p,
198
                                                 bool registerAsObserver)
199
972
    : Handle<T>(std::move(p), registerAsObserver) {}
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::Basket>::RelinkableHandle(boost::shared_ptr<QuantLib::Basket>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::DefaultProbabilityTermStructure>::RelinkableHandle(boost::shared_ptr<QuantLib::DefaultProbabilityTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::YieldTermStructure>::RelinkableHandle(boost::shared_ptr<QuantLib::YieldTermStructure>&&, bool)
QuantLib::RelinkableHandle<QuantLib::LocalVolTermStructure>::RelinkableHandle(boost::shared_ptr<QuantLib::LocalVolTermStructure>&&, bool)
Line
Count
Source
199
972
    : Handle<T>(std::move(p), registerAsObserver) {}
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::Quote>::RelinkableHandle(boost::shared_ptr<QuantLib::Quote>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::ZeroInflationTermStructure>::RelinkableHandle(boost::shared_ptr<QuantLib::ZeroInflationTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::YoYInflationTermStructure>::RelinkableHandle(boost::shared_ptr<QuantLib::YoYInflationTermStructure>&&, bool)
200
201
    template <class T>
202
    inline void RelinkableHandle<T>::linkTo(const ext::shared_ptr<T>& h,
203
0
                                            bool registerAsObserver) {
204
0
        this->link_->linkTo(h, registerAsObserver);
205
0
    }
206
207
    template <class T>
208
    inline void RelinkableHandle<T>::linkTo(ext::shared_ptr<T>&& h,
209
0
                                            bool registerAsObserver) {
210
0
        this->link_->linkTo(std::move(h), registerAsObserver);
211
0
    }
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::Basket>::linkTo(boost::shared_ptr<QuantLib::Basket>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::DefaultProbabilityTermStructure>::linkTo(boost::shared_ptr<QuantLib::DefaultProbabilityTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::YieldTermStructure>::linkTo(boost::shared_ptr<QuantLib::YieldTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::BlackVolTermStructure>::linkTo(boost::shared_ptr<QuantLib::BlackVolTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::LocalVolTermStructure>::linkTo(boost::shared_ptr<QuantLib::LocalVolTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::ZeroInflationTermStructure>::linkTo(boost::shared_ptr<QuantLib::ZeroInflationTermStructure>&&, bool)
Unexecuted instantiation: QuantLib::RelinkableHandle<QuantLib::YoYInflationTermStructure>::linkTo(boost::shared_ptr<QuantLib::YoYInflationTermStructure>&&, bool)
212
213
    template <class T>
214
    inline void RelinkableHandle<T>::reset() {
215
        this->link_->linkTo(nullptr, true);
216
    }
217
218
}
219
220
#endif