summaryrefslogtreecommitdiff
path: root/src/html_formatter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/html_formatter.cc')
-rw-r--r--src/html_formatter.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/html_formatter.cc b/src/html_formatter.cc
index 5e223430..0e796cc3 100644
--- a/src/html_formatter.cc
+++ b/src/html_formatter.cc
@@ -23,12 +23,13 @@
#include <boost/filesystem.hpp>
+using std::unique_ptr;
using namespace dcp;
HTMLFormatter::HTMLFormatter(boost::filesystem::path file)
- : Formatter(file)
+ : StreamFormatter(file)
{
}
@@ -48,7 +49,7 @@ HTMLFormatter::subheading(std::string const& text)
}
-Formatter::Wrap
+unique_ptr<Formatter::Wrap>
HTMLFormatter::document()
{
auto html = wrapped("html");
@@ -79,14 +80,14 @@ HTMLFormatter::document()
}
-Formatter::Wrap
+unique_ptr<Formatter::Wrap>
HTMLFormatter::body()
{
return wrapped("body");
}
-Formatter::Wrap
+unique_ptr<Formatter::Wrap>
HTMLFormatter::unordered_list()
{
return wrapped("ul");
@@ -131,10 +132,10 @@ HTMLFormatter::tagged(std::string tag, std::string content)
}
-HTMLFormatter::Wrap
+unique_ptr<Formatter::Wrap>
HTMLFormatter::wrapped(std::string const& tag)
{
_file.puts(String::compose("<%1>", tag).c_str());
- return Wrap(this, String::compose("</%1>", tag));
+ return unique_ptr<Formatter::Wrap>(new Wrap(this, String::compose("</%1>", tag)));
}