QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
pricingperiod.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 J. Erik Radmall
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file pricingperiod.hpp
21 \brief Pricing period
22*/
23
24#ifndef quantlib_pricing_period_hpp
25#define quantlib_pricing_period_hpp
26
29#include <utility>
30#include <vector>
31
32namespace QuantLib {
33
34 //! Time pricingperiod described by a number of a given time unit
35 /*! \ingroup datetime */
36 class PricingPeriod : public DateInterval {
37 public:
39 const Date& endDate,
40 const Date& paymentDate,
43 quantity_(std::move(quantity)) {}
44 const Date& paymentDate() const { return paymentDate_; }
45 const Quantity& quantity() const { return quantity_; }
46 private:
49 };
50
51 typedef std::vector<ext::shared_ptr<PricingPeriod> > PricingPeriods;
52}
53
54#endif
Concrete date class.
Definition: date.hpp:125
Date interval described by a number of a given time unit.
const Date & endDate() const
const Date & startDate() const
Time pricingperiod described by a number of a given time unit.
PricingPeriod(const Date &startDate, const Date &endDate, const Date &paymentDate, Quantity quantity)
const Date & paymentDate() const
const Quantity & quantity() const
Amount of a commodity.
Definition: quantity.hpp:34
Date interval.
Definition: any.hpp:35
std::vector< ext::shared_ptr< PricingPeriod > > PricingPeriods
STL namespace.
Amount of a commodity.