Class for writing scenarios to file. More...
#include <orea/scenario/scenariowriter.hpp>
Public Member Functions | |
ScenarioWriter (const QuantLib::ext::shared_ptr< ScenarioGenerator > &src, const std::string &filename, const char sep=',', const string &filemode="w+", const std::vector< RiskFactorKey > &headerKeys={}) | |
Constructor. | |
ScenarioWriter (const std::string &filename, const char sep=',', const string &filemode="w+", const std::vector< RiskFactorKey > &headerKeys={}) | |
Constructor to write single scenarios. | |
ScenarioWriter (const QuantLib::ext::shared_ptr< ScenarioGenerator > &src, QuantLib::ext::shared_ptr< ore::data::Report > report, const std::vector< RiskFactorKey > &headerKeys={}) | |
Constructor to write into an in-memory report for later io. | |
virtual | ~ScenarioWriter () |
Destructor. | |
virtual QuantLib::ext::shared_ptr< Scenario > | next (const Date &d) override |
Return the next scenario for the given date. | |
void | writeScenario (const QuantLib::ext::shared_ptr< Scenario > &s, const bool writeHeader) |
Write a single scenario. | |
virtual void | reset () override |
Reset the generator so calls to next() return the first scenario. | |
void | close () |
Close the file if it is open, not normally needed by client code. | |
Public Member Functions inherited from ScenarioGenerator | |
virtual | ~ScenarioGenerator () |
Default destructor. | |
Class for writing scenarios to file.