1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
11 class cmDocumentationSection
;
13 /** Print documentation in a simple text format. */
14 class cmDocumentationFormatter
17 std::string
Format(std::string text
) const;
18 void PrintSection(std::ostream
& os
, cmDocumentationSection
const& section
);
19 void PrintFormatted(std::ostream
& os
, std::string
const& text
) const
21 os
<< this->Format(text
);
23 void SetIndent(std::size_t indent
) { this->TextIndent
= indent
; }
25 static constexpr std::size_t TEXT_WIDTH
= 77u;
28 void PrintPreformatted(std::ostream
& os
, std::string
const&) const;
29 void PrintParagraph(std::ostream
& os
, std::string
const&) const;
30 void PrintColumn(std::ostream
& os
, std::string
const&) const;
32 std::size_t TextIndent
= 0u;