Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmDocumentationFormatter.h
blob643dec4834c520fae536c937c8f542d8927bba4e
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmDocumentationFormatter.h,v $
5 Language: C++
6 Date: $Date: 2007/10/24 15:36:47 $
7 Version: $Revision: 1.5 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef _cmDocumentationFormatter_h
18 #define _cmDocumentationFormatter_h
20 #include "cmStandardIncludes.h"
22 /** This is just a helper class to make it build with MSVC 6.0.
23 Actually the enums and internal classes could directly go into
24 cmDocumentation, but then MSVC6 complains in RequestedHelpItem that
25 cmDocumentation is an undefined type and so it doesn't know the enums.
26 Moving the enums to a class which is then already completely parsed helps
27 against this. */
28 class cmDocumentationEnums
30 public:
31 /** Types of help provided. */
32 enum Type
33 { None, Usage, Single, SingleModule, SingleProperty, SingleVariable,
34 List, ModuleList, PropertyList, VariableList,
35 Full, Properties, Variables, Modules, CustomModules, Commands,
36 CompatCommands, Copyright, Version };
38 /** Forms of documentation output. */
39 enum Form { TextForm, HTMLForm, ManForm, UsageForm };
42 class cmDocumentationSection;
44 /** Base class for printing the documentation in the various supported
45 formats. */
46 class cmDocumentationFormatter
48 public:
49 cmDocumentationFormatter();
50 virtual ~cmDocumentationFormatter();
51 void PrintFormatted(std::ostream& os, const char* text);
53 virtual cmDocumentationEnums::Form GetForm() const = 0;
55 virtual void PrintHeader(const char* /*name*/, std::ostream& /*os*/) {}
56 virtual void PrintFooter(std::ostream& /*os*/) {}
57 virtual void PrintSection(std::ostream& os,
58 const cmDocumentationSection& section,
59 const char* name) = 0;
60 virtual void PrintPreformatted(std::ostream& os, const char* text) = 0;
61 virtual void PrintParagraph(std::ostream& os, const char* text) = 0;
64 #endif