~ubuntu-branches/ubuntu/quantal/aspectc++/quantal

« back to all changes in this revision

Viewing changes to AspectC++/TrackerDog.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
  class CFunctionInfo;
31
31
} // namespace Puma
32
32
 
33
 
class JoinPointLocList;
 
33
class ModelBuilder;
34
34
 
35
35
class TrackerDog : public CVisitor {
36
36
  CTranslationUnit &_tunit;
37
 
  JoinPointLocList &_world;
 
37
  ModelBuilder &_jpm;
38
38
  CT_BinaryExpr *assignment;
39
39
  CT_InitDeclarator *last_init_declarator;
40
40
  Stack<CFunctionInfo*> func_stack;
41
41
  bool in_memb_init;
42
42
  int local_id;
43
43
 
44
 
  void pseudo_jps (JoinPointLocList &jpll);
45
44
  CClassDatabase &db () { return _tunit.db (); }
46
45
 
47
46
  virtual void pre_visit (CTree *node);
49
48
 
50
49
  void pre_PointcutDecl (CT_PointcutDecl *node);
51
50
  void pre_AdviceDecl (CT_AdviceDecl *node);
52
 
  void pre_CallExpr (CT_CallExpr *node);
 
51
  void pre_Call (CT_Call *node);
53
52
  void pre_FctDef (CT_FctDef *node);
54
53
  void post_FctDef (CT_FctDef *node);
55
 
/*       void pre_MemPtrExpr (CpppAst_MemPtrExpr *node); */
56
 
/*       void pre_MemRefExpr (CpppAst_MemRefExpr *node); */
57
 
/*       void pre_SimpleName (CpppAst_SimpleName *node); */
58
 
/*       void pre_QualName (CpppAst_QualName *node); */
59
 
/*       void pre_RootQualName (CpppAst_RootQualName *node); */
60
 
void pre_InitDeclarator (CT_InitDeclarator *node);
61
 
void post_InitDeclarator (CT_InitDeclarator *node);
62
 
 
63
 
/*       bool get_or_set (CpppAstInfo *node, CpppAst_SimpleName *field); */
64
 
/*       TN_AttributeInfo *attribute (CpppAst_SimpleName *name); */
65
 
/*       void dump_node (CpppAstInfo *node); */
66
 
 
 
54
  void pre_InitDeclarator (CT_InitDeclarator *node);
 
55
  void post_InitDeclarator (CT_InitDeclarator *node);
 
56
  void pre_MembPtrExpr (CT_MembPtrExpr *node);
 
57
  void pre_SimpleName (CT_SimpleName *node);
 
58
  void pre_NamespaceDef (CT_NamespaceDef *node);
 
59
  void pre_ClassDef (CT_ClassDef *node);
 
60
  void post_ClassDef (CT_ClassDef *node);
 
61
  bool register_access (CObjectInfo *obj, CTree *node);
 
62
  
67
63
public:
68
64
  
69
 
  TrackerDog (CTranslationUnit &tunit, JoinPointLocList &jpll): 
70
 
    _tunit (tunit), _world (jpll), assignment (0), last_init_declarator (0),
 
65
  TrackerDog (CTranslationUnit &tunit, ModelBuilder &jpm): 
 
66
    _tunit (tunit), _jpm (jpm), assignment (0), last_init_declarator (0),
71
67
    in_memb_init (false) {
72
68
    func_stack.push ((CFunctionInfo*)0);
73
69
  }
74
70
  virtual ~TrackerDog() {}
75
71
 
76
72
  // search all code join points
77
 
  void run () {
78
 
    // first insert pseudo joinpoints into the joinpoint location list
79
 
    pseudo_jps (_world);
80
 
    // now find real joinpoints
81
 
    visit (_tunit.tree ());
82
 
  }
 
73
  void run () { visit (_tunit.tree ()); }
 
74
  void run (CTree *tree) { visit (tree); }
83
75
    
84
76
  // check if a function should be considered by ac++
85
77
  static CFunctionInfo *filter_func (CFunctionInfo* fi);