clang API Documentation
00001 //===--- CommentToXML.h - Convert comments to XML representation ----------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #ifndef LLVM_CLANG_INDEX_COMMENTTOXML_H 00011 #define LLVM_CLANG_INDEX_COMMENTTOXML_H 00012 00013 #include "clang/Basic/LLVM.h" 00014 #include <memory> 00015 00016 namespace clang { 00017 class ASTContext; 00018 00019 namespace comments { 00020 class FullComment; 00021 class HTMLTagComment; 00022 } 00023 00024 namespace index { 00025 class SimpleFormatContext; 00026 00027 class CommentToXMLConverter { 00028 std::unique_ptr<SimpleFormatContext> FormatContext; 00029 unsigned FormatInMemoryUniqueId; 00030 00031 public: 00032 CommentToXMLConverter(); 00033 ~CommentToXMLConverter(); 00034 00035 void convertCommentToHTML(const comments::FullComment *FC, 00036 SmallVectorImpl<char> &HTML, 00037 const ASTContext &Context); 00038 00039 void convertHTMLTagNodeToText(const comments::HTMLTagComment *HTC, 00040 SmallVectorImpl<char> &Text, 00041 const ASTContext &Context); 00042 00043 void convertCommentToXML(const comments::FullComment *FC, 00044 SmallVectorImpl<char> &XML, 00045 const ASTContext &Context); 00046 }; 00047 00048 } // namespace index 00049 } // namespace clang 00050 00051 #endif // LLVM_CLANG_INDEX_COMMENTTOXML_H 00052