/** * \file CbmHtmlReportElement.cxx * \author Semen Lebedev * \date 2011 */ #include "CbmHtmlReportElement.h" #include using std::stringstream; using std::endl; CbmHtmlReportElement::CbmHtmlReportElement() { } CbmHtmlReportElement::~CbmHtmlReportElement() { } string CbmHtmlReportElement::TableBegin( const string& caption, const vector& colNames) const { stringstream ss; ss << "

" << caption << "

"; ss << "" << endl; ss << ""; for (int i = 0; i < colNames.size(); i++) { ss << ""; } ss << "" << endl; return ss.str(); } string CbmHtmlReportElement::TableEnd() const { return "
" << colNames[i] << "
"; } string CbmHtmlReportElement::TableEmptyRow( int nofCols, const string& name) const { stringstream ss; ss << "
" << name << "
" << endl; return ss.str(); } string CbmHtmlReportElement::TableRow( const vector& row) const { string st = ""; for (int i = 0; i < row.size(); i++) { st += "" + row[i] + ""; } st += " \n"; return st; } string CbmHtmlReportElement::Image( const string& title, const string& file) const { stringstream ss; ss << "

" << title << "

"; ss << "\"""; return ss.str(); } string CbmHtmlReportElement::DocumentBegin() const { string str = ""; return str; } string CbmHtmlReportElement::DocumentEnd() const { return ""; } string CbmHtmlReportElement::Title( int size, const string& title) const { stringstream ss; ss << "" << title << ""; return ss.str(); } ClassImp(CbmHtmlReportElement)