1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 3 /* 4 * Main authors: 5 * Guido Tack <guido.tack@monash.edu> 6 */ 7 8 /* This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 11 12 #pragma once 13 14 #include <iostream> 15 #include <utility> 16 #include <vector> 17 18 namespace MiniZinc { 19 20 class Model; 21 22 class HtmlDocument { 23 protected: 24 std::string _filename; 25 std::string _title; 26 std::string _doc; 27 28 public: HtmlDocument(std::string filename,std::string title,std::string document)29 HtmlDocument(std::string filename, std::string title, std::string document) 30 : _filename(std::move(filename)), _title(std::move(title)), _doc(std::move(document)) {} filename() const31 std::string filename() const { return _filename; } title() const32 std::string title() const { return _title; } document() const33 std::string document() const { return _doc; } 34 }; 35 36 class HtmlPrinter { 37 public: 38 static std::vector<HtmlDocument> printHtml(EnvI& env, Model* m, const std::string& basename, 39 int splitLevel, bool includeStdLib, 40 bool generateIndex); 41 }; 42 43 class RSTPrinter { 44 public: 45 static std::vector<HtmlDocument> printRST(EnvI& env, Model* m, const std::string& basename, 46 int splitLevel, bool includeStdLib, bool generateIndex); 47 }; 48 49 } // namespace MiniZinc 50