BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnReportElement.h
Go to the documentation of this file.
1/**
2 * \file BmnReportElement.h
3 * \brief Abstract class for basic report elements (headers, tables, images etc.).
4 * \author Semen Lebedev <s.lebedev@gsi.de>
5 * \date 2011
6 */
7#ifndef BMNREPORTELEMENT_H_
8#define BMNREPORTELEMENT_H_
9
10#include "TObject.h"
11
12#include <string>
13#include <vector>
14
15using std::string;
16using std::vector;
17
18/**
19 * \class BmnReportElement
20 *
21 * \brief Abstract class for basic report elements (headers, tables, images etc.).
22 *
23 * Each concrete implementation for report elements has to implement
24 * this interface (e.g. Latex, text, HTML). Report has to be written
25 * using functionality of this interface class in order to be able
26 * to automatically produce reports in different representations
27 * (e.g. Latex, text, HTML).
28 *
29 * \author Semen Lebedev <s.lebedev@gsi.de>
30 * \date 2011
31 *
32 */
34{
35 public:
36 /**
37 * \brief Constructor.
38 */
40
41 /**
42 * \brief Destructor.
43 */
44 virtual ~BmnReportElement() {}
45
46 /**
47 * \brief Return string with table open tag.
48 * \param[in] caption Table caption.
49 * \param[in] colNames Names of the columns in table.
50 * \return String with table open tag.
51 */
52 virtual string TableBegin(const string& caption, const vector<string>& colNames) const = 0;
53
54 /**
55 * \brief Return string with table close tag.
56 * \return String with table close tag.
57 */
58 virtual string TableEnd() const = 0;
59
60 /**
61 * \brief Return string with table row which spans over all columns.
62 * \param[in] nofCols number of columns in table.
63 * \param[in] name Name of the row.
64 * \return string with table row which spans over all columns.
65 */
66 virtual string TableEmptyRow(int nofCols, const string& name) const = 0;
67
68 /**
69 * \brief Return string with table row tags.
70 * \param[in] row Array of strings with data for each cell in a row.
71 * \return string with table row tags.
72 */
73 virtual string TableRow(const vector<string>& row) const = 0;
74
75 /**
76 * \brief Return string with image tags.
77 * \param[in] title Title of the image.
78 * \param[in] file Name of the image file.
79 * \return string with image tags.
80 */
81
82 virtual string Image(const string& title, const string& file) const = 0;
83
84 /**
85 * \brief Return string with open tags for document.
86 * \return string with open tags for document.
87 */
88 virtual string DocumentBegin() const = 0;
89
90 /**
91 * \brief Return string with close tags of the document.
92 * \return string with close tags of the document.
93 */
94 virtual string DocumentEnd() const = 0;
95
96 /**
97 * \brief Return string with title.
98 * \param[in] size Size of the title. [0-5]. 0 is the largest size.
99 * \param[in] title Title string.
100 * \return string with subtitle.
101 */
102 virtual string Title(int size, const string& title) const = 0;
103
105};
106
107#endif /* BmnREPORTELEMENT_H_ */
#define ClassDef(name, id)
virtual string Title(int size, const string &title) const =0
Return string with title.
virtual string TableRow(const vector< string > &row) const =0
Return string with table row tags.
virtual string DocumentBegin() const =0
Return string with open tags for document.
BmnReportElement()
Constructor.
virtual string TableBegin(const string &caption, const vector< string > &colNames) const =0
Return string with table open tag.
virtual string Image(const string &title, const string &file) const =0
Return string with image tags.
virtual ~BmnReportElement()
Destructor.
virtual string TableEnd() const =0
Return string with table close tag.
virtual string DocumentEnd() const =0
Return string with close tags of the document.
virtual string TableEmptyRow(int nofCols, const string &name) const =0
Return string with table row which spans over all columns.