Debian Codegraph @

clang_delta/ReplaceClassWithBaseTemplateSpec.h

raw symbols SCIP
1 //===----------------------------------------------------------------------===//
2 //
3 // Copyright (c) 2012, 2013, 2015 The University of Utah
4 // All rights reserved.
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See the file COPYING for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef REPLACE_CLASS_WITH_BASE_TEMPLATE_SPEC_H
12 #define REPLACE_CLASS_WITH_BASE_TEMPLATE_SPEC_H
13
14 #include "Transformation.h"
15
16 namespace clang {
17 class DeclGroupRef;
18 class ASTContext;
19 }
20
21 class ReplaceClassWithBaseTemplateSpecVisitor;
22 class ReplaceClassWithBaseTemplateSpecRewriteVisitor;
23
24 class ReplaceClassWithBaseTemplateSpec : public Transformation {
25 friend class ReplaceClassWithBaseTemplateSpecVisitor;
26 friend class ReplaceClassWithBaseTemplateSpecRewriteVisitor;
27
28 public:
29 ReplaceClassWithBaseTemplateSpec(const char *TransName, const char *Desc)
30 : Transformation(TransName, Desc),
31 CollectionVisitor(NULL),
32 RewriteVisitor(NULL),
33 TheCXXRecord(NULL),
34 TheBaseName("")
35 { }
36
37 ~ReplaceClassWithBaseTemplateSpec(void);
38
39 private:
40 virtual void Initialize(clang::ASTContext &context);
41
42 virtual void HandleTranslationUnit(clang::ASTContext &Ctx);
43
44 void handleOneCXXRecordDecl(const clang::CXXRecordDecl *CXXRD);
45
46 void removeBaseSpecifier(void);
47
48 ReplaceClassWithBaseTemplateSpecVisitor *CollectionVisitor;
49
50 ReplaceClassWithBaseTemplateSpecRewriteVisitor *RewriteVisitor;
51
52 const clang::CXXRecordDecl *TheCXXRecord;
53
54 std::string TheBaseName;
55
56 // Unimplemented
57 ReplaceClassWithBaseTemplateSpec(void);
58
59 ReplaceClassWithBaseTemplateSpec(const ReplaceClassWithBaseTemplateSpec &);
60
61 void operator=(const ReplaceClassWithBaseTemplateSpec &);
62 };
63
64 #endif
65