blob: bb7b71ad411b66b47d65e125e1d5c433f7a65f6a [file] [log] [blame]
David 'Digit' Turner031fad72015-04-29 16:20:20 +02001//===--- 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
16namespace clang {
17class ASTContext;
18
19namespace comments {
20class FullComment;
21class HTMLTagComment;
22}
23
24namespace index {
25class SimpleFormatContext;
26
27class CommentToXMLConverter {
28 std::unique_ptr<SimpleFormatContext> FormatContext;
29 unsigned FormatInMemoryUniqueId;
30
31public:
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