Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
cubewriter.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/cube/cubewriter.hpp
20 \brief A Class to write a cube out to file
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//! Write an NPV cube to a human readable text file
35/*! \ingroup cube
36 */
38public:
39 //! ctor
40 CubeWriter(const std::string& filename);
41
42 //! Return the filename this writer is writing too
43 const std::string& filename() { return filename_; }
44
45 //! Write a cube out to file
46 void write(const QuantLib::ext::shared_ptr<NPVCube>& cube, const std::map<std::string, std::string>& nettingSetMap,
47 bool append = false);
48
49private:
50 std::string filename_;
51};
52} // namespace analytics
53} // namespace ore
Write an NPV cube to a human readable text file.
Definition: cubewriter.hpp:37
void write(const QuantLib::ext::shared_ptr< NPVCube > &cube, const std::map< std::string, std::string > &nettingSetMap, bool append=false)
Write a cube out to file.
Definition: cubewriter.cpp:33
const std::string & filename()
Return the filename this writer is writing too.
Definition: cubewriter.hpp:43
The base NPV cube class.