ignore .lib and .exe
[prop.git] / prop-src / T10.cc
blobddecc45079b1fec767641cf2b13961d5dde0a788
1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.4),
3 // last updated on Apr 3, 1997.
4 // The original source file is "T10.pcc".
5 ///////////////////////////////////////////////////////////////////////////////
7 #define PROP_GARBAGE_COLLECTION_USED
8 #include <propdefs.h>
9 #line 1 "T10.pcc"
10 #include <iostream>
12 struct IA { void hasIA() {} };
13 struct IB { void hasIB() {} };
14 struct IC { void hasIC() {} };
15 struct ID { void hasID() {} };
16 struct IE { void hasIE() {} };
17 struct I1 { void hasI1() {} };
18 struct I2 { void hasI2() {} };
19 struct I3 { void hasI3() {} };
22 #line 13 "T10.pcc"
23 #line 20 "T10.pcc"
24 ///////////////////////////////////////////////////////////////////////////////
26 // Forward class definition for T
28 ///////////////////////////////////////////////////////////////////////////////
29 #ifndef datatype_T_defined
30 #define datatype_T_defined
31 class a_T;
32 typedef a_T * T;
33 #endif
35 ///////////////////////////////////////////////////////////////////////////////
37 // Base class for datatype T
39 ///////////////////////////////////////////////////////////////////////////////
40 class a_T : public GCObject, public I1 {
41 public:
42 enum Tag_T {
43 tag_A = 0, tag_B = 1, tag_C = 2,
44 tag_D = 3
47 public:
48 const Tag_T tag__; // variant tag
49 protected:
50 inline a_T(Tag_T t__) : tag__(t__) {}
51 public:
52 inline virtual ~a_T()
55 ////////////////////////////////////////////////////////////////////////////
57 // Method for garbage collection tracing
59 ////////////////////////////////////////////////////////////////////////////
60 protected:
61 virtual void trace(GC *);
62 public:
63 #line 18 "T10.pcc"
65 void test_T() {}
66 #line 20 "T10.pcc"
67 #line 29 "T10.pcc"
68 virtual std::ostream& print(std::ostream&) = 0;
69 #line 29 "T10.pcc"
71 inline int boxed(const a_T *) { return 1; }
72 inline int untag(const a_T * x) { return x->tag__; }
73 ///////////////////////////////////////////////////////////////////////////////
75 // Class for datatype constructor T::A
77 ///////////////////////////////////////////////////////////////////////////////
78 class T_A : public a_T, public IA, public I2 {
79 public:
80 #line 13 "T10.pcc"
82 inline T_A ()
83 : a_T(tag_A)
86 inline ~T_A()
89 ////////////////////////////////////////////////////////////////////////////
91 // Method for garbage collection tracing
93 ////////////////////////////////////////////////////////////////////////////
94 protected:
95 virtual void trace(GC *);
96 public:
97 #line 13 "T10.pcc"
98 void get_A();
99 #line 13 "T10.pcc"
100 #line 30 "T10.pcc"
101 std::ostream& print(std::ostream&);
102 #line 30 "T10.pcc"
105 ///////////////////////////////////////////////////////////////////////////////
107 // Class for datatype constructor T::B
109 ///////////////////////////////////////////////////////////////////////////////
110 class T_B : public a_T, public IB, public I2 {
111 public:
112 #line 13 "T10.pcc"
114 inline T_B ()
115 : a_T(tag_B)
118 inline ~T_B()
121 ////////////////////////////////////////////////////////////////////////////
123 // Method for garbage collection tracing
125 ////////////////////////////////////////////////////////////////////////////
126 protected:
127 virtual void trace(GC *);
128 public:
129 #line 14 "T10.pcc"
130 void get_B();
131 #line 14 "T10.pcc"
132 #line 30 "T10.pcc"
133 std::ostream& print(std::ostream&);
134 #line 30 "T10.pcc"
137 ///////////////////////////////////////////////////////////////////////////////
139 // Class for datatype constructor T::C
141 ///////////////////////////////////////////////////////////////////////////////
142 class T_C : public a_T, public IC, public I2 {
143 public:
144 #line 14 "T10.pcc"
146 inline T_C ()
147 : a_T(tag_C)
150 inline ~T_C()
153 ////////////////////////////////////////////////////////////////////////////
155 // Method for garbage collection tracing
157 ////////////////////////////////////////////////////////////////////////////
158 protected:
159 virtual void trace(GC *);
160 public:
161 #line 15 "T10.pcc"
162 void get_C();
163 #line 15 "T10.pcc"
164 #line 30 "T10.pcc"
165 std::ostream& print(std::ostream&);
166 #line 30 "T10.pcc"
169 ///////////////////////////////////////////////////////////////////////////////
171 // Class for datatype constructor T::D
173 ///////////////////////////////////////////////////////////////////////////////
174 class T_D : public a_T, public ID, public I2 {
175 public:
176 #line 15 "T10.pcc"
178 inline T_D ()
179 : a_T(tag_D)
182 inline ~T_D()
185 ////////////////////////////////////////////////////////////////////////////
187 // Method for garbage collection tracing
189 ////////////////////////////////////////////////////////////////////////////
190 protected:
191 virtual void trace(GC *);
192 public:
193 #line 16 "T10.pcc"
194 void get_D();
195 #line 16 "T10.pcc"
196 #line 30 "T10.pcc"
197 std::ostream& print(std::ostream&);
198 #line 30 "T10.pcc"
201 ///////////////////////////////////////////////////////////////////////////////
203 // Datatype constructor functions for T
205 ///////////////////////////////////////////////////////////////////////////////
206 inline a_T * A ()
208 return new T_A ;
210 inline a_T * B ()
212 return new T_B ;
214 inline a_T * C ()
216 return new T_C ;
218 inline a_T * D ()
220 return new T_D ;
222 ///////////////////////////////////////////////////////////////////////////////
224 // Downcasting functions for T
226 ///////////////////////////////////////////////////////////////////////////////
227 inline T_A * _A(const a_T * _x_) { return (T_A *)_x_; }
228 inline T_B * _B(const a_T * _x_) { return (T_B *)_x_; }
229 inline T_C * _C(const a_T * _x_) { return (T_C *)_x_; }
230 inline T_D * _D(const a_T * _x_) { return (T_D *)_x_; }
232 #line 20 "T10.pcc"
233 #line 20 "T10.pcc"
236 #line 22 "T10.pcc"
237 #line 26 "T10.pcc"
238 ///////////////////////////////////////////////////////////////////////////////
240 // Forward class definition for T2
242 ///////////////////////////////////////////////////////////////////////////////
243 #ifndef datatype_T2_defined
244 #define datatype_T2_defined
245 class a_T2;
246 typedef a_T2 * T2;
247 #endif
249 ///////////////////////////////////////////////////////////////////////////////
251 // Class for datatype constructor T2::E
253 ///////////////////////////////////////////////////////////////////////////////
254 class a_T2 : public GCObject, public IE, public I3 {
255 public:
256 #line 22 "T10.pcc"
258 inline a_T2 ()
262 inline virtual ~a_T2()
265 ////////////////////////////////////////////////////////////////////////////
267 // Method for garbage collection tracing
269 ////////////////////////////////////////////////////////////////////////////
270 protected:
271 virtual void trace(GC *);
272 public:
273 #line 24 "T10.pcc"
275 void test_T2() {}
276 #line 26 "T10.pcc"
277 #line 22 "T10.pcc"
278 void get_E();
279 #line 22 "T10.pcc"
280 #line 31 "T10.pcc"
281 virtual std::ostream& print(std::ostream&);
282 #line 31 "T10.pcc"
284 inline int boxed(const a_T2 *) { return 1; }
285 inline int untag(const a_T2 *) { return 0; }
286 ///////////////////////////////////////////////////////////////////////////////
288 // Datatype constructor functions for T2
290 ///////////////////////////////////////////////////////////////////////////////
291 inline a_T2 * E ()
293 return new a_T2 ;
295 ///////////////////////////////////////////////////////////////////////////////
297 // Downcasting functions for T2
299 ///////////////////////////////////////////////////////////////////////////////
302 #line 27 "T10.pcc"
303 #line 27 "T10.pcc"
306 #line 29 "T10.pcc"
307 #line 31 "T10.pcc"
310 #line 34 "T10.pcc"
311 #line 34 "T10.pcc"
312 ///////////////////////////////////////////////////////////////////////////////
314 // Interface specification of datatype T
316 ///////////////////////////////////////////////////////////////////////////////
317 #line 34 "T10.pcc"
320 ///////////////////////////////////////////////////////////////////////////////
322 // Interface specification of datatype T2
324 ///////////////////////////////////////////////////////////////////////////////
325 #line 34 "T10.pcc"
328 ///////////////////////////////////////////////////////////////////////////////
330 // Instantiation of datatype T
332 ///////////////////////////////////////////////////////////////////////////////
333 #line 34 "T10.pcc"
334 void a_T::trace(GC * gc__)
338 void T_A::trace(GC * gc__)
340 // call to method a_T::trace() has been optimized out
343 void T_B::trace(GC * gc__)
345 // call to method a_T::trace() has been optimized out
348 void T_C::trace(GC * gc__)
350 // call to method a_T::trace() has been optimized out
353 void T_D::trace(GC * gc__)
355 // call to method a_T::trace() has been optimized out
360 ///////////////////////////////////////////////////////////////////////////////
362 // Instantiation of datatype T2
364 ///////////////////////////////////////////////////////////////////////////////
365 #line 34 "T10.pcc"
366 void a_T2::trace(GC * gc__)
372 #line 34 "T10.pcc"
373 #line 34 "T10.pcc"
376 void
377 #line 36 "T10.pcc"
379 #line 36 "T10.pcc"
380 ::get_A() { hasIA(); hasI1(); hasI2(); }
381 void
382 #line 37 "T10.pcc"
384 #line 37 "T10.pcc"
385 ::get_B() { hasIB(); hasI1(); hasI2(); }
386 void
387 #line 38 "T10.pcc"
389 #line 38 "T10.pcc"
390 ::get_C() { hasIC(); hasI1(); hasI2(); }
391 void
392 #line 39 "T10.pcc"
394 #line 39 "T10.pcc"
395 ::get_D() { hasID(); hasI1(); hasI2(); }
396 void
397 #line 40 "T10.pcc"
398 a_T2
399 #line 40 "T10.pcc"
400 ::get_E() { hasIE(); hasI3(); }
402 std::ostream&
403 #line 42 "T10.pcc"
405 #line 42 "T10.pcc"
406 ::print(std::ostream& s) { return s << "A"; }
407 std::ostream&
408 #line 43 "T10.pcc"
410 #line 43 "T10.pcc"
411 ::print(std::ostream& s) { return s << "B"; }
412 std::ostream&
413 #line 44 "T10.pcc"
415 #line 44 "T10.pcc"
416 ::print(std::ostream& s) { return s << "C"; }
417 std::ostream&
418 #line 45 "T10.pcc"
420 #line 45 "T10.pcc"
421 ::print(std::ostream& s) { return s << "D"; }
422 std::ostream&
423 #line 46 "T10.pcc"
424 a_T2
425 #line 46 "T10.pcc"
426 ::print(std::ostream& s) { return s << "E"; }
428 int main()
429 { T x = A();
430 x->test_T();
431 x->print(cout) << '\n';
432 T2 y = E();
433 y->test_T2();
434 y->print(cout) << '\n';
435 return 0;
437 #line 57 "T10.pcc"
439 ------------------------------- Statistics -------------------------------
440 Merge matching rules = yes
441 Number of DFA nodes merged = 0
442 Number of ifs generated = 0
443 Number of switches generated = 0
444 Number of labels = 0
445 Number of gotos = 0
446 Adaptive matching = disabled
447 Fast string matching = disabled
448 Inline downcasts = disabled
449 --------------------------------------------------------------------------