#include <ored/report/inmemoryreport.hpp>
Public Member Functions | |
InMemoryReport () | |
Report & | addColumn (const string &name, const ReportType &rt, Size precision=0) override |
Report & | next () override |
Report & | add (const ReportType &rt) override |
Report & | add (const InMemoryReport &report) |
void | end () override |
Size | columns () const |
Size | rows () const |
const string & | header (Size i) const |
bool | hasHeader (string h) const |
ReportType | columnType (Size i) const |
Size | columnPrecision (Size i) const |
const vector< ReportType > & | data (Size i) const |
Returns the data. More... | |
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) |
Public Member Functions inherited from Report | |
virtual | ~Report () |
virtual Report & | addColumn (const string &name, const ReportType &, Size precision=0)=0 |
virtual Report & | next ()=0 |
virtual Report & | add (const ReportType &rt)=0 |
virtual void | end ()=0 |
virtual void | flush () |
Private Attributes | |
Size | i_ |
vector< string > | headers_ |
vector< ReportType > | columnTypes_ |
vector< Size > | columnPrecision_ |
vector< vector< ReportType > > | data_ |
Additional Inherited Members | |
Public Types inherited from Report | |
typedef boost::variant< Size, Real, string, Date, Period > | ReportType |
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
Definition at line 41 of file inmemoryreport.hpp.
InMemoryReport | ( | ) |
Definition at line 43 of file inmemoryreport.hpp.
|
overridevirtual |
Implements Report.
Definition at line 26 of file inmemoryreport.cpp.
|
overridevirtual |
|
overridevirtual |
Implements Report.
Definition at line 42 of file inmemoryreport.cpp.
Report & add | ( | const InMemoryReport & | report | ) |
Definition at line 55 of file inmemoryreport.cpp.
|
overridevirtual |
Size columns | ( | ) | const |
Size rows | ( | ) | const |
Definition at line 53 of file inmemoryreport.hpp.
const string & header | ( | Size | i | ) | const |
bool hasHeader | ( | string | h | ) | const |
Definition at line 55 of file inmemoryreport.hpp.
ReportType columnType | ( | Size | i | ) | const |
Definition at line 56 of file inmemoryreport.hpp.
Size columnPrecision | ( | Size | i | ) | const |
Definition at line 57 of file inmemoryreport.hpp.
const vector< Report::ReportType > & data | ( | Size | i | ) | const |
Returns the data.
Definition at line 87 of file inmemoryreport.cpp.
void toFile | ( | const string & | filename, |
const char | sep = ',' , |
||
const bool | commentCharacter = true , |
||
char | quoteChar = '\0' , |
||
const string & | nullString = "#N/A" , |
||
bool | lowerHeader = false |
||
) |
Definition at line 95 of file inmemoryreport.cpp.
void jumpToColumn | ( | Size | i | ) |
Definition at line 62 of file inmemoryreport.hpp.
|
private |
Definition at line 65 of file inmemoryreport.hpp.
|
private |
Definition at line 66 of file inmemoryreport.hpp.
|
private |
Definition at line 67 of file inmemoryreport.hpp.
|
private |
Definition at line 68 of file inmemoryreport.hpp.
|
private |
Definition at line 69 of file inmemoryreport.hpp.