1 /**
2 Copyright: Copyright (c) 2016, Joakim Brännström. All rights reserved.
3 License: MPL-2
4 Author: Joakim Brännström (joakim.brannstrom@gmx.com)
5 
6 This Source Code Form is subject to the terms of the Mozilla Public License,
7 v.2.0. If a copy of the MPL was not distributed with this file, You can obtain
8 one at http://mozilla.org/MPL/2.0/.
9 
10 DO NOT EDIT. THIS FILE IS GENERATED.
11 See the generator script source/devtool/generator_clang_ast_nodes.d
12 */
13 module libclang_ast.ast.reference;
14 import libclang_ast.ast.node : Node;
15 
16 abstract class Reference : Node {
17     import clang.Cursor : Cursor;
18     import libclang_ast.ast : Visitor;
19 
20     private Cursor cursor_;
21 
22     // trusted on the assumption that the node is scope allocated and all access to cursor is via a scoped ref.
23     this(scope Cursor cursor) @trusted {
24         this.cursor_ = cursor;
25     }
26 
27     Cursor cursor() return const @safe {
28         return Cursor(cursor_.cx);
29     }
30 
31     override void accept(scope Visitor v) @safe const scope {
32         static import libclang_ast.ast;
33 
34         libclang_ast.ast.accept(cursor_, v);
35     }
36 }
37 
38 final class ObjCSuperClassRef : Reference {
39     import clang.Cursor : Cursor;
40 
41     this(scope Cursor cursor) @safe {
42         super(cursor);
43     }
44 
45     override void accept(scope Visitor v) @safe const scope {
46         static import libclang_ast.ast;
47 
48         libclang_ast.ast.accept(cursor, v);
49     }
50 }
51 
52 final class ObjCProtocolRef : Reference {
53     import clang.Cursor : Cursor;
54 
55     this(scope Cursor cursor) @safe {
56         super(cursor);
57     }
58 
59     override void accept(scope Visitor v) @safe const scope {
60         static import libclang_ast.ast;
61 
62         libclang_ast.ast.accept(cursor, v);
63     }
64 }
65 
66 final class ObjCClassRef : Reference {
67     import clang.Cursor : Cursor;
68 
69     this(scope Cursor cursor) @safe {
70         super(cursor);
71     }
72 
73     override void accept(scope Visitor v) @safe const scope {
74         static import libclang_ast.ast;
75 
76         libclang_ast.ast.accept(cursor, v);
77     }
78 }
79 
80 final class TypeRef : Reference {
81     import clang.Cursor : Cursor;
82 
83     this(scope Cursor cursor) @safe {
84         super(cursor);
85     }
86 
87     override void accept(scope Visitor v) @safe const scope {
88         static import libclang_ast.ast;
89 
90         libclang_ast.ast.accept(cursor, v);
91     }
92 }
93 
94 final class CxxBaseSpecifier : Reference {
95     import clang.Cursor : Cursor;
96 
97     this(scope Cursor cursor) @safe {
98         super(cursor);
99     }
100 
101     override void accept(scope Visitor v) @safe const scope {
102         static import libclang_ast.ast;
103 
104         libclang_ast.ast.accept(cursor, v);
105     }
106 }
107 
108 final class TemplateRef : Reference {
109     import clang.Cursor : Cursor;
110 
111     this(scope Cursor cursor) @safe {
112         super(cursor);
113     }
114 
115     override void accept(scope Visitor v) @safe const scope {
116         static import libclang_ast.ast;
117 
118         libclang_ast.ast.accept(cursor, v);
119     }
120 }
121 
122 final class NamespaceRef : Reference {
123     import clang.Cursor : Cursor;
124 
125     this(scope Cursor cursor) @safe {
126         super(cursor);
127     }
128 
129     override void accept(scope Visitor v) @safe const scope {
130         static import libclang_ast.ast;
131 
132         libclang_ast.ast.accept(cursor, v);
133     }
134 }
135 
136 final class MemberRef : Reference {
137     import clang.Cursor : Cursor;
138 
139     this(scope Cursor cursor) @safe {
140         super(cursor);
141     }
142 
143     override void accept(scope Visitor v) @safe const scope {
144         static import libclang_ast.ast;
145 
146         libclang_ast.ast.accept(cursor, v);
147     }
148 }
149 
150 final class LabelRef : Reference {
151     import clang.Cursor : Cursor;
152 
153     this(scope Cursor cursor) @safe {
154         super(cursor);
155     }
156 
157     override void accept(scope Visitor v) @safe const scope {
158         static import libclang_ast.ast;
159 
160         libclang_ast.ast.accept(cursor, v);
161     }
162 }
163 
164 final class OverloadedDeclRef : Reference {
165     import clang.Cursor : Cursor;
166 
167     this(scope Cursor cursor) @safe {
168         super(cursor);
169     }
170 
171     override void accept(scope Visitor v) @safe const scope {
172         static import libclang_ast.ast;
173 
174         libclang_ast.ast.accept(cursor, v);
175     }
176 }
177 
178 final class VariableRef : Reference {
179     import clang.Cursor : Cursor;
180 
181     this(scope Cursor cursor) @safe {
182         super(cursor);
183     }
184 
185     override void accept(scope Visitor v) @safe const scope {
186         static import libclang_ast.ast;
187 
188         libclang_ast.ast.accept(cursor, v);
189     }
190 }