summaryrefslogtreecommitdiff
path: root/src/html_formatter.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-09-16 17:38:43 +0200
committerCarl Hetherington <cth@carlh.net>2025-09-16 23:49:13 +0200
commit02dd03b4ef42db0a43b2011b5c34446f6f987c12 (patch)
tree1d78e3b1b5bc63cf38d72edc9cba485bd9727c0d /src/html_formatter.h
parentb33a97e3aa7dd3a0ddd3687762ff42a9a9e1079f (diff)
Extract StreamFormatter.
Diffstat (limited to 'src/html_formatter.h')
-rw-r--r--src/html_formatter.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/html_formatter.h b/src/html_formatter.h
index b566db86..2f87a758 100644
--- a/src/html_formatter.h
+++ b/src/html_formatter.h
@@ -19,22 +19,23 @@
*/
+#include "stream_formatter.h"
#include "verify_report.h"
namespace dcp {
-class HTMLFormatter : public Formatter
+class HTMLFormatter : public StreamFormatter
{
public:
HTMLFormatter(boost::filesystem::path file);
void heading(std::string const& text) override;
void subheading(std::string const& text) override;
- Wrap document() override;
- Wrap body() override;
- Wrap unordered_list() override;
+ std::unique_ptr<Formatter::Wrap> document() override;
+ std::unique_ptr<Formatter::Wrap> body() override;
+ std::unique_ptr<Formatter::Wrap> unordered_list() override;
void list_item(std::string const& text, boost::optional<std::string> type = {}) override;
std::function<std::string (std::string)> process_string() override;
@@ -42,7 +43,7 @@ public:
private:
void tagged(std::string tag, std::string content);
- Wrap wrapped(std::string const& tag);
+ std::unique_ptr<Formatter::Wrap> wrapped(std::string const& tag);
};
}