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_CCNameLookup_h__
8
typedef const char* Type;
9
enum JPType { CALL = 0x0004, EXECUTION = 0x0008, CONSTRUCTION = 0x0010, DESTRUCTION = 0x0020 };
11
void **_args; void *_result; void *_target; void *_that; void *_fptr;
12
void (*_wrapper)(Action &);
13
inline void trigger () { _wrapper (*this); }
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; }
21
template <class Aspect, int Index>
23
static int &instance () {
24
static int counter = 0;
27
CFlow () { instance ()++; }
28
~CFlow () { instance ()--; }
29
static bool active () { return instance () > 0; }
32
inline void * operator new (__SIZE_TYPE__, AC::AnyResultBuffer *p) { return p; }
33
inline void operator delete (void *, AC::AnyResultBuffer *) { } // for VC++
35
#endif // __ac_FIRST__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1__
37
#line 1 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CCNameLookup.h"
39
#line 40 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CCNameLookup.h"
41
#ifndef __ac_fwd_ExtGnu__
42
#define __ac_fwd_ExtGnu__
45
template <class JoinPoint, class Binding>
46
inline void invoke_ExtGnu_ExtGnu_a0_after (JoinPoint *tjp);
47
template <class JoinPoint, class Binding>
48
inline void invoke_ExtGnu_ExtGnu_a1_around (JoinPoint *tjp);
49
template <class JoinPoint>
50
inline void invoke_ExtGnu_ExtGnu_a2_after (JoinPoint *tjp);
51
template <class JoinPoint>
52
inline void invoke_ExtGnu_ExtGnu_a3_around (JoinPoint *tjp);
53
template <class JoinPoint>
54
inline void invoke_ExtGnu_ExtGnu_a4_after (JoinPoint *tjp);
55
template <class JoinPoint>
56
inline void invoke_ExtGnu_ExtGnu_a5_after (JoinPoint *tjp);
57
template <class JoinPoint>
58
inline void invoke_ExtGnu_ExtGnu_a6_after (JoinPoint *tjp);
59
template <class JoinPoint>
60
inline void invoke_ExtGnu_ExtGnu_a7_after (JoinPoint *tjp);
61
template <class JoinPoint, class Binding>
62
inline void invoke_ExtGnu_ExtGnu_a8_before (JoinPoint *tjp);
63
template <class JoinPoint, class Binding>
64
inline void invoke_ExtGnu_ExtGnu_a9_after (JoinPoint *tjp);
65
template <class JoinPoint, class Binding>
66
inline void invoke_ExtGnu_ExtGnu_a10_after (JoinPoint *tjp);
67
template <class JoinPoint, class Binding>
68
inline void invoke_ExtGnu_ExtGnu_a11_after (JoinPoint *tjp);
69
template <class JoinPoint, class Binding>
70
inline void invoke_ExtGnu_ExtGnu_a12_after (JoinPoint *tjp);
71
template <class JoinPoint, class Binding>
72
inline void invoke_ExtGnu_ExtGnu_a13_after (JoinPoint *tjp);
73
template <class JoinPoint>
74
inline void invoke_ExtGnu_ExtGnu_a14_before (JoinPoint *tjp);
75
template <class JoinPoint, class Binding>
76
inline void invoke_ExtGnu_ExtGnu_a15_before (JoinPoint *tjp);
80
#ifndef __ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtGnu_ah__
81
#define __ac_need__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtGnu_ah__
83
#ifndef __ac_guard__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CCNameLookup_h__
84
#define __ac_guard__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CCNameLookup_h__
86
#line 1 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CCNameLookup.h"
87
// This file is part of PUMA.
88
// Copyright (C) 1999-2003 The PUMA developer team.
90
// This program is free software; you can redistribute it and/or
91
// modify it under the terms of the GNU General Public License as
92
// published by the Free Software Foundation; either version 2 of
93
// the License, or (at your option) any later version.
95
// This program is distributed in the hope that it will be useful,
96
// but WITHOUT ANY WARRANTY; without even the implied warranty of
97
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98
// GNU General Public License for more details.
100
// You should have received a copy of the GNU General Public
101
// License along with this program; if not, write to the Free
102
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
105
#ifndef __CCNameLookup_h__
106
#define __CCNameLookup_h__
108
#include "Puma/Array.h"
109
#include "Puma/ErrorSink.h"
110
#include "Puma/DString.h"
111
#include "Puma/CStructure.h"
119
class CBaseClassInfo;
122
#line 123 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CCNameLookup.h"
125
class WinImportHandler;
133
class WinMemberExplSpec;
134
class WinTypeKeywords;
135
class PragmaOnceUnitState;
141
#line 35 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CCNameLookup.h"
143
#line 144 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CCNameLookup.h"
144
friend class ::WinIfExists;
145
friend class ::WinImportHandler;
146
friend class ::WinMacros;
147
friend class ::CMatchSyntax;
148
friend class ::ExtGnu;
149
friend class ::ExtAC;
150
friend class ::ExtACTree;
151
friend class ::WinAsm;
152
friend class ::WinDeclSpecs;
153
friend class ::WinMemberExplSpec;
154
friend class ::WinTypeKeywords;
155
friend class ::PragmaOnceUnitState;
156
friend class ::PragmaOnce;
157
friend class ::CCExprResolve;
158
friend class ::CExprResolve;
160
#line 35 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CCNameLookup.h"
162
typedef std::map<CClassInfo*, bool> BaseClassMap;
164
Array<CObjectInfo*> objects;
165
Array<CObjectInfo*> namespaces;
166
BaseClassMap baseclasses;
167
CClassInfo* virtualbase;
168
Array<CClassInfo*> virtualbases;
169
Array<CStructure*> objscopes;
170
CT_SimpleName * sname;
177
typedef CStructure::ObjectsByName::iterator ObjectsIter;
178
typedef CStructure::ObjectInfoList::reverse_iterator ObjectListRIter;
183
IS_TYPE = 1, // lookup a type name ignoring all non-types
184
IS_NAMESPACE = 2, // lookup a namespace name ignoring everything else
185
ASS_NS_LOOKUP = 4, // lookup in associated namespace (overload resolution)
191
CCNameLookup (ErrorSink &);
193
// usage: lookup(name, scope, nested, base classes & usings)
194
void lookup (const DString&, CStructure *, bool = false, bool = false, int = 0);
195
void lookup (CT_SimpleName *, CStructure *, bool = false, bool = false);
196
void lookupType (const DString&, CStructure *, bool = false, bool = false, int = 0);
197
void lookupType (CT_SimpleName *, CStructure *, bool = false, bool = false);
198
void lookupNamespace (const DString&, CStructure *, int = 0);
199
void lookupNamespace (CT_SimpleName *, CStructure *);
200
void lookupInAssNs (const DString&, CStructure *, int = 0);
201
void lookupInAssNs (CT_SimpleName *, CStructure *);
202
void lookupOpName (const DString&, CStructure *, int = 0);
203
void lookupOpName (CT_SimpleName *, CStructure *);
204
void lookupFunction (const DString&, CStructure *, int = 0);
205
void lookupFunction (CT_SimpleName *, CStructure *);
207
// resulting set of object infos
208
unsigned Objects () const;
209
CObjectInfo *Object (unsigned = 0) const;
211
// reset the internal state and reject
212
// the result of previous lookups
217
#line 218 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CCNameLookup.h"
218
public: inline void __exec_old_lookup(Puma::CStructure *,bool,bool);
221
#line 90 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CCNameLookup.h"
222
void lookup (CStructure *, bool, bool);
223
void unqualifiedLookup (CStructure *, bool);
224
CObjectInfo *unqualLookup (CStructure *, bool);
225
void unqualTypeLookup (CStructure *);
226
void lookupUsings (CStructure *);
227
bool namespaceVisited (CObjectInfo *);
228
void addObject (CObjectInfo *, CStructure *);
229
bool visibleFriend (CObjectInfo *) const;
230
bool knownHere (CObjectInfo *) const;
231
CStructure *getNameScope (CT_SimpleName *, CStructure *) const;
232
bool isDistinctSubObject (CBaseClassInfo *bcinfo);
233
void findMostDominant (unsigned long num);
234
bool dominates (CObjectInfo *cand1, CObjectInfo *cand2);
235
bool isSameSubObject (CClassInfo *ci, CClassInfo *bc1);
238
inline unsigned CCNameLookup::Objects () const
239
{ return objects.length (); }
240
inline CObjectInfo *CCNameLookup::Object (unsigned i) const
241
{ return objects.lookup (i); }
243
inline void CCNameLookup::addObject (CObjectInfo *info, CStructure *scope)
244
{ objects.append (info); virtualbases.append (virtualbase);
245
objscopes.append (scope); }
246
inline void CCNameLookup::reset ()
247
{ objects.reset (); namespaces.reset (); baseclasses.clear (); objscopes.reset ();
248
virtualbase = 0; virtualbases.reset (); flags = 0; }
250
inline void CCNameLookup::lookup (const DString& sn, CStructure *scope,
251
bool nested, bool base_usings, int p)
252
{ name = sn; pos = p; lookup (scope, nested, base_usings); flags = 0; }
254
inline void CCNameLookup::lookupType (const DString& sn,
255
CStructure *scope, bool nested, bool base_usings, int p)
256
{ flags = IS_TYPE; lookup (sn, scope, nested, base_usings, p); }
258
inline void CCNameLookup::lookupType (CT_SimpleName *sn,
259
CStructure *scope, bool nested, bool base_usings)
260
{ flags = IS_TYPE; lookup (sn, scope, nested, base_usings); }
262
inline void CCNameLookup::lookupNamespace (const DString& sn,
263
CStructure *scope, int p)
264
{ flags = IS_NAMESPACE; lookup (sn, scope, true, true, p); }
266
inline void CCNameLookup::lookupNamespace (CT_SimpleName *sn,
268
{ flags = IS_NAMESPACE; lookup (sn, scope, true, true); }
270
inline void CCNameLookup::lookupFunction (const DString& sn,
271
CStructure *scope, int p)
272
{ flags = NO_MEMBER_ALIAS; lookup (sn, scope, false, false, p); }
274
inline void CCNameLookup::lookupFunction (CT_SimpleName *sn,
276
{ flags = NO_MEMBER_ALIAS; lookup (sn, scope, false, false); }
278
inline void CCNameLookup::lookupInAssNs (const DString& sn,
279
CStructure *scope, int p)
280
{ flags = ASS_NS_LOOKUP; lookup (sn, scope, false, false, p); }
282
inline void CCNameLookup::lookupInAssNs (CT_SimpleName *sn,
284
{ flags = ASS_NS_LOOKUP; lookup (sn, scope, false, false); }
286
inline void CCNameLookup::lookupOpName (const DString& sn,
287
CStructure *scope, int p)
288
{ flags = NO_MEMBER_FCTS; lookup (sn, scope, true, true, p); }
290
inline void CCNameLookup::lookupOpName (CT_SimpleName *sn,
292
{ flags = NO_MEMBER_FCTS; lookup (sn, scope, true, true); }
297
#endif /* __CCNameLookup_h__ */
299
#line 300 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CCNameLookup.h"
300
#endif // __ac_guard__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CCNameLookup_h__
302
#line 165 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step1/inc/Puma/CCNameLookup.h"
304
#line 305 "/home/inf4/spinczyk/ac-woven-1.0pre2/Puma/gen-release/step2/inc/Puma/CCNameLookup.h"
306
#ifdef __ac_FIRST_FILE__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CCNameLookup_h__
307
/*** begin of aspect includes ***/
308
#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__)
309
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinIfExists_ah__
310
#include "WinIfExists.ah"
312
#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__)
313
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinImportHandler_ah__
314
#include "WinImportHandler.ah"
316
#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__)
317
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMacros_ah__
318
#include "WinMacros.ah"
320
#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__)
321
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CMatchSyntax_ah__
322
#include "CMatchSyntax.ah"
324
#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__)
325
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtGnu_ah__
328
#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__)
329
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtAC_ah__
332
#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__)
333
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_ExtACTree_ah__
334
#include "ExtACTree.ah"
336
#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__)
337
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_TraceSyntax_ah__
338
#include "TraceSyntax.ah"
340
#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__)
341
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinAsm_ah__
344
#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__)
345
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinDeclSpecs_ah__
346
#include "WinDeclSpecs.ah"
348
#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__)
349
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinMemberExplSpec_ah__
350
#include "WinMemberExplSpec.ah"
352
#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__)
353
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_WinTypeKeywords_ah__
354
#include "WinTypeKeywords.ah"
356
#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__)
357
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnceUnitState_ah__
358
#include "PragmaOnceUnitState.ah"
360
#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__)
361
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_PragmaOnce_ah__
362
#include "PragmaOnce.ah"
364
#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__)
365
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CCExprResolve_ah__
366
#include "CCExprResolve.ah"
368
#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__)
369
#define __ac_have__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_aspects_CExprResolve_ah__
370
#include "CExprResolve.ah"
372
/*** end of aspect includes ***/
373
#undef __ac_FIRST__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1__
374
#undef __ac_FIRST_FILE__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CCNameLookup_h__
375
#endif // __ac_FIRST_FILE__home_inf4_spinczyk_ac45woven451_0pre2_Puma_gen45release_step1_inc_Puma_CCNameLookup_h__