Content-Type: multipart/mixed; boundary="===============4959807328568018217==" MIME-Version: 1.0 From: Alexandra Yates Subject: [Powertop] [PATCH v2 05/31] report-csv: title, div, logo, header Date: Fri, 15 Nov 2013 16:28:52 -0800 Message-ID: <1384561758-21516-6-git-send-email-alexandra.yates@linux.intel.com> In-Reply-To: 1384561758-21516-1-git-send-email-alexandra.yates@linux.intel.com To: powertop@lists.01.org List-ID: --===============4959807328568018217== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Implements csv report functionality to add title, division, header, and logo. Signed-off-by: Alexandra Yates --- 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-format= ter-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=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D\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 *ti= tle) +{ + add_exact("______________________________________________________________= ______\n"); + addf_exact(" * * * %s * * *\n", title); +} diff --git a/src/report/report-formatter-csv.h b/src/report/report-formatte= r-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 --===============4959807328568018217==--