diff options
author | Brad King <brad.king@kitware.com> | 2013-09-13 20:09:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-16 13:22:35 (GMT) |
commit | 80a3273b5e062ea163973b504f239e0832d4cdb4 (patch) | |
tree | 239144d8917c752fbdae1db46c413a29f0f3a521 /Source/cmDocumentationFormatter.h | |
parent | b336a1ebe48a964431734568d78256a4ebd5cdad (diff) | |
download | CMake-80a3273b5e062ea163973b504f239e0832d4cdb4.zip CMake-80a3273b5e062ea163973b504f239e0832d4cdb4.tar.gz CMake-80a3273b5e062ea163973b504f239e0832d4cdb4.tar.bz2 |
Drop all documentation formatters except Usage
We now need only the Usage formatter to support command-line options
that print basic usage, and the supporting indented=>preformatted markup
processor to support CMake message formatting. Drop all other
documentation formatters and move the remaining code up into the top
cmDocumentationFormatter class.
Diffstat (limited to 'Source/cmDocumentationFormatter.h')
-rw-r--r-- | Source/cmDocumentationFormatter.h | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h index 0bce50c..c7da52c 100644 --- a/Source/cmDocumentationFormatter.h +++ b/Source/cmDocumentationFormatter.h @@ -30,15 +30,11 @@ public: ListCommands, ListModules, ListProperties, ListVariables, ListPolicies, OneManual, OneCommand, OneModule, OneProperty, OneVariable, OnePolicy }; - - /** Forms of documentation output. */ - enum Form { TextForm, HTMLForm, RSTForm, ManForm, UsageForm, DocbookForm }; }; class cmDocumentationSection; -/** Base class for printing the documentation in the various supported - formats. */ +/** Print documentation in a simple text format. */ class cmDocumentationFormatter { public: @@ -46,23 +42,15 @@ public: virtual ~cmDocumentationFormatter(); void PrintFormatted(std::ostream& os, const char* text); - virtual cmDocumentationEnums::Form GetForm() const = 0; - - virtual void PrintHeader(const char* /*docname*/, - const char* /*appname*/, - std::ostream& /*os*/) {} - virtual void PrintFooter(std::ostream& /*os*/) {} virtual void PrintSection(std::ostream& os, - const cmDocumentationSection& section, - const char* name) = 0; - virtual void PrintPreformatted(std::ostream& os, const char* text) = 0; - virtual void PrintParagraph(std::ostream& os, const char* text) = 0; - virtual void PrintIndex(std::ostream& , - std::vector<const cmDocumentationSection *>&) - {} - - /** Compute a prefix for links into a section (#\<prefix\>_SOMETHING). */ - std::string ComputeSectionLinkPrefix(std::string const& name); + cmDocumentationSection const& section); + virtual void PrintPreformatted(std::ostream& os, const char* text); + virtual void PrintParagraph(std::ostream& os, const char* text); + void PrintColumn(std::ostream& os, const char* text); + void SetIndent(const char* indent); +private: + int TextWidth; + const char* TextIndent; }; #endif |