Logo
Reference manual - version ored_version
InMemoryReport Class Reference

#include <ored/report/inmemoryreport.hpp>

Inheritance diagram for InMemoryReport:

Public Member Functions

 InMemoryReport (Size bufferSize=0)
ReportaddColumn (const string &name, const ReportType &rt, Size precision=0, bool scientific=false) override
Reportnext () override
Reportadd (const ReportType &rt) override
Reportadd (const InMemoryReport &report)
void end () override
Size columns () const
Size rows () const
const stringheader (Size i) const
bool hasHeader (string h) const
ReportType columnType (Size i) const
Size columnPrecision (Size i) const
const ReportType & data (Size i, Size j) const
 Returns the data.
void toFile (const string &filename, const char sep=',', const bool commentCharacter=true, char quoteChar='\0', const string &nullString="#N/A", bool lowerHeader=false)
void jumpToColumn (Size i)
size_t columnPosition (const std::string &columnName)
 Return the position of a column, throws an exception if columnName not in report.
Public Member Functions inherited from Report
virtual void flush ()

Additional Inherited Members

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

Detailed Description

InMemoryReport just stores report information in local vectors and provides an interface to access the values. It could be used as a backend to a GUI

Member Function Documentation

◆ addColumn()

Report & addColumn ( const string & name,
const ReportType & rt,
Size precision = 0,
bool scientific = false )
overridevirtual

Implements Report.

◆ next()

Report & next ( )
overridevirtual

Implements Report.

◆ add()

Report & add ( const ReportType & rt)
overridevirtual

Implements Report.

◆ end()

void end ( )
overridevirtual

Implements Report.