All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [RFC][PATCH 1/2] Adding report generator facility
Date: Thu, 04 Oct 2012 14:17:17 -0700	[thread overview]
Message-ID: <20121004211717.GB3333@swordfish.datadirect.datadirectnet.com> (raw)
In-Reply-To: 1349283900-26721-1-git-send-email-i.zhbanov@samsung.com

[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]

On (10/03/12 21:05), Igor Zhbanov wrote:
> +
> +#include "report-maker.h"
> +
> +class report_formatter /* Interface */
> +{
> +public:
> +	virtual void finish_report() = 0;
> +	virtual const char *get_result() = 0;
> +	virtual void clear_result() = 0;
> +
> +	virtual void add(const char *str) = 0;
> +	virtual void addv(const char *fmt, va_list ap) = 0;
> +
> +	virtual void add_header(const char *header, int level) = 0;
> +
> +	virtual void begin_section(section_type stype) = 0;
> +	virtual void end_section() = 0;
> +
> +	virtual void begin_table(table_type ttype) = 0;
> +	virtual void end_table() = 0;
> +
> +	virtual void begin_row(row_type rtype) = 0;
> +	virtual void end_row() = 0;
> +
> +	virtual void begin_cell(cell_type ctype) = 0;
> +	virtual void end_cell() = 0;
> +	virtual void add_empty_cell() = 0;
> +
> +	virtual void begin_paragraph() = 0;
> +	virtual void end_paragraph() = 0;
> +
> +	/* For quad-colouring CPU tables in HTML */
> +	virtual void set_cpu_number(int nr) = 0;
> +};
> +

it's better have a destructor in abstract class.

	-ss

             reply	other threads:[~2012-10-04 21:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04 21:17 Sergey Senozhatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-10-10 15:53 [Powertop] [RFC][PATCH 1/2] Adding report generator facility Chris Ferron
2012-10-10 15:39 Sergey Senozhatsky
2012-10-10 12:49 Igor Zhbanov
2012-10-09 19:31 Sergey Senozhatsky
2012-10-09 19:11 Sergey Senozhatsky
2012-10-09 19:03 Sergey Senozhatsky
2012-10-09 18:55 Sergey Senozhatsky
2012-10-09 17:25 Igor Zhbanov
2012-10-09 17:02 Igor Zhbanov
2012-10-08 16:57 Sergey Senozhatsky
2012-10-05 10:15 Igor Zhbanov
2012-10-04 21:07 Sergey Senozhatsky
2012-10-04 16:08 Ferron, Chris E
2012-10-03 17:05 Igor Zhbanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121004211717.GB3333@swordfish.datadirect.datadirectnet.com \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.