Class for reading scenarios from a csv file. More...
#include <orea/scenario/scenariofilereader.hpp>
Public Member Functions | |
| ScenarioCSVReader (const QuantLib::ext::shared_ptr< ore::data::CSVReader > &reader, const QuantLib::ext::shared_ptr< ScenarioFactory > &scenarioFactory) | |
| ~ScenarioCSVReader () override | |
| Destructor. | |
| bool | next () override |
| Return true if there is another Scenario to read and move to it. | |
| QuantLib::Date | date () const override |
| Return the current scenario's date if reader is still valid and Null<Date>() otherwise. | |
| QuantLib::ext::shared_ptr< Scenario > | scenario () const override |
| Return the current scenario if reader is still valid and nullptr otherwise. | |
| Public Member Functions inherited from ScenarioReader | |
| virtual | ~ScenarioReader () |
| Destructor. | |
| virtual void | load (const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &simParams, const QuantLib::ext::shared_ptr< ore::data::TodaysMarketParameters > &marketParams) |
Protected Attributes | |
| QuantLib::ext::shared_ptr< ScenarioFactory > | scenarioFactory_ |
| Scenario factory. | |
| QuantLib::ext::shared_ptr< ore::data::CSVReader > | reader_ |
| Handle on the csv file. | |
| std::vector< RiskFactorKey > | keys_ |
| The risk factor keys of the scenarios in the file. | |
| bool | finished_ |
| Flag indicating if the reader has no more scenarios to read. | |
Class for reading scenarios from a csv file.
| ScenarioCSVReader | ( | const QuantLib::ext::shared_ptr< ore::data::CSVReader > & | reader, |
| const QuantLib::ext::shared_ptr< ScenarioFactory > & | scenarioFactory ) |
Constructor where filename gives the path to the file from which to read the scenarios and scenarioFactory is a factory for building Scenarios
|
overridevirtual |
Return true if there is another Scenario to read and move to it.
Implements ScenarioReader.
|
overridevirtual |
Return the current scenario's date if reader is still valid and Null<Date>() otherwise.
Implements ScenarioReader.
|
overridevirtual |
Return the current scenario if reader is still valid and nullptr otherwise.
Implements ScenarioReader.