Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997, 1998
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
/*
31
    AUTOMATICALLY GENERATED FROM ALGEBRA c_class (VERSION 1.1)
32
    BY calculus (VERSION 1.2)
33
*/
34
 
35
#ifndef VIRT_OPS_H_INCLUDED
36
#define VIRT_OPS_H_INCLUDED
37
 
38
/* Operations for union VIRTUAL */
39
 
40
#define TAG_virt( P )			( CHECK_NULL ( P )->ag_tag )
41
 
42
 
43
/* Operations for component func of union VIRTUAL */
44
 
45
#define virt_func( P )			( CHECK_NULL ( P ) + 1 )
46
 
47
 
48
/* Operations for component no of union VIRTUAL */
49
 
50
#define virt_no( P )			( CHECK_NULL ( P ) + 2 )
51
 
52
 
53
/* Operations for component base of union VIRTUAL */
54
 
55
#define virt_base( P )			( CHECK_NULL ( P ) + 3 )
56
 
57
 
58
/* Operations for component next of union VIRTUAL */
59
 
60
#define virt_next( P )			( CHECK_NULL ( P ) + 4 )
61
 
62
 
63
/* Operations for field table of union VIRTUAL */
64
 
65
#define virt_table_tag			( ( unsigned ) 0 )
66
#define IS_virt_table( P )		( CHECK_NULL ( P )->ag_tag == 0 )
67
 
68
#define virt_table_off( P )		( CHECK_TAG ( ( P ), 0 ) + 5 )
69
#define virt_table_entries( P )		( CHECK_TAG ( ( P ), 0 ) + 6 )
70
#define virt_table_tok( P )		( CHECK_TAG ( ( P ), 0 ) + 7 )
71
#define virt_table_tbl( P )		( CHECK_TAG ( ( P ), 0 ) + 8 )
72
#define virt_table_rtti( P )		( CHECK_TAG ( ( P ), 0 ) + 9 )
73
#define virt_table_rtti_used( P )	( CHECK_TAG ( ( P ), 0 ) + 10 )
74
 
75
#define MAKE_virt_table( func_, no_, base_, off_, c_class_virt )\
76
    {\
77
	c_class *x205_ = GEN_c_class ( 11, TYPEID_virt ) ;\
78
	x205_->ag_tag = 0 ;\
79
	COPY_id ( x205_ + 1, ( func_ ) ) ;\
80
	COPY_ulong ( x205_ + 2, ( no_ ) ) ;\
81
	COPY_graph ( x205_ + 3, ( base_ ) ) ;\
82
	COPY_virt ( x205_ + 4, NULL_virt ) ;\
83
	COPY_off ( x205_ + 5, ( off_ ) ) ;\
84
	COPY_list ( x205_ + 6, NULL_list ( VIRTUAL ) ) ;\
85
	COPY_ulong ( x205_ + 7, LINK_NONE ) ;\
86
	COPY_ulong ( x205_ + 8, LINK_NONE ) ;\
87
	COPY_ulong ( x205_ + 9, LINK_NONE ) ;\
88
	COPY_int ( x205_ + 10, 0 ) ;\
89
	( c_class_virt ) = x205_ ;\
90
    }
91
 
92
#define DECONS_virt_table( func_, no_, base_, next_, off_, entries_, tok_, tbl_, rtti_, rtti_used_, c_class_virt )\
93
    {\
94
	c_class *x206_ = CHECK_TAG ( ( c_class_virt ), 0 ) ;\
95
	( func_ ) = DEREF_id ( x206_ + 1 ) ;\
96
	( no_ ) = DEREF_ulong ( x206_ + 2 ) ;\
97
	( base_ ) = DEREF_graph ( x206_ + 3 ) ;\
98
	( next_ ) = DEREF_virt ( x206_ + 4 ) ;\
99
	( off_ ) = DEREF_off ( x206_ + 5 ) ;\
100
	( entries_ ) = DEREF_list ( x206_ + 6 ) ;\
101
	( tok_ ) = DEREF_ulong ( x206_ + 7 ) ;\
102
	( tbl_ ) = DEREF_ulong ( x206_ + 8 ) ;\
103
	( rtti_ ) = DEREF_ulong ( x206_ + 9 ) ;\
104
	( rtti_used_ ) = DEREF_int ( x206_ + 10 ) ;\
105
    }
106
 
107
#define DESTROY_virt_table( destroyer_, func_, no_, base_, next_, off_, entries_, tok_, tbl_, rtti_, rtti_used_, c_class_virt )\
108
    {\
109
	c_class *x207_ = CHECK_TAG ( ( c_class_virt ), 0 ) ;\
110
	( func_ ) = DEREF_id ( x207_ + 1 ) ;\
111
	( no_ ) = DEREF_ulong ( x207_ + 2 ) ;\
112
	( base_ ) = DEREF_graph ( x207_ + 3 ) ;\
113
	( next_ ) = DEREF_virt ( x207_ + 4 ) ;\
114
	( off_ ) = DEREF_off ( x207_ + 5 ) ;\
115
	( entries_ ) = DEREF_list ( x207_ + 6 ) ;\
116
	( tok_ ) = DEREF_ulong ( x207_ + 7 ) ;\
117
	( tbl_ ) = DEREF_ulong ( x207_ + 8 ) ;\
118
	( rtti_ ) = DEREF_ulong ( x207_ + 9 ) ;\
119
	( rtti_used_ ) = DEREF_int ( x207_ + 10 ) ;\
120
	( destroyer_ ) ( x207_, ( unsigned ) 11 ) ;\
121
    }
122
 
123
 
124
/* Operations for field simple of union VIRTUAL */
125
 
126
#define virt_simple_tag			( ( unsigned ) 1 )
127
#define IS_virt_simple( P )		( CHECK_NULL ( P )->ag_tag == 1 )
128
 
129
 
130
#define MAKE_virt_simple( func_, no_, base_, c_class_virt )\
131
    {\
132
	c_class *x208_ = GEN_c_class ( 5, TYPEID_virt ) ;\
133
	x208_->ag_tag = 1 ;\
134
	COPY_id ( x208_ + 1, ( func_ ) ) ;\
135
	COPY_ulong ( x208_ + 2, ( no_ ) ) ;\
136
	COPY_graph ( x208_ + 3, ( base_ ) ) ;\
137
	COPY_virt ( x208_ + 4, NULL_virt ) ;\
138
	( c_class_virt ) = x208_ ;\
139
    }
140
 
141
#define DECONS_virt_simple( func_, no_, base_, next_, c_class_virt )\
142
    {\
143
	c_class *x209_ = CHECK_TAG ( ( c_class_virt ), 1 ) ;\
144
	( func_ ) = DEREF_id ( x209_ + 1 ) ;\
145
	( no_ ) = DEREF_ulong ( x209_ + 2 ) ;\
146
	( base_ ) = DEREF_graph ( x209_ + 3 ) ;\
147
	( next_ ) = DEREF_virt ( x209_ + 4 ) ;\
148
    }
149
 
150
#define DESTROY_virt_simple( destroyer_, func_, no_, base_, next_, c_class_virt )\
151
    {\
152
	c_class *x210_ = CHECK_TAG ( ( c_class_virt ), 1 ) ;\
153
	( func_ ) = DEREF_id ( x210_ + 1 ) ;\
154
	( no_ ) = DEREF_ulong ( x210_ + 2 ) ;\
155
	( base_ ) = DEREF_graph ( x210_ + 3 ) ;\
156
	( next_ ) = DEREF_virt ( x210_ + 4 ) ;\
157
	( destroyer_ ) ( x210_, ( unsigned ) 5 ) ;\
158
    }
159
 
160
 
161
/* Operations for field override of union VIRTUAL */
162
 
163
#define virt_override_tag		( ( unsigned ) 2 )
164
#define IS_virt_override( P )		( CHECK_NULL ( P )->ag_tag == 2 )
165
 
166
#define virt_override_ret( P )		( CHECK_TAG ( ( P ), 2 ) + 5 )
167
#define virt_override_orig( P )		( CHECK_TAG ( ( P ), 2 ) + 6 )
168
#define virt_override_src( P )		( CHECK_TAG ( ( P ), 2 ) + 7 )
169
 
170
#define MAKE_virt_override( func_, no_, base_, ret_, orig_, src_, c_class_virt )\
171
    {\
172
	c_class *x211_ = GEN_c_class ( 8, TYPEID_virt ) ;\
173
	x211_->ag_tag = 2 ;\
174
	COPY_id ( x211_ + 1, ( func_ ) ) ;\
175
	COPY_ulong ( x211_ + 2, ( no_ ) ) ;\
176
	COPY_graph ( x211_ + 3, ( base_ ) ) ;\
177
	COPY_virt ( x211_ + 4, NULL_virt ) ;\
178
	COPY_graph ( x211_ + 5, ( ret_ ) ) ;\
179
	COPY_id ( x211_ + 6, ( orig_ ) ) ;\
180
	COPY_graph ( x211_ + 7, ( src_ ) ) ;\
181
	( c_class_virt ) = x211_ ;\
182
    }
183
 
184
#define DECONS_virt_override( func_, no_, base_, next_, ret_, orig_, src_, c_class_virt )\
185
    {\
186
	c_class *x212_ = CHECK_TAG ( ( c_class_virt ), 2 ) ;\
187
	( func_ ) = DEREF_id ( x212_ + 1 ) ;\
188
	( no_ ) = DEREF_ulong ( x212_ + 2 ) ;\
189
	( base_ ) = DEREF_graph ( x212_ + 3 ) ;\
190
	( next_ ) = DEREF_virt ( x212_ + 4 ) ;\
191
	( ret_ ) = DEREF_graph ( x212_ + 5 ) ;\
192
	( orig_ ) = DEREF_id ( x212_ + 6 ) ;\
193
	( src_ ) = DEREF_graph ( x212_ + 7 ) ;\
194
    }
195
 
196
#define DESTROY_virt_override( destroyer_, func_, no_, base_, next_, ret_, orig_, src_, c_class_virt )\
197
    {\
198
	c_class *x213_ = CHECK_TAG ( ( c_class_virt ), 2 ) ;\
199
	( func_ ) = DEREF_id ( x213_ + 1 ) ;\
200
	( no_ ) = DEREF_ulong ( x213_ + 2 ) ;\
201
	( base_ ) = DEREF_graph ( x213_ + 3 ) ;\
202
	( next_ ) = DEREF_virt ( x213_ + 4 ) ;\
203
	( ret_ ) = DEREF_graph ( x213_ + 5 ) ;\
204
	( orig_ ) = DEREF_id ( x213_ + 6 ) ;\
205
	( src_ ) = DEREF_graph ( x213_ + 7 ) ;\
206
	( destroyer_ ) ( x213_, ( unsigned ) 8 ) ;\
207
    }
208
 
209
 
210
/* Operations for field inherit of union VIRTUAL */
211
 
212
#define virt_inherit_tag		( ( unsigned ) 3 )
213
#define IS_virt_inherit( P )		( CHECK_NULL ( P )->ag_tag == 3 )
214
 
215
 
216
#define MAKE_virt_inherit( func_, no_, base_, c_class_virt )\
217
    {\
218
	c_class *x214_ = GEN_c_class ( 5, TYPEID_virt ) ;\
219
	x214_->ag_tag = 3 ;\
220
	COPY_id ( x214_ + 1, ( func_ ) ) ;\
221
	COPY_ulong ( x214_ + 2, ( no_ ) ) ;\
222
	COPY_graph ( x214_ + 3, ( base_ ) ) ;\
223
	COPY_virt ( x214_ + 4, NULL_virt ) ;\
224
	( c_class_virt ) = x214_ ;\
225
    }
226
 
227
#define DECONS_virt_inherit( func_, no_, base_, next_, c_class_virt )\
228
    {\
229
	c_class *x215_ = CHECK_TAG ( ( c_class_virt ), 3 ) ;\
230
	( func_ ) = DEREF_id ( x215_ + 1 ) ;\
231
	( no_ ) = DEREF_ulong ( x215_ + 2 ) ;\
232
	( base_ ) = DEREF_graph ( x215_ + 3 ) ;\
233
	( next_ ) = DEREF_virt ( x215_ + 4 ) ;\
234
    }
235
 
236
#define DESTROY_virt_inherit( destroyer_, func_, no_, base_, next_, c_class_virt )\
237
    {\
238
	c_class *x216_ = CHECK_TAG ( ( c_class_virt ), 3 ) ;\
239
	( func_ ) = DEREF_id ( x216_ + 1 ) ;\
240
	( no_ ) = DEREF_ulong ( x216_ + 2 ) ;\
241
	( base_ ) = DEREF_graph ( x216_ + 3 ) ;\
242
	( next_ ) = DEREF_virt ( x216_ + 4 ) ;\
243
	( destroyer_ ) ( x216_, ( unsigned ) 5 ) ;\
244
    }
245
 
246
 
247
/* Operations for field complex of union VIRTUAL */
248
 
249
#define virt_complex_tag		( ( unsigned ) 4 )
250
#define IS_virt_complex( P )		( CHECK_NULL ( P )->ag_tag == 4 )
251
 
252
#define virt_complex_ret( P )		( CHECK_TAG ( ( P ), 4 ) + 5 )
253
#define virt_complex_orig( P )		( CHECK_TAG ( ( P ), 4 ) + 6 )
254
#define virt_complex_src( P )		( CHECK_TAG ( ( P ), 4 ) + 7 )
255
 
256
#define MAKE_virt_complex( func_, no_, base_, ret_, orig_, src_, c_class_virt )\
257
    {\
258
	c_class *x217_ = GEN_c_class ( 8, TYPEID_virt ) ;\
259
	x217_->ag_tag = 4 ;\
260
	COPY_id ( x217_ + 1, ( func_ ) ) ;\
261
	COPY_ulong ( x217_ + 2, ( no_ ) ) ;\
262
	COPY_graph ( x217_ + 3, ( base_ ) ) ;\
263
	COPY_virt ( x217_ + 4, NULL_virt ) ;\
264
	COPY_graph ( x217_ + 5, ( ret_ ) ) ;\
265
	COPY_id ( x217_ + 6, ( orig_ ) ) ;\
266
	COPY_graph ( x217_ + 7, ( src_ ) ) ;\
267
	( c_class_virt ) = x217_ ;\
268
    }
269
 
270
#define DECONS_virt_complex( func_, no_, base_, next_, ret_, orig_, src_, c_class_virt )\
271
    {\
272
	c_class *x218_ = CHECK_TAG ( ( c_class_virt ), 4 ) ;\
273
	( func_ ) = DEREF_id ( x218_ + 1 ) ;\
274
	( no_ ) = DEREF_ulong ( x218_ + 2 ) ;\
275
	( base_ ) = DEREF_graph ( x218_ + 3 ) ;\
276
	( next_ ) = DEREF_virt ( x218_ + 4 ) ;\
277
	( ret_ ) = DEREF_graph ( x218_ + 5 ) ;\
278
	( orig_ ) = DEREF_id ( x218_ + 6 ) ;\
279
	( src_ ) = DEREF_graph ( x218_ + 7 ) ;\
280
    }
281
 
282
#define DESTROY_virt_complex( destroyer_, func_, no_, base_, next_, ret_, orig_, src_, c_class_virt )\
283
    {\
284
	c_class *x219_ = CHECK_TAG ( ( c_class_virt ), 4 ) ;\
285
	( func_ ) = DEREF_id ( x219_ + 1 ) ;\
286
	( no_ ) = DEREF_ulong ( x219_ + 2 ) ;\
287
	( base_ ) = DEREF_graph ( x219_ + 3 ) ;\
288
	( next_ ) = DEREF_virt ( x219_ + 4 ) ;\
289
	( ret_ ) = DEREF_graph ( x219_ + 5 ) ;\
290
	( orig_ ) = DEREF_id ( x219_ + 6 ) ;\
291
	( src_ ) = DEREF_graph ( x219_ + 7 ) ;\
292
	( destroyer_ ) ( x219_, ( unsigned ) 8 ) ;\
293
    }
294
 
295
 
296
/* Operations for field link of union VIRTUAL */
297
 
298
#define virt_link_tag			( ( unsigned ) 5 )
299
#define IS_virt_link( P )		( CHECK_NULL ( P )->ag_tag == 5 )
300
 
301
#define virt_link_to( P )		( CHECK_TAG ( ( P ), 5 ) + 5 )
302
 
303
#define MAKE_virt_link( func_, no_, base_, to_, c_class_virt )\
304
    {\
305
	c_class *x220_ = GEN_c_class ( 6, TYPEID_virt ) ;\
306
	x220_->ag_tag = 5 ;\
307
	COPY_id ( x220_ + 1, ( func_ ) ) ;\
308
	COPY_ulong ( x220_ + 2, ( no_ ) ) ;\
309
	COPY_graph ( x220_ + 3, ( base_ ) ) ;\
310
	COPY_virt ( x220_ + 4, NULL_virt ) ;\
311
	COPY_ptr ( x220_ + 5, ( to_ ) ) ;\
312
	( c_class_virt ) = x220_ ;\
313
    }
314
 
315
#define DECONS_virt_link( func_, no_, base_, next_, to_, c_class_virt )\
316
    {\
317
	c_class *x221_ = CHECK_TAG ( ( c_class_virt ), 5 ) ;\
318
	( func_ ) = DEREF_id ( x221_ + 1 ) ;\
319
	( no_ ) = DEREF_ulong ( x221_ + 2 ) ;\
320
	( base_ ) = DEREF_graph ( x221_ + 3 ) ;\
321
	( next_ ) = DEREF_virt ( x221_ + 4 ) ;\
322
	( to_ ) = DEREF_ptr ( x221_ + 5 ) ;\
323
    }
324
 
325
#define DESTROY_virt_link( destroyer_, func_, no_, base_, next_, to_, c_class_virt )\
326
    {\
327
	c_class *x222_ = CHECK_TAG ( ( c_class_virt ), 5 ) ;\
328
	( func_ ) = DEREF_id ( x222_ + 1 ) ;\
329
	( no_ ) = DEREF_ulong ( x222_ + 2 ) ;\
330
	( base_ ) = DEREF_graph ( x222_ + 3 ) ;\
331
	( next_ ) = DEREF_virt ( x222_ + 4 ) ;\
332
	( to_ ) = DEREF_ptr ( x222_ + 5 ) ;\
333
	( destroyer_ ) ( x222_, ( unsigned ) 6 ) ;\
334
    }
335
 
336
 
337
#endif