Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
cubecsvreader.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 orea/cube/cubecsvreader.hpp
20 \brief A Class to read a cube file from csv input
21 \ingroup cube
22*/
23
24#pragma once
25
26#include <ql/shared_ptr.hpp>
27#include <map>
28#include <orea/cube/npvcube.hpp>
29#include <string>
30
31namespace ore {
32namespace analytics {
33
34//! Read an NPV cube from a human readable text file
35/*! \ingroup cube
36 */
38public:
39 //! ctor
40 CubeCsvReader(const std::string& filename);
41
42 //! Return the filename this reader is reader from
43 const std::string& filename() const { return filename_; }
44
45 //! Read a cube from a csv file
46 void read(QuantLib::ext::shared_ptr<ore::analytics::NPVCube>& cube, std::map<std::string, std::string>& nettingSetMap);
47
48private:
49 std::string filename_;
50};
51} // namespace analytics
52} // namespace ore
Read an NPV cube from a human readable text file.
const std::string & filename() const
Return the filename this reader is reader from.
void read(QuantLib::ext::shared_ptr< ore::analytics::NPVCube > &cube, std::map< std::string, std::string > &nettingSetMap)
Read a cube from a csv file.
The base NPV cube class.