Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
parameters.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 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 orea/app/parameters.hpp
20 \brief Open Risk Engine setup and analytics choice
21 \ingroup app
22*/
23
24#pragma once
25
26#include <map>
27#include <vector>
28
30
31namespace ore {
32namespace analytics {
33using namespace ore::data;
34using std::map;
35using std::string;
36
37//! Provides the input data and references to input files used in OREApp
38/*! \ingroup app
39 */
41public:
43
44 void clear();
45 void fromFile(const string&);
46 virtual void fromXML(XMLNode* node) override;
47 virtual XMLNode* toXML(XMLDocument& doc) const override;
48
49 bool hasGroup(const string& groupName) const;
50 bool has(const string& groupName, const string& paramName) const;
51 string get(const string& groupName, const string& paramName, bool fail = true) const;
52 const map<string, string>& data(const string& groupName) const;
53 const map<string, string>& markets() const;
54
55 void log();
56
57private:
58 map<string, map<string, string>> data_;
59};
60} // namespace analytics
61} // namespace ore
Provides the input data and references to input files used in OREApp.
Definition: parameters.hpp:40
void fromFile(const string &)
Definition: parameters.cpp:65
bool has(const string &groupName, const string &paramName) const
Definition: parameters.cpp:34
map< string, map< string, string > > data_
Definition: parameters.hpp:58
const map< string, string > & markets() const
Definition: parameters.cpp:61
virtual void fromXML(XMLNode *node) override
Definition: parameters.cpp:75
virtual XMLNode * toXML(XMLDocument &doc) const override
Definition: parameters.cpp:126
bool hasGroup(const string &groupName) const
Definition: parameters.cpp:32