Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
qle
calendars
amendedcalendar.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2020 Quaternion Risk Management Ltd
3
All rights reserved.
4
5
This file is part of ORE, a free-software/open-source library
6
for transparent pricing and risk analysis - http://opensourcerisk.org
7
8
ORE is free software: you can redistribute it and/or modify it
9
under the terms of the Modified BSD License. You should have received a
10
copy of the license along with this program.
11
The license is also available online at <http://opensourcerisk.org>
12
13
This program is distributed on the basis that it will form a useful
14
contribution to risk analytics and model standardisation, but WITHOUT
15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17
*/
18
19
/*! \file amendedcalendar.hpp
20
\brief Amended calendar
21
*/
22
23
#ifndef quantext_amended_calendar_h
24
#define quantext_amended_calendar_h
25
26
#include <ql/time/calendar.hpp>
27
#include <ql/time/calendars/jointcalendar.hpp>
28
29
namespace
QuantExt
{
30
31
//! Amended calendar
32
/*! Any added or removed dates do not affect other implementations of this calendar.
33
\ingroup calendars
34
35
*/
36
class
AmendedCalendar
:
public
QuantLib::Calendar {
37
private
:
38
class
Impl
:
public
Calendar::Impl {
39
public
:
40
Impl
(
const
QuantLib::Calendar& calendar,
const
std::string&
name
);
41
std::string
name
()
const override
;
42
bool
isWeekend
(QuantLib::Weekday)
const override
;
43
bool
isBusinessDay
(
const
QuantLib::Date&)
const override
;
44
45
private
:
46
std::string
name_
;
47
QuantLib::Calendar
baseCalendar_
;
48
};
49
50
public
:
51
AmendedCalendar
(
const
QuantLib::Calendar&,
const
std::string& name);
52
};
53
54
}
// namespace QuantExt
55
56
#endif
QuantExt::AmendedCalendar::Impl
Definition:
amendedcalendar.hpp:38
QuantExt::AmendedCalendar::Impl::baseCalendar_
QuantLib::Calendar baseCalendar_
Definition:
amendedcalendar.hpp:47
QuantExt::AmendedCalendar::Impl::isBusinessDay
bool isBusinessDay(const QuantLib::Date &) const override
Definition:
amendedcalendar.cpp:31
QuantExt::AmendedCalendar::Impl::name_
std::string name_
Definition:
amendedcalendar.hpp:46
QuantExt::AmendedCalendar::Impl::name
std::string name() const override
Definition:
amendedcalendar.cpp:27
QuantExt::AmendedCalendar::Impl::isWeekend
bool isWeekend(QuantLib::Weekday) const override
Definition:
amendedcalendar.cpp:29
QuantExt::AmendedCalendar
Amended calendar.
Definition:
amendedcalendar.hpp:36
QuantExt
Definition:
namespaces.docs:19
Generated by
Doxygen
1.9.5