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/cmDocumentation.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/cmDocumentation.h')
-rw-r--r-- | Source/cmDocumentation.h | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index 31c7602..37707b4 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -15,12 +15,6 @@ #include "cmStandardIncludes.h" #include "cmProperty.h" #include "cmDocumentationFormatter.h" -#include "cmDocumentationFormatterHTML.h" -#include "cmDocumentationFormatterDocbook.h" -#include "cmDocumentationFormatterMan.h" -#include "cmDocumentationFormatterRST.h" -#include "cmDocumentationFormatterText.h" -#include "cmDocumentationFormatterUsage.h" #include "cmDocumentationSection.h" #include "cmake.h" @@ -89,33 +83,9 @@ public: void AppendSection(const char *sectionName, cmDocumentationEntry &docs); - /** - * Print documentation in the given form. All previously added - * sections will be generated. - */ - void Print(Form f, int manSection, std::ostream& os); - - /** - * Print documentation in the current form. All previously added - * sections will be generated. - */ - void Print(std::ostream& os); - - /** - * Add a section of documentation. This can be used to generate custom help - * documents. - */ - void AddSectionToPrint(const char *section); - - /** Clear all previously added sections of help. */ - void ClearSections(); - /** Set cmake root so we can find installed files */ void SetCMakeRoot(const char* root) { this->CMakeRoot = root;} - static Form GetFormFromFilename(const std::string& filename, - int* ManSection); - /** Add common (to all tools) documentation section(s) */ void addCommonStandardDocSections(); @@ -129,7 +99,6 @@ public: void addCPackStandardDocSections(); private: - void SetForm(Form f, int manSection); void GlobHelp(std::vector<std::string>& files, std::string const& pattern); void PrintNames(std::ostream& os, std::string const& pattern); @@ -159,27 +128,20 @@ private: std::map<std::string,cmDocumentationSection*> AllSections; std::string CMakeRoot; - std::vector<const cmDocumentationSection *> PrintSections; std::string CurrentArgument; struct RequestedHelpItem { - RequestedHelpItem():HelpForm(TextForm), HelpType(None), ManSection(1) {} - cmDocumentationEnums::Form HelpForm; + RequestedHelpItem(): HelpType(None) {} cmDocumentationEnums::Type HelpType; std::string Filename; std::string Argument; - int ManSection; }; std::vector<RequestedHelpItem> RequestedHelpItems; - cmDocumentationFormatter* CurrentFormatter; - cmDocumentationFormatterHTML HTMLFormatter; - cmDocumentationFormatterDocbook DocbookFormatter; - cmDocumentationFormatterMan ManFormatter; - cmDocumentationFormatterRST RSTFormatter; - cmDocumentationFormatterText TextFormatter; - cmDocumentationFormatterUsage UsageFormatter; + cmDocumentationFormatter Formatter; + + static void WarnFormFromFilename(RequestedHelpItem& request); }; #endif |