File: ModelBuilder.h

package info (click to toggle)
aspectc%2B%2B 1%3A2.0%2Bsvn20160329-1~bpo8.0
  • links: PTS
  • area: main
  • in suites: jessie-backports
  • size: 16,132 kB
  • sloc: cpp: 106,806; ansic: 7,644; sh: 2,188; makefile: 1,269; pascal: 634; python: 402; xml: 349
file content (217 lines) | stat: -rw-r--r-- 6,951 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// This file is part of the AspectC++ compiler 'ac++'.
// Copyright (C) 1999-2003  The 'ac++' developers (see aspectc.org)
//                                                                
// This program is free software;  you can redistribute it and/or 
// modify it under the terms of the GNU General Public License as 
// published by the Free Software Foundation; either version 2 of 
// the License, or (at your option) any later version.            
//                                                                
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
// GNU General Public License for more details.                   
//                                                                
// You should have received a copy of the GNU General Public      
// License along with this program; if not, write to the Free     
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
// MA  02111-1307  USA                                            

#ifndef __ModelBuilder_h__
#define __ModelBuilder_h__

// class alias for frontend-specific model builder implementation

#include "ACModel/Elements.h"
#include "TransformInfo.h"

/* helper classes to merge the TI_ classes into the ACM_ classes, i.e. to
 * extend the join point model elements by transformation infos
 */

class TU_CodeAdvice : public ACM_CodeAdvice, public TI_CodeAdvice {
public:
  TU_CodeAdvice () : ACM_CodeAdvice () { transform_info (this); }
  ~TU_CodeAdvice () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Type : public ACM_Type, public TI_Type {
public:
  TU_Type () : ACM_Type () { transform_info (this); }
  ~TU_Type () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Arg : public ACM_Arg, public TI_Arg {
public:
  TU_Arg () : ACM_Arg () { transform_info (this); }
  ~TU_Arg () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Namespace : public ACM_Namespace, public TI_Namespace {
public:
  TU_Namespace () : ACM_Namespace () { transform_info (this); }
  ~TU_Namespace () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Class : public ACM_Class, public TI_Class {
public:
  TU_Class () : ACM_Class () { transform_info (this); }
  ~TU_Class () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Aspect : public ACM_Aspect, public TI_Aspect {
public:
  TU_Aspect () : ACM_Aspect () { transform_info (this); }
  ~TU_Aspect () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Function : public ACM_Function, public TI_Function {
public:
  TU_Function () : ACM_Function () { transform_info (this); }
  ~TU_Function () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Variable : public ACM_Variable, public TI_Variable {
public:
  TU_Variable () : ACM_Variable () { transform_info (this); }
  ~TU_Variable () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_AdviceCode : public ACM_AdviceCode, public TI_AdviceCode {
public:
  TU_AdviceCode () : ACM_AdviceCode () { transform_info (this); }
  ~TU_AdviceCode () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_ClassSlice : public ACM_ClassSlice, public TI_ClassSlice {
public:
  TU_ClassSlice () : ACM_ClassSlice () { transform_info (this); }
  ~TU_ClassSlice () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_MethodCall : public ACM_Call, public TI_MethodCall {
public:
  TU_MethodCall () { transform_info (this); }
  ~TU_MethodCall () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

// only define the classes for new feature for clang frontend, as there is no implementation for puma
#ifdef FRONTEND_CLANG

class TU_Get : public ACM_Get, public TI_Get {
public:
  TU_Get() { transform_info( this ); }
  ~TU_Get() { transform_info( 0 ); }
  virtual ModelNode &jpl() { return *this; }
};

class TU_Set : public ACM_Set, public TI_Set {
public:
  TU_Set() { transform_info( this ); }
  ~TU_Set() { transform_info( 0 ); }
  virtual ModelNode &jpl() { return *this; }
};

class TU_Ref : public ACM_Ref, public TI_Ref {
public:
  TU_Ref() { transform_info( this ); }
  ~TU_Ref() { transform_info( 0 ); }
  virtual ModelNode &jpl() { return *this; }
};

class TU_GetRef : public ACM_GetRef, public TI_GetRef {
public:
  TU_GetRef() { transform_info( this ); }
  ~TU_GetRef() { transform_info( 0 ); }
  virtual ModelNode &jpl() { return *this; }
};

class TU_SetRef : public ACM_SetRef, public TI_SetRef {
public:
  TU_SetRef() { transform_info( this ); }
  ~TU_SetRef() { transform_info( 0 ); }
  virtual ModelNode &jpl() { return *this; }
};

class TU_Builtin : public ACM_Builtin, public TI_Builtin {
public:
  TU_Builtin() { transform_info( this ); }
  ~TU_Builtin() { transform_info( 0 ); }
  virtual ModelNode &jpl() { return *this; }
};

#endif

class TU_Method : public ACM_Execution, public TI_Method {
public:
  TU_Method () { transform_info (this); }
  ~TU_Method () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Construction : public ACM_Construction, public TI_Construction {
public:
  TU_Construction () { transform_info (this); }
  ~TU_Construction () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Destruction : public ACM_Destruction, public TI_Destruction {
public:
  TU_Destruction () { transform_info (this); }
  ~TU_Destruction () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Introduction : public ACM_Introduction, public TI_Introduction {
public:
  TU_Introduction () { transform_info (this); }
  ~TU_Introduction () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Order : public ACM_Order, public TI_Order {
public:
  TU_Order () { transform_info (this); }
  ~TU_Order () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

class TU_Pointcut : public ACM_Pointcut, public TI_Pointcut {
public:
  TU_Pointcut () { transform_info (this); }
  ~TU_Pointcut () { transform_info (0); }
  virtual ModelNode &jpl () { return *this; }
};

#ifdef FRONTEND_PUMA

#include "PumaModelBuilder.h"
class ModelBuilder : public PumaModelBuilder {
public:
  ModelBuilder (Puma::VerboseMgr &vm, ACErrorStream &err, ACConfig &conf,
      ACProject &project) : PumaModelBuilder (vm, err, conf, project) {}
};

#else // FRONTEND_CLANG

#include "ClangModelBuilder.h"
class ModelBuilder : public ClangModelBuilder {
public:
  ModelBuilder (Puma::VerboseMgr &vm, ACErrorStream &err, ACConfig &conf,
      ACProject &project) : ClangModelBuilder (vm, err, conf, project) {}
};

#endif

#endif // __ModelBuilder_h__