diff options
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 |