CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / cmDocumentationFormatter.h
blob9d35e0a034dae790d00bf277b746d1aaf09f2f31
1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #pragma once
5 #include "cmConfigure.h" // IWYU pragma: keep
7 #include <cstddef>
8 #include <iosfwd>
9 #include <string>
11 class cmDocumentationSection;
13 /** Print documentation in a simple text format. */
14 class cmDocumentationFormatter
16 public:
17 void SetIndent(std::size_t indent) { this->TextIndent = indent; }
18 void PrintFormatted(std::ostream& os, std::string const& text) const;
19 void PrintSection(std::ostream& os, cmDocumentationSection const& section);
21 private:
22 void PrintPreformatted(std::ostream& os, std::string const&) const;
23 void PrintParagraph(std::ostream& os, std::string const&) const;
24 void PrintColumn(std::ostream& os, std::string const&) const;
26 std::size_t TextWidth = 77u;
27 std::size_t TextIndent = 0u;