~ubuntu-branches/ubuntu/intrepid/aspectc++/intrepid

« back to all changes in this revision

Viewing changes to Puma/include/Puma/CTypeInfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2005-12-23 10:49:40 UTC
  • Revision ID: james.westby@ubuntu.com-20051223104940-ig4klhoi991zs7km
Tags: upstream-0.99+1.0pre2
ImportĀ upstreamĀ versionĀ 0.99+1.0pre2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __ac_FIRST__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1__
 
2
#define __ac_FIRST__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1__
 
3
#define __ac_FIRST_FILE__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CTypeInfo_h__
 
4
 
 
5
#ifndef __ac_h_
 
6
#define __ac_h_
 
7
namespace AC {
 
8
  typedef const char* Type;
 
9
  enum JPType { CALL = 0x0004, EXECUTION = 0x0008, CONSTRUCTION = 0x0010, DESTRUCTION = 0x0020 };
 
10
  struct Action {
 
11
    void **_args; void *_result; void *_target; void *_that; void *_fptr;
 
12
    void (*_wrapper)(Action &);
 
13
    inline void trigger () { _wrapper (*this); }
 
14
  };
 
15
  struct AnyResultBuffer {};
 
16
  template <typename T> struct ResultBuffer : public AnyResultBuffer {
 
17
    char _data[sizeof (T)];
 
18
    ~ResultBuffer () { ((T*)_data)->T::~T(); }
 
19
    operator T& () const { return *(T*)_data; }
 
20
  };
 
21
  template <class Aspect, int Index>
 
22
  struct CFlow {
 
23
    static int &instance () {
 
24
      static int counter = 0;
 
25
      return counter;
 
26
    }
 
27
    CFlow () { instance ()++; }
 
28
    ~CFlow () { instance ()--; }
 
29
    static bool active () { return instance () > 0; }
 
30
  };
 
31
}
 
32
inline void * operator new (__SIZE_TYPE__, AC::AnyResultBuffer *p) { return p; }
 
33
inline void operator delete (void *, AC::AnyResultBuffer *) { } // for VC++
 
34
#endif // __ac_h_
 
35
#endif // __ac_FIRST__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1__
 
36
 
 
37
#line 1 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CTypeInfo.h"
 
38
// This file is part of PUMA.
 
39
// Copyright (C) 1999-2003  The PUMA developer team.
 
40
//                                                                
 
41
// This program is free software;  you can redistribute it and/or 
 
42
// modify it under the terms of the GNU General Public License as 
 
43
// published by the Free Software Foundation; either version 2 of 
 
44
// the License, or (at your option) any later version.            
 
45
//                                                                
 
46
// This program is distributed in the hope that it will be useful,
 
47
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
 
48
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
 
49
// GNU General Public License for more details.                   
 
50
//                                                                
 
51
// You should have received a copy of the GNU General Public      
 
52
// License along with this program; if not, write to the Free     
 
53
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
 
54
// MA  02111-1307  USA                                            
 
55
 
 
56
#ifndef __CTypeInfo_h__
 
57
#define __CTypeInfo_h__
 
58
 
 
59
#include "Puma/Printable.h"
 
60
 
 
61
namespace Puma {
 
62
 
 
63
 
 
64
class CClassDatabase;
 
65
class CRecord;
 
66
class CClassInfo;
 
67
class CUnionInfo;
 
68
class CEnumInfo;
 
69
class CFunctionInfo;
 
70
class CTypeList;
 
71
class CTypeQualified;
 
72
class CTypeFunction;
 
73
class CTypeBitField; 
 
74
class CTypePointer; 
 
75
class CTypeMemberPointer; 
 
76
class CTypeTemplateParam; 
 
77
class CTypeAddress; 
 
78
class CTypeArray; 
 
79
class CTypeVarArray;
 
80
class CTypeClass;
 
81
class CTypeUnion;
 
82
class CTypeEnum;
 
83
class CTypePrimitive;
 
84
class CTypeRecord;
 
85
class CT_ExprList;
 
86
class CObjectInfo;
 
87
class CScopeInfo;
 
88
//class ostream;
 
89
 
 
90
 
 
91
#line 92 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CTypeInfo.h"
 
92
} // closed Puma
 
93
class WinIfExists;
 
94
class WinImportHandler;
 
95
class WinMacros;
 
96
class CMatchSyntax;
 
97
class ExtGnu;
 
98
class ExtAC;
 
99
class ExtACTree;
 
100
class WinAsm;
 
101
class WinDeclSpecs;
 
102
class WinMemberExplSpec;
 
103
class WinTypeKeywords;
 
104
class PragmaOnceUnitState;
 
105
class PragmaOnce;
 
106
class CCExprResolve;
 
107
class CExprResolve;
 
108
namespace Puma {
 
109
 
 
110
#line 53 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CTypeInfo.h"
 
111
class CTypeInfo : public Printable {
 
112
#line 113 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CTypeInfo.h"
 
113
  friend class ::WinIfExists;
 
114
  friend class ::WinImportHandler;
 
115
  friend class ::WinMacros;
 
116
  friend class ::CMatchSyntax;
 
117
  friend class ::ExtGnu;
 
118
  friend class ::ExtAC;
 
119
  friend class ::ExtACTree;
 
120
  friend class ::WinAsm;
 
121
  friend class ::WinDeclSpecs;
 
122
  friend class ::WinMemberExplSpec;
 
123
  friend class ::WinTypeKeywords;
 
124
  friend class ::PragmaOnceUnitState;
 
125
  friend class ::PragmaOnce;
 
126
  friend class ::CCExprResolve;
 
127
  friend class ::CExprResolve;
 
128
 
 
129
#line 53 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CTypeInfo.h"
 
130
 
 
131
  // needed for type printing
 
132
  enum PrintState {
 
133
    PRINT_STD = 0,  // standard
 
134
    PRINT_PRE = 1,  // printing a declarator prefix like '*' or '&'
 
135
    PRINT_ABS = 2,  // printing absolute names
 
136
    PRINT_TPL = 4,  // printing template argument list
 
137
    PRINT_TDN = 8   // print typedef names instead of defined type
 
138
  };
 
139
 
 
140
public:
 
141
  enum TypeId {
 
142
    /* DO NOT CHANGE THIS ORDER */
 
143
    TYPE_BOOL,
 
144
    TYPE_SIGNED_CHAR,
 
145
    TYPE_UNSIGNED_CHAR,
 
146
    TYPE_CHAR,
 
147
    TYPE_UNSIGNED_SHORT,
 
148
    TYPE_SHORT,
 
149
    TYPE_UNSIGNED_INT,
 
150
    TYPE_WCHAR_T,
 
151
    TYPE_INT,
 
152
    TYPE_UNSIGNED_LONG,
 
153
    TYPE_LONG,
 
154
    TYPE_UNSIGNED_LONG_LONG,
 
155
    TYPE_LONG_LONG,
 
156
    TYPE_FLOAT,
 
157
    TYPE_DOUBLE,
 
158
    TYPE_LONG_DOUBLE,
 
159
 
 
160
    TYPE_VOID,
 
161
    TYPE_UNDEFINED,
 
162
    TYPE_UNKNOWN_T,
 
163
    TYPE_ELLIPSIS,
 
164
    
 
165
    TYPE_CLASS,
 
166
    TYPE_UNION,
 
167
    TYPE_ENUM,
 
168
    TYPE_POINTER,
 
169
    TYPE_ADDRESS,
 
170
    TYPE_MEMBER_POINTER,
 
171
    TYPE_FUNCTION,
 
172
    TYPE_ARRAY,
 
173
    TYPE_VAR_ARRAY,
 
174
    TYPE_QUALIFIED,
 
175
    TYPE_BIT_FIELD,
 
176
    
 
177
    TYPE_TEMPLATE_PARAM,
 
178
    TYPE_EMPTY
 
179
  };
 
180
  
 
181
  // internal representation of size_t and ptrdiff_t types
 
182
  static CTypeInfo *CTYPE_SIZE_T;
 
183
  static CTypeInfo *CTYPE_PTRDIFF_T;
 
184
 
 
185
private:
 
186
  CTypeInfo   *_Base;
 
187
  TypeId       _Id;
 
188
  CObjectInfo *_TypedefInfo;
 
189
 
 
190
public:
 
191
  CTypeInfo (CTypeInfo *, TypeId);
 
192
  ~CTypeInfo ();
 
193
 
 
194
  bool operator ==(const CTypeInfo &) const;
 
195
  bool operator !=(const CTypeInfo &) const;
 
196
  
 
197
  void print (ostream& os) const;
 
198
  void TypeText (ostream &, const char * = (const char*)0,
 
199
                 bool abs = false, bool tdef = false) const;
 
200
  long int Dimension () const;
 
201
  
 
202
  long int Size () const;
 
203
  long int Align () const;
 
204
 
 
205
  TypeId Id () const;
 
206
 
 
207
  CTypeInfo *BaseType () const;
 
208
  void BaseType (CTypeInfo *);
 
209
 
 
210
  bool isTypedef () const;
 
211
  CObjectInfo *TypedefInfo () const;
 
212
  CTypeInfo *TypedefInfo (CObjectInfo *);
 
213
 
 
214
  bool isComplete (unsigned long = 0) const;
 
215
  bool isConst () const;
 
216
  bool isVolatile () const;
 
217
  bool isRestrict () const;
 
218
  bool isDependent (bool = true) const;
 
219
  
 
220
  CRecord *Record () const;
 
221
  CClassInfo *ClassInfo () const;
 
222
  CUnionInfo *UnionInfo () const;
 
223
  CEnumInfo *EnumInfo () const;
 
224
  CFunctionInfo *FunctionInfo () const;
 
225
 
 
226
  CTypeInfo *PtrBaseType () const;
 
227
  CTypeList *ArgTypes () const;
 
228
  CTypeInfo *VirtualType () const;
 
229
  CTypeInfo *UnqualType () const;
 
230
    
 
231
  CTypeFunction *PtrToFct () const;
 
232
  CTypeArray *PtrToArray () const;
 
233
  
 
234
  CTypeQualified *TypeQualified () const;
 
235
  CTypeFunction *TypeFunction () const;
 
236
  CTypeBitField *TypeBitField () const; 
 
237
  CTypePointer *TypePointer () const; 
 
238
  CTypeMemberPointer *TypeMemberPointer () const; 
 
239
  CTypeAddress *TypeAddress () const; 
 
240
  CTypeArray *TypeArray () const; 
 
241
  CTypeVarArray *TypeVarArray () const;
 
242
  CTypeClass *TypeClass () const;
 
243
  CTypeUnion *TypeUnion () const;
 
244
  CTypeRecord *TypeRecord () const;
 
245
  CTypeEnum *TypeEnum () const;
 
246
  CTypePrimitive *TypePrimitive () const;
 
247
  CTypeInfo *TypeEmpty () const;
 
248
  CTypeTemplateParam *TypeTemplateParam () const;
 
249
 
 
250
  bool isQualified () const;
 
251
  bool isPointer () const;
 
252
  bool isPointerOrArray () const;
 
253
  bool isAddress () const;
 
254
  bool isRecord () const;
 
255
  bool isClass () const;
 
256
  bool isUnion () const;
 
257
  bool isArray () const;
 
258
  bool isFixedArray () const;
 
259
  bool isVarArray () const;
 
260
  bool isArithmetic () const;
 
261
  bool isScalar () const;
 
262
  bool isAggregate () const;
 
263
  bool isInteger () const;
 
264
  bool isVoid () const;
 
265
  bool isEnum () const;
 
266
  bool isReal () const;
 
267
  bool isMemberPointer () const;
 
268
  bool isUndefined () const;
 
269
  bool isFunction () const;
 
270
  bool isBitField () const;
 
271
  bool isMethod () const;
 
272
  bool isStdFunction () const;
 
273
  bool isTemplate () const;
 
274
  bool isTemplateInstance () const;
 
275
  bool isTemplateParam () const;
 
276
  bool isTypeParam () const;
 
277
  bool isNonTypeParam () const;
 
278
  bool isObject (unsigned long = 0) const;
 
279
 
 
280
  // Primitive types.
 
281
  bool is_bool () const;
 
282
  bool is_char () const;
 
283
  bool is_wchar_t () const;
 
284
  bool is_short () const;
 
285
  bool is_int () const;
 
286
  bool is_long () const;
 
287
  bool is_long_long () const;
 
288
  bool is_signed_char () const;
 
289
  bool is_unsigned_char () const;
 
290
  bool is_unsigned_short () const;
 
291
  bool is_unsigned_int () const;
 
292
  bool is_unsigned_long () const;
 
293
  bool is_unsigned_long_long () const;
 
294
  bool is_float () const;
 
295
  bool is_double () const;
 
296
  bool is_long_double () const;
 
297
  bool is_void () const;
 
298
  bool is_undefined () const;
 
299
  bool is_unknown_t () const;
 
300
  bool is_ellipsis () const;
 
301
  
 
302
  bool is_signed () const;
 
303
  bool is_unsigned () const;
 
304
 
 
305
  // arithmetic conversion rank (C only)
 
306
  unsigned conv_rank () const;
 
307
  // compare arithmetic types (C only)
 
308
  bool operator >(const CTypeInfo &) const;
 
309
  bool operator >=(const CTypeInfo &) const;
 
310
  bool operator <=(const CTypeInfo &) const;
 
311
  bool operator <(const CTypeInfo &) const;
 
312
  
 
313
  // rank C++ arithmetic types
 
314
  unsigned rank () const;
 
315
  
 
316
public:
 
317
  // Duplicate the given type structure.
 
318
#ifndef __puma // PUMA is confused by static and non-static declaration
 
319
  static
 
320
#endif
 
321
  CTypeInfo *Duplicate (const CTypeInfo *);
 
322
  // Duplicate this.
 
323
  CTypeInfo *Duplicate () const;
 
324
 
 
325
  // Destroy the given type structure.
 
326
  static void Destroy (CTypeInfo *);
 
327
 
 
328
  void Mangled (ostream &) const;
 
329
 
 
330
private:
 
331
  void TypeText (char, ostream &, const char * = (const char*)0) const;
 
332
  void printName (char, ostream &, CObjectInfo *) const;
 
333
  void printScope (char, ostream &, CObjectInfo *) const;
 
334
};
 
335
 
 
336
extern CTypeInfo CTYPE_EMPTY;
 
337
 
 
338
} // namespace Puma
 
339
 
 
340
 
 
341
#include "Puma/CTypePrimitive.h"
 
342
#include "Puma/CTypeQualified.h"
 
343
#include "Puma/CTypeAddress.h"
 
344
#include "Puma/CTypeBitField.h"
 
345
#include "Puma/CTypeArray.h"
 
346
#include "Puma/CTypeVarArray.h"
 
347
#include "Puma/CTypePointer.h"
 
348
#include "Puma/CTypeMemberPointer.h"
 
349
#include "Puma/CTypeFunction.h"
 
350
#include "Puma/CTypeEnum.h"
 
351
#include "Puma/CTypeRecord.h"
 
352
#include "Puma/CTypeClass.h"
 
353
#include "Puma/CTypeUnion.h"
 
354
#include "Puma/CTypeTemplateParam.h"
 
355
 
 
356
 
 
357
namespace Puma {
 
358
 
 
359
inline CTypeInfo::CTypeInfo (CTypeInfo *info, CTypeInfo::TypeId id) :
 
360
  _Base (info ? info : this), 
 
361
  _Id (id),
 
362
  _TypedefInfo (0)
 
363
 {}
 
364
inline CTypeInfo::~CTypeInfo () 
 
365
 {}
 
366
 
 
367
inline CTypeInfo *CTypeInfo::Duplicate () const 
 
368
 { 
 
369
#ifndef __puma
 
370
return Duplicate (this);
 
371
#endif
 
372
 }
 
373
 
 
374
inline CTypeInfo::TypeId CTypeInfo::Id () const 
 
375
 { return _Id; }
 
376
 
 
377
inline bool CTypeInfo::operator !=(const CTypeInfo &type) const 
 
378
 { return ! (*this == type); }
 
379
 
 
380
inline void CTypeInfo::print (ostream& out) const 
 
381
 { TypeText ((char)PRINT_STD, out); }
 
382
inline void CTypeInfo::TypeText (ostream &out, const char *t, bool abs, bool tdef) const
 
383
 { char flags = (char)(abs ? PRINT_ABS : PRINT_STD);
 
384
   if (tdef) flags |= (char)PRINT_TDN; TypeText (flags, out, t); }
 
385
 
 
386
inline long int CTypeInfo::Dimension () const
 
387
 { return TypeArray () ? TypeArray ()->Dimension () : 
 
388
          TypeBitField () ? TypeBitField ()->Dimension () : -1; }
 
389
 
 
390
inline bool CTypeInfo::isTypedef () const
 
391
 { return (bool)_TypedefInfo; }
 
392
inline CObjectInfo *CTypeInfo::TypedefInfo () const
 
393
 { return _TypedefInfo; }
 
394
 
 
395
inline bool CTypeInfo::isConst () const
 
396
 { return TypeQualified () && TypeQualified ()->isConst (); }
 
397
inline bool CTypeInfo::isVolatile () const
 
398
 { return TypeQualified () && TypeQualified ()->isVolatile (); }
 
399
inline bool CTypeInfo::isRestrict () const
 
400
 { return TypeQualified () && TypeQualified ()->isRestrict (); }
 
401
  
 
402
inline CRecord *CTypeInfo::Record () const
 
403
 { return TypeRecord () ? TypeRecord ()->Record () :
 
404
          TypeFunction () ? TypeFunction ()->Record () :
 
405
          TypeMemberPointer () ? TypeMemberPointer ()->Record () : (CRecord*)0; }
 
406
inline CEnumInfo *CTypeInfo::EnumInfo () const
 
407
 { return TypeEnum () ? TypeEnum ()->EnumInfo () : (CEnumInfo*)0; }
 
408
inline CFunctionInfo *CTypeInfo::FunctionInfo () const
 
409
 { return TypeFunction () ? TypeFunction ()->FunctionInfo () : (CFunctionInfo*)0; }
 
410
 
 
411
inline CTypeInfo *CTypeInfo::BaseType () const
 
412
 { assert(_Base); return _Base; }
 
413
inline void CTypeInfo::BaseType (CTypeInfo *type)
 
414
 { _Base = type; }
 
415
inline CTypeInfo *CTypeInfo::PtrBaseType () const
 
416
 { return VirtualType ()->BaseType (); }
 
417
 
 
418
inline CTypeList *CTypeInfo::ArgTypes () const
 
419
 { return TypeFunction () ? TypeFunction ()->ArgTypes () :
 
420
          TypeQualified () ? TypeQualified ()->ArgTypes () : (CTypeList*)0; }
 
421
 
 
422
inline CTypePrimitive *CTypeInfo::TypePrimitive () const
 
423
 { return _Id < TYPE_CLASS ? (CTypePrimitive*)this : (CTypePrimitive*)0; }
 
424
inline CTypeQualified *CTypeInfo::TypeQualified () const
 
425
 { return _Id == TYPE_QUALIFIED ? (CTypeQualified*)this : (CTypeQualified*)0; }
 
426
inline CTypeFunction *CTypeInfo::TypeFunction () const
 
427
 { return _Id == TYPE_FUNCTION ? (CTypeFunction*)this : (CTypeFunction*)0; }
 
428
inline CTypeBitField *CTypeInfo::TypeBitField () const 
 
429
 { return _Id == TYPE_BIT_FIELD ? (CTypeBitField*)this : (CTypeBitField*)0; }
 
430
inline CTypePointer *CTypeInfo::TypePointer () const
 
431
 { return _Id == TYPE_POINTER || _Id == TYPE_MEMBER_POINTER ? (CTypePointer*)this : (CTypePointer*)0; }
 
432
inline CTypeMemberPointer* CTypeInfo::TypeMemberPointer () const
 
433
 { return _Id == TYPE_MEMBER_POINTER ? (CTypeMemberPointer*)this : (CTypeMemberPointer*)0; }
 
434
inline CTypeAddress *CTypeInfo::TypeAddress () const
 
435
 { return _Id == TYPE_ADDRESS ? (CTypeAddress*)this : (CTypeAddress*)0; }
 
436
inline CTypeArray *CTypeInfo::TypeArray () const
 
437
 { return _Id == TYPE_ARRAY || _Id == TYPE_VAR_ARRAY ? (CTypeArray*)this : (CTypeArray*)0; }
 
438
inline CTypeVarArray *CTypeInfo::TypeVarArray () const
 
439
 { return _Id == TYPE_VAR_ARRAY ? (CTypeVarArray*)this : (CTypeVarArray*)0; }
 
440
inline CTypeRecord *CTypeInfo::TypeRecord () const
 
441
 { return _Id == TYPE_CLASS || _Id == TYPE_UNION ? (CTypeRecord*)this : (CTypeRecord*)0; }
 
442
inline CTypeClass *CTypeInfo::TypeClass () const
 
443
 { return _Id == TYPE_CLASS ? (CTypeClass*)this : (CTypeClass*)0; }
 
444
inline CTypeUnion *CTypeInfo::TypeUnion () const
 
445
 { return _Id == TYPE_UNION ? (CTypeUnion*)this : (CTypeUnion*)0; }
 
446
inline CTypeEnum *CTypeInfo::TypeEnum () const
 
447
 { return _Id == TYPE_ENUM ? (CTypeEnum*)this : (CTypeEnum*)0; }
 
448
inline CTypeInfo *CTypeInfo::TypeEmpty () const
 
449
 { return _Id == TYPE_EMPTY ? (CTypeInfo*)this : (CTypeInfo*)0; }
 
450
inline CTypeTemplateParam *CTypeInfo::TypeTemplateParam () const
 
451
 { return _Id == TYPE_TEMPLATE_PARAM ? (CTypeTemplateParam*)this : (CTypeTemplateParam*)0; }
 
452
 
 
453
inline CTypeInfo *CTypeInfo::VirtualType () const 
 
454
 { return TypeQualified () || TypeBitField () || TypeAddress () ?
 
455
          BaseType ()->VirtualType () : (CTypeInfo*)this; }
 
456
inline CTypeInfo *CTypeInfo::UnqualType () const 
 
457
 { return TypeQualified () ? BaseType ()->UnqualType () : (CTypeInfo*)this; }
 
458
 
 
459
inline bool CTypeInfo::isQualified () const 
 
460
 { return TypeQualified (); }
 
461
inline bool CTypeInfo::isTemplateParam () const 
 
462
 { return VirtualType ()->TypeTemplateParam (); }
 
463
inline bool CTypeInfo::isPointer () const 
 
464
 { return VirtualType ()->TypePointer (); }
 
465
inline bool CTypeInfo::isMemberPointer () const
 
466
 { return VirtualType ()->TypeMemberPointer (); }
 
467
inline bool CTypeInfo::isClass () const
 
468
 { return VirtualType ()->TypeClass (); }
 
469
inline bool CTypeInfo::isUnion () const
 
470
 { return VirtualType ()->TypeUnion (); }
 
471
inline bool CTypeInfo::isArray () const
 
472
 { return VirtualType ()->TypeArray (); }
 
473
inline bool CTypeInfo::isFixedArray () const
 
474
 { return VirtualType ()->TypeArray () && 
 
475
          VirtualType ()->TypeArray ()->isFixed (); }
 
476
inline bool CTypeInfo::isVarArray () const
 
477
 { return VirtualType ()->TypeVarArray (); }
 
478
inline bool CTypeInfo::isEnum () const
 
479
 { return VirtualType ()->TypeEnum (); }
 
480
inline bool CTypeInfo::isFunction () const
 
481
 { return VirtualType ()->TypeFunction (); }
 
482
inline bool CTypeInfo::isBitField () const
 
483
 { return TypeBitField (); }
 
484
inline bool CTypeInfo::isUndefined () const
 
485
 { return VirtualType ()->is_undefined (); }
 
486
inline bool CTypeInfo::isInteger () const 
 
487
 { return VirtualType ()->_Id < TYPE_FLOAT || VirtualType ()->isEnum (); }
 
488
inline bool CTypeInfo::isReal () const 
 
489
 { CTypeInfo *base = VirtualType ();
 
490
   return base->is_float () || base->is_double () || base->is_long_double (); }
 
491
inline bool CTypeInfo::isMethod () const 
 
492
 { CTypeInfo *base = VirtualType ();
 
493
   return base->TypeFunction () && base->TypeFunction ()->Record (); }
 
494
inline bool CTypeInfo::isStdFunction () const
 
495
 { return VirtualType ()->TypeFunction () && ! isMethod (); }
 
496
inline bool CTypeInfo::isPointerOrArray () const 
 
497
 { CTypeInfo *base = VirtualType ();
 
498
   return base->TypePointer () || base->TypeArray (); }
 
499
inline bool CTypeInfo::isAddress () const 
 
500
 { return TypeAddress () || ((TypeQualified () || TypeBitField ()) && 
 
501
                             BaseType ()->isAddress ()); }
 
502
inline bool CTypeInfo::isRecord () const 
 
503
 { return VirtualType ()->TypeRecord (); }
 
504
inline bool CTypeInfo::isScalar () const 
 
505
 { return isArithmetic () || isPointer (); }
 
506
inline bool CTypeInfo::isAggregate () const 
 
507
 { return isArray () || isClass () || isUnion (); }
 
508
inline bool CTypeInfo::isVoid () const
 
509
 { return VirtualType ()->is_void (); }
 
510
inline bool CTypeInfo::isObject (unsigned long pos) const
 
511
 { return ! isFunction () && (pos ? isComplete (pos) : true); }
 
512
inline bool CTypeInfo::isTypeParam () const
 
513
 { return isTemplateParam () && 
 
514
          VirtualType ()->TypeTemplateParam ()->isType (); }
 
515
inline bool CTypeInfo::isNonTypeParam () const
 
516
 { return isTemplateParam () && 
 
517
          ! VirtualType ()->TypeTemplateParam ()->isType (); }
 
518
 
 
519
inline bool CTypeInfo::is_bool () const 
 
520
 { return _Id == TYPE_BOOL; }
 
521
inline bool CTypeInfo::is_char () const 
 
522
 { return _Id == TYPE_CHAR; }
 
523
inline bool CTypeInfo::is_wchar_t () const 
 
524
 { return _Id == TYPE_WCHAR_T; }
 
525
inline bool CTypeInfo::is_short () const 
 
526
 { return _Id == TYPE_SHORT; }
 
527
inline bool CTypeInfo::is_int () const 
 
528
 { return _Id == TYPE_INT; }
 
529
inline bool CTypeInfo::is_long () const 
 
530
 { return _Id == TYPE_LONG; }
 
531
inline bool CTypeInfo::is_long_long () const 
 
532
 { return _Id == TYPE_LONG_LONG; }
 
533
inline bool CTypeInfo::is_signed_char () const 
 
534
 { return _Id == TYPE_SIGNED_CHAR; }
 
535
inline bool CTypeInfo::is_unsigned_char () const 
 
536
 { return _Id == TYPE_UNSIGNED_CHAR; }
 
537
inline bool CTypeInfo::is_unsigned_short () const 
 
538
 { return _Id == TYPE_UNSIGNED_SHORT; }
 
539
inline bool CTypeInfo::is_unsigned_int () const 
 
540
 { return _Id == TYPE_UNSIGNED_INT; }
 
541
inline bool CTypeInfo::is_unsigned_long () const 
 
542
 { return _Id == TYPE_UNSIGNED_LONG; }
 
543
inline bool CTypeInfo::is_unsigned_long_long () const 
 
544
 { return _Id == TYPE_UNSIGNED_LONG_LONG; }
 
545
inline bool CTypeInfo::is_float () const 
 
546
 { return _Id == TYPE_FLOAT; }
 
547
inline bool CTypeInfo::is_double () const 
 
548
 { return _Id == TYPE_DOUBLE; }
 
549
inline bool CTypeInfo::is_long_double () const 
 
550
 { return _Id == TYPE_LONG_DOUBLE; }
 
551
inline bool CTypeInfo::is_void () const 
 
552
 { return _Id == TYPE_VOID; }
 
553
inline bool CTypeInfo::is_unknown_t () const 
 
554
 { return _Id == TYPE_UNKNOWN_T; }
 
555
inline bool CTypeInfo::is_undefined () const 
 
556
 { return _Id == TYPE_UNDEFINED; }
 
557
inline bool CTypeInfo::is_ellipsis () const 
 
558
 { return _Id == TYPE_ELLIPSIS; }
 
559
 
 
560
inline bool CTypeInfo::operator <=(const CTypeInfo &type) const
 
561
 { return ! (*this > type); }
 
562
inline bool CTypeInfo::operator >=(const CTypeInfo &type) const
 
563
 { return ! (*this < type); }
 
564
 
 
565
 
 
566
} // namespace Puma
 
567
 
 
568
#endif /* __CTypeInfo_h__ */
 
569
 
 
570
#line 571 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CTypeInfo.h"
 
571
 
 
572
#ifdef __ac_FIRST_FILE__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CTypeInfo_h__
 
573
/*** begin of aspect includes ***/
 
574
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinIfExists_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinIfExists_ah__)
 
575
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinIfExists_ah__
 
576
#include "WinIfExists.ah"
 
577
#endif
 
578
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinImportHandler_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinImportHandler_ah__)
 
579
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinImportHandler_ah__
 
580
#include "WinImportHandler.ah"
 
581
#endif
 
582
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMacros_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMacros_ah__)
 
583
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMacros_ah__
 
584
#include "WinMacros.ah"
 
585
#endif
 
586
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CMatchSyntax_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CMatchSyntax_ah__)
 
587
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
 
588
#include "CMatchSyntax.ah"
 
589
#endif
 
590
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtGnu_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtGnu_ah__)
 
591
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtGnu_ah__
 
592
#include "ExtGnu.ah"
 
593
#endif
 
594
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtAC_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtAC_ah__)
 
595
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtAC_ah__
 
596
#include "ExtAC.ah"
 
597
#endif
 
598
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtACTree_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtACTree_ah__)
 
599
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtACTree_ah__
 
600
#include "ExtACTree.ah"
 
601
#endif
 
602
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_TraceSyntax_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_TraceSyntax_ah__)
 
603
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_TraceSyntax_ah__
 
604
#include "TraceSyntax.ah"
 
605
#endif
 
606
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinAsm_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinAsm_ah__)
 
607
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinAsm_ah__
 
608
#include "WinAsm.ah"
 
609
#endif
 
610
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinDeclSpecs_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinDeclSpecs_ah__)
 
611
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinDeclSpecs_ah__
 
612
#include "WinDeclSpecs.ah"
 
613
#endif
 
614
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMemberExplSpec_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMemberExplSpec_ah__)
 
615
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMemberExplSpec_ah__
 
616
#include "WinMemberExplSpec.ah"
 
617
#endif
 
618
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinTypeKeywords_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinTypeKeywords_ah__)
 
619
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinTypeKeywords_ah__
 
620
#include "WinTypeKeywords.ah"
 
621
#endif
 
622
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__)
 
623
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
 
624
#include "PragmaOnceUnitState.ah"
 
625
#endif
 
626
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnce_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnce_ah__)
 
627
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnce_ah__
 
628
#include "PragmaOnce.ah"
 
629
#endif
 
630
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CCExprResolve_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CCExprResolve_ah__)
 
631
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CCExprResolve_ah__
 
632
#include "CCExprResolve.ah"
 
633
#endif
 
634
#if !defined(__ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CExprResolve_ah__) && defined(__ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CExprResolve_ah__)
 
635
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CExprResolve_ah__
 
636
#include "CExprResolve.ah"
 
637
#endif
 
638
/*** end of aspect includes ***/
 
639
#undef __ac_FIRST__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1__
 
640
#undef __ac_FIRST_FILE__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CTypeInfo_h__
 
641
#endif // __ac_FIRST_FILE__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CTypeInfo_h__