packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmDocumentationFormatterDocbook.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef _cmDocumentationFormatterDocbook_h
13 #define _cmDocumentationFormatterDocbook_h
14
15 #include "cmStandardIncludes.h"
16
17 #include "cmDocumentationFormatter.h"
18
19 /** Class to print the documentation as Docbook.
20  http://www.oasis-open.org/docbook/xml/4.2/   */
21 class cmDocumentationFormatterDocbook : public cmDocumentationFormatter
22 {
23 public:
24   cmDocumentationFormatterDocbook();
25
26   virtual cmDocumentationEnums::Form GetForm() const
27                                   { return cmDocumentationEnums::DocbookForm;}
28
29   virtual void PrintHeader(const char* docname, const char* appname,
30                            std::ostream& os);
31   virtual void PrintFooter(std::ostream& os);
32   virtual void PrintSection(std::ostream& os,
33                             const cmDocumentationSection& section,
34                             const char* name);
35   virtual void PrintPreformatted(std::ostream& os, const char* text);
36   virtual void PrintParagraph(std::ostream& os, const char* text);
37 private:
38   void PrintId(std::ostream& os, const char* prefix, std::string id);
39   std::set<std::string> EmittedLinkIds;
40   std::string Docname;
41 };
42
43 #endif