David 'Digit' Turner | 031fad7 | 2015-04-29 16:20:20 +0200 | [diff] [blame^] | 1 | //===--- CommentToXML.h - Convert comments to XML representation ----------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef LLVM_CLANG_INDEX_COMMENTTOXML_H |
| 11 | #define LLVM_CLANG_INDEX_COMMENTTOXML_H |
| 12 | |
| 13 | #include "clang/Basic/LLVM.h" |
| 14 | #include <memory> |
| 15 | |
| 16 | namespace clang { |
| 17 | class ASTContext; |
| 18 | |
| 19 | namespace comments { |
| 20 | class FullComment; |
| 21 | class HTMLTagComment; |
| 22 | } |
| 23 | |
| 24 | namespace index { |
| 25 | class SimpleFormatContext; |
| 26 | |
| 27 | class CommentToXMLConverter { |
| 28 | std::unique_ptr<SimpleFormatContext> FormatContext; |
| 29 | unsigned FormatInMemoryUniqueId; |
| 30 | |
| 31 | public: |
| 32 | CommentToXMLConverter(); |
| 33 | ~CommentToXMLConverter(); |
| 34 | |
| 35 | void convertCommentToHTML(const comments::FullComment *FC, |
| 36 | SmallVectorImpl<char> &HTML, |
| 37 | const ASTContext &Context); |
| 38 | |
| 39 | void convertHTMLTagNodeToText(const comments::HTMLTagComment *HTC, |
| 40 | SmallVectorImpl<char> &Text, |
| 41 | const ASTContext &Context); |
| 42 | |
| 43 | void convertCommentToXML(const comments::FullComment *FC, |
| 44 | SmallVectorImpl<char> &XML, |
| 45 | const ASTContext &Context); |
| 46 | }; |
| 47 | |
| 48 | } // namespace index |
| 49 | } // namespace clang |
| 50 | |
| 51 | #endif // LLVM_CLANG_INDEX_COMMENTTOXML_H |
| 52 | |