~ubuntu-branches/ubuntu/wily/aspectc++/wily

« back to all changes in this revision

Viewing changes to Puma/src/parser/ccparser/CCNameLookup.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-06-15 10:17:02 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090615101702-qsr30iptwbxylmo2
Tags: 1.0pre4~svn.20090615-1
* New upstream release.
* don't ignore errors in the postrm script
* avoid spurious creation of empty dir ./usr/sbin/
* improve short descriptions of libpuma-doc and libpuma-dev
* bump Standards-Version to 3.8.1
* bump debhelper compat level to level 7 (latest in stable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
  ErrorSink &         err;
47
47
  unsigned int        pos;
48
48
  unsigned char       flags;
 
49
  CStructure*         current_scope;
 
50
  bool                allow_instantiate;
49
51
  
50
52
#ifndef __puma
51
53
  typedef CStructure::ObjectsByName::iterator          ObjectsIter;
62
64
  };
63
65
 
64
66
public:
65
 
  CCNameLookup (ErrorSink &);
 
67
  CCNameLookup (ErrorSink &, CStructure* curr_scope = 0, bool allow_inst = true);
66
68
  
67
69
  // usage: lookup(name, scope, nested, base classes & usings)
68
70
  void lookup (const DString&, CStructure *, bool = false, bool = false, int = 0);
84
86
  
85
87
  // reset the internal state and reject 
86
88
  // the result of previous lookups
87
 
  void reset ();
 
89
  void reset (CStructure* curr_scope = 0, bool allow_inst = true);
88
90
 
89
91
private: 
90
92
  void lookup (CStructure *, bool, bool);
94
96
  void lookupUsings (CStructure *);
95
97
  bool namespaceVisited (CObjectInfo *);
96
98
  void addObject (CObjectInfo *, CStructure *);
97
 
  bool visibleFriend (CObjectInfo *) const;
 
99
  bool invisibleFriend (CObjectInfo *) const;
98
100
  bool knownHere (CObjectInfo *) const;
99
101
  CStructure *getNameScope (CT_SimpleName *, CStructure *) const;
 
102
  CStructure *getNonTemplateScope (CStructure* scope) const;
100
103
  bool isDistinctSubObject (CBaseClassInfo *bcinfo);
101
104
  void findMostDominant (unsigned long num);
102
105
  bool dominates (CObjectInfo *cand1, CObjectInfo *cand2);
111
114
inline void CCNameLookup::addObject (CObjectInfo *info, CStructure *scope) 
112
115
 { objects.append (info); virtualbases.append (virtualbase); 
113
116
   objscopes.append (scope); }
114
 
inline void CCNameLookup::reset ()
 
117
inline void CCNameLookup::reset (CStructure* curr_scope, bool allow_inst)
115
118
 { objects.reset (); namespaces.reset (); baseclasses.clear (); objscopes.reset ();
116
 
   virtualbase = 0; virtualbases.reset (); flags = 0; }
 
119
   virtualbase = 0; virtualbases.reset (); flags = 0; 
 
120
   current_scope = curr_scope; allow_instantiate = allow_inst; }
117
121
 
118
122
inline void CCNameLookup::lookup (const DString& sn, CStructure *scope,
119
123
 bool nested, bool base_usings, int p)