diff options
Diffstat (limited to 'src/document.hh')
| -rw-r--r-- | src/document.hh | 30 |
1 files changed, 30 insertions, 0 deletions
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 <memory> +#include <string> + +class Document { +public: + virtual ~Document() = default; + + static std::unique_ptr<Document> 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<Tag> script) = 0; + + virtual Tag* body() = 0; + + virtual std::unique_ptr<Transport::Response> build(Transport* transport) = 0; + +protected: + Document() = default; + Document(Document const&) = delete; + Document& operator=(Document const&) = delete; +}; + +#endif // DOCUMENT_HH |
