Implements csv report functionality to add title, division, header,
and logo.
Signed-off-by: Alexandra Yates <alexandra.yates(a)linux.intel.com>
---
src/report/report-formatter-csv.cpp | 39 +++++++++++++++++++++++++++++++++++
src/report/report-formatter-csv.h | 8 +++++++
2 files changed, 47 insertions(+)
diff --git a/src/report/report-formatter-csv.cpp b/src/report/report-formatter-csv.cpp
index cd70d91..bd9dfd3 100644
--- a/src/report/report-formatter-csv.cpp
+++ b/src/report/report-formatter-csv.cpp
@@ -222,3 +222,42 @@ report_formatter_csv::set_cpu_number(int nr UNUSED)
{
/* Do nothing */
}
+
+/* Report Style */
+void
+report_formatter_csv::add_header()
+{
+ add_exact("\n====================================================================\n");
+}
+
+void
+report_formatter_csv::end_hheader()
+{
+ /* Do nothing */
+}
+
+void
+report_formatter_csv::add_logo()
+{
+ add_exact("\t\t\tP o w e r T o p\n");
+}
+
+
+void
+report_formatter_csv::add_div(struct tag_attr * div_attr)
+{
+ add_exact("\n");
+}
+
+void
+report_formatter_csv::end_div()
+{
+ /*Do nothing*/
+}
+
+void
+report_formatter_csv::add_title(struct tag_attr *title_att, const char *title)
+{
+ add_exact("____________________________________________________________________\n");
+ addf_exact(" * * * %s * * *\n", title);
+}
diff --git a/src/report/report-formatter-csv.h b/src/report/report-formatter-csv.h
index 8dd2976..2c1c0fd 100644
--- a/src/report/report-formatter-csv.h
+++ b/src/report/report-formatter-csv.h
@@ -71,6 +71,14 @@ public:
void set_cpu_number(int nr);
+ /* Report Style */
+ void add_logo();
+ void add_header();
+ void end_hheader();
+ void add_div(struct tag_attr *div_attr);
+ void end_div();
+ void add_title(struct tag_attr *title_att, const char *title);
+
private:
void add_doc_header();
--
1.7.9.5