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 15 namespace clang { 16 class ASTContext; 17 18 namespace comments { 19 class FullComment; 20 class HTMLTagComment; 21 } 22 23 namespace index { 24 class SimpleFormatContext; 25 26 class CommentToXMLConverter { 27 SimpleFormatContext *FormatContext; 28 unsigned FormatInMemoryUniqueId; 29 30 public: 31 CommentToXMLConverter() : FormatContext(0), FormatInMemoryUniqueId(0) {} 32 33 void convertCommentToHTML(const comments::FullComment *FC, 34 SmallVectorImpl<char> &HTML, 35 const ASTContext &Context); 36 37 void convertHTMLTagNodeToText(const comments::HTMLTagComment *HTC, 38 SmallVectorImpl<char> &Text, 39 const ASTContext &Context); 40 41 void convertCommentToXML(const comments::FullComment *FC, 42 SmallVectorImpl<char> &XML, 43 const ASTContext &Context); 44 }; 45 46 } // namespace index 47 } // namespace clang 48 49 #endif // LLVM_CLANG_INDEX_COMMENTTOXML_H 50 51