~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to AspectC++/PointCutExpr.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:
19
19
#ifndef __PointCutExpr_h__
20
20
#define __PointCutExpr_h__
21
21
 
22
 
#include "Puma/DString.h"
23
22
#include "Puma/Array.h"
24
 
#include "Puma/Filter.h"
25
23
using namespace Puma;
26
24
 
27
25
#include "Condition.h"
28
26
#include "PointCut.h"
29
27
#include "MatchExpr.h"
 
28
#include "JoinPointLoc.h"
30
29
 
31
30
class PointCutContext;
32
 
class JoinPointLoc;
33
31
class Binding;
34
32
 
35
33
namespace Puma {
36
 
  class CClassInfo;
37
34
  class CFunctionInfo;
38
35
  class CArgumentInfo;
39
36
  class CTypeInfo;
55
52
 
56
53
protected:
57
54
 
 
55
  JoinPointLoc::join_point_type _possible_types;
 
56
 
58
57
  // do a semantic analysis of the child nodes
59
58
  void sem_args (ErrorStream &err, PointCutContext &context);
60
59
 
82
81
  // does not check any argument types etc. -> semantics!
83
82
  virtual PCE_Type type () const = 0;
84
83
 
 
84
  // return a bit mask of join point types that could match; others can't!
 
85
  int possible_types () const { return (int)_possible_types; }
 
86
 
85
87
  // run a semantic analysis (e.g. check types)
86
88
  virtual void semantics (ErrorStream &err, PointCutContext &context) = 0;
87
89
 
98
100
  PointCutExpr *_arg;
99
101
public:
100
102
  PCE_SingleArg (PointCutExpr *arg) : _arg (arg) {}
 
103
 
101
104
  virtual int args () const { return 1; }
102
105
  virtual PointCutExpr *arg (int i) const { return (i == 0) ? _arg : 0; }
103
 
  bool check_derived (CClassInfo *cls, CFunctionInfo *func, 
104
 
                      PointCutContext &context, Binding &binding, Condition &cond);
105
 
  bool check_base (CClassInfo *cls, CFunctionInfo *func, 
106
 
                   PointCutContext &context, Binding &binding, Condition &cond);
 
106
 
 
107
  bool check_derived_class (JPL_Class &cls,
 
108
    PointCutContext &context, Binding &binding, Condition &cond);
 
109
  bool check_derived_func (JPL_Class &cls, JPL_Function &func, 
 
110
    PointCutContext &context, Binding &binding, Condition &cond);
 
111
  bool check_base_class (JPL_Class &cls, PointCutContext &context,
 
112
    Binding &binding, Condition &cond);
 
113
  bool check_base_func (JPL_Class &cls, JPL_Function &func, 
 
114
    PointCutContext &context, Binding &binding, Condition &cond);
 
115
  bool check_scopes (JPL_Name *scope,
 
116
    PointCutContext &context, Binding &binding, Condition &cond);
 
117
       
107
118
  virtual void mangle_type_check (ostream &out) {
108
119
    out << 1;
109
120
    _arg->mangle_type_check (out);
389
400
 
390
401
class PCE_Match : public PointCutExpr {
391
402
  MatchExpr _match_expr;
392
 
  Filter _filter;
393
 
  DString _dstr;
 
403
  string _str;
394
404
public:
395
 
  PCE_Match (const char *str) : _filter (str), _dstr (str) {}
 
405
  PCE_Match (const char *str) : _str (str) {}
396
406
  virtual ~PCE_Match () {}
397
407
  virtual int args () const { return 0; }
398
408
  virtual PointCutExpr *arg (int) const { return 0; }