Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
curveconfig.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 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 ored/configuration/curveconfig.hpp
20 \brief Base curve configuration classes
21 \ingroup configuration
22*/
23
24#pragma once
25
28
29#include <set>
30
31namespace ore {
32namespace data {
34using std::set;
35using std::string;
36
37//! Base curve configuration
38/*!
39 \ingroup configuration
40*/
42public:
43 //! \name Constructors/Destructors
44 //@{
45 //! Detailed constructor
46 CurveConfig(const string& curveID, const string& curveDescription, const vector<string>& quotes = vector<string>())
48 //! Default constructor
50 //@}
51
52 //! \name Inspectors
53 //@{
54 const string& curveID() const { return curveID_; }
55 const string& curveDescription() const { return curveDescription_; }
56 const set<string>& requiredCurveIds(const CurveSpec::CurveType& curveType) const;
57 const map<CurveSpec::CurveType, set<string>>& requiredCurveIds() const;
58 //@}
59
60 //! \name Setters
61 //@{
62 string& curveID() { return curveID_; }
63 string& curveDescription() { return curveDescription_; }
64 set<string>& requiredCurveIds(const CurveSpec::CurveType& curveType);
65 map<CurveSpec::CurveType, set<string>>& requiredCurveIds();
66 //@}
67
68 //! Return all the market quotes required for this config
69 virtual const vector<string>& quotes() { return quotes_; }
70
71protected:
72 string curveID_;
74 vector<string> quotes_;
75 map<CurveSpec::CurveType, set<string>> requiredCurveIds_;
76};
77
78} // namespace data
79} // namespace ore
Base curve configuration.
Definition: curveconfig.hpp:41
vector< string > quotes_
Definition: curveconfig.hpp:74
const string & curveDescription() const
Definition: curveconfig.hpp:55
const string & curveID() const
Definition: curveconfig.hpp:54
string & curveDescription()
Definition: curveconfig.hpp:63
virtual const vector< string > & quotes()
Return all the market quotes required for this config.
Definition: curveconfig.hpp:69
CurveConfig()
Default constructor.
Definition: curveconfig.hpp:49
CurveConfig(const string &curveID, const string &curveDescription, const vector< string > &quotes=vector< string >())
Detailed constructor.
Definition: curveconfig.hpp:46
const map< CurveSpec::CurveType, set< string > > & requiredCurveIds() const
Definition: curveconfig.cpp:37
map< CurveSpec::CurveType, set< string > > requiredCurveIds_
Definition: curveconfig.hpp:75
CurveType
Supported curve types.
Definition: curvespec.hpp:43
Base class for all serializable classes.
Definition: xmlutils.hpp:101
Curve requirements specification.
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
XML utility functions.