Logo
Reference manual - version ored_version
Public Member Functions | List of all members
CSVFileReport Class Reference

#include <ored/report/csvreport.hpp>

+ Inheritance diagram for CSVFileReport:

Public Member Functions

 CSVFileReport (const string &filename, const char sep=',', const bool commentCharacter=true, char quoteChar='\0', const std::string &nullString="#N/A", bool lowerHeader=false, QuantLib::Size rolloverSize=QuantLib::Null< QuantLib::Size >())
 
void open ()
 
void rollover ()
 
ReportaddColumn (const string &name, const ReportType &rt, Size precision=0) override
 
Reportnext () override
 
Reportadd (const ReportType &rt) override
 
void end () override
 
void flush () override
 

Additional Inherited Members

- Public Types inherited from Report
typedef boost::variant< Size, Real, string, Date, Period > ReportType
 

Detailed Description

CSV Report class

Constructor & Destructor Documentation

◆ CSVFileReport()

CSVFileReport ( const string &  filename,
const char  sep = ',',
const bool  commentCharacter = true,
char  quoteChar = '\0',
const std::string &  nullString = "#N/A",
bool  lowerHeader = false,
QuantLib::Size  rolloverSize = QuantLib::Null< QuantLib::Size >() 
)

Create a report with the given filename, will throw if it cannot open the file.

Parameters
filenamename of the csv file that is created
sepseparator character for the csv file. It defaults to a comma.
commentCharacterif true, the first row starts with the # character.
quoteCharcharacter to use to quote strings. If not provided, strings are not quoted.
nullStringstring used to represent QuantLib::Null values or infinite values. If not provided, this defaults to #N/A.
lowerHeaderif true, makes the first character of each header lower case.
rolloverSizein MB, if set we rollover over to a new csv when file size grows above this