/src/quantlib/ql/quotes/forwardvaluequote.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) 2006, 2007 Ferdinando Ametrano |
5 | | Copyright (C) 2006 François du Vignaud |
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/quotes/forwardvaluequote.hpp> |
22 | | #include <utility> |
23 | | |
24 | | namespace QuantLib { |
25 | | |
26 | | ForwardValueQuote::ForwardValueQuote(ext::shared_ptr<Index> index, const Date& fixingDate) |
27 | 0 | : index_(std::move(index)), fixingDate_(fixingDate) { |
28 | 0 | registerWith(index_); |
29 | 0 | } Unexecuted instantiation: QuantLib::ForwardValueQuote::ForwardValueQuote(boost::shared_ptr<QuantLib::Index>, QuantLib::Date const&) Unexecuted instantiation: QuantLib::ForwardValueQuote::ForwardValueQuote(boost::shared_ptr<QuantLib::Index>, QuantLib::Date const&) |
30 | | |
31 | 0 | Real ForwardValueQuote::value() const { |
32 | 0 | return index_->fixing(fixingDate_); |
33 | 0 | } |
34 | | |
35 | 0 | bool ForwardValueQuote::isValid() const { |
36 | | // not sure this is the best approach... |
37 | 0 | return true; |
38 | 0 | } |
39 | | |
40 | 0 | void ForwardValueQuote::update() { |
41 | 0 | notifyObservers(); |
42 | 0 | } |
43 | | |
44 | | } |
45 | | |