From 6232d13f5321b87ddf12a1aa36b4545da45f173d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 17 Nov 2021 22:34:57 +0100 Subject: Travel3: Simple image and video display site Reads the images and videos from filesystem and builds a site in memroy. --- src/document.hh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/document.hh (limited to 'src/document.hh') diff --git a/src/document.hh b/src/document.hh new file mode 100644 index 0000000..20e22f8 --- /dev/null +++ b/src/document.hh @@ -0,0 +1,30 @@ +#ifndef DOCUMENT_HH +#define DOCUMENT_HH + +#include "tag.hh" +#include "transport.hh" + +#include +#include + +class Document { +public: + virtual ~Document() = default; + + static std::unique_ptr create(std::string title); + + virtual void add_style(std::string rel_path) = 0; + virtual void add_script(std::string src_path) = 0; + virtual void add_script(std::unique_ptr script) = 0; + + virtual Tag* body() = 0; + + virtual std::unique_ptr build(Transport* transport) = 0; + +protected: + Document() = default; + Document(Document const&) = delete; + Document& operator=(Document const&) = delete; +}; + +#endif // DOCUMENT_HH -- cgit v1.2.3-70-g09d2