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

« back to all changes in this revision

Viewing changes to AspectC++/Plan.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:
20
20
#define __Plan_h_
21
21
 
22
22
#include <string>
 
23
#include <set>
23
24
using namespace std;
24
25
 
25
26
#include "JoinPointLoc.h"
28
29
#include "Puma/Array.h"
29
30
using namespace Puma;
30
31
 
31
 
class AdviceCode;
32
32
class AdviceInfo;
 
33
class OrderInfo;
33
34
class IntroductionInfo;
34
 
class OrderInfo;
35
35
class AspectInfo;
36
 
class JoinPointLoc;
37
36
class CFlow;
 
37
class JoinPointModel;
38
38
 
39
39
namespace Puma {
40
40
  class ACAspectInfo;
45
45
 
46
46
 
47
47
class Plan {
 
48
public:
 
49
  typedef set<AspectInfo> AspectContainer;
48
50
 
49
 
  ErrorSink &_err;
50
 
  Array<AdviceCode*> _advice_codes;
 
51
  ErrorStream &_err;
 
52
  JoinPointModel &_jpm;
51
53
  Array<AdviceInfo*> _advice_infos;
52
 
  Array<OrderInfo*> _order_infos;
53
 
  Array<AspectInfo*> _aspect_infos;
54
 
  Array<IntroductionInfo*> _introduction_infos;
 
54
  list<IntroductionInfo*>  _introduction_infos;
 
55
  list<OrderInfo*>  _order_infos;
 
56
  set<AspectInfo> _aspect_infos;
55
57
  Array<JoinPointLoc*> _exec_jpls;
56
58
  Array<JoinPointLoc*> _call_jpls;
57
59
  Array<JoinPointLoc*> _cons_jpls;
62
64
    
63
65
public:
64
66
  
65
 
  Plan (ErrorSink &e) : _err (e) {}
 
67
  Plan (ErrorStream &e, JoinPointModel &jpm);
66
68
  ~Plan ();
67
69
 
68
70
  // manage advice and aspect ressources
69
 
  AspectInfo *addAspect (ACAspectInfo *ai);
70
 
  AspectInfo *getAspect (ACAspectInfo *ai) const;
71
 
  AdviceCode *addAdviceCode (CT_AdviceDecl *ad);
 
71
  AspectInfo *addAspect (JPL_Aspect &);
 
72
  AspectContainer &aspect_infos () { return _aspect_infos; }
 
73
  AdviceInfo *addAdvice (AspectInfo &ai, JPL_AdviceCode &code);
 
74
  IntroductionInfo *addIntroduction (JPL_Aspect &jpl_aspect, JPL_Introduction &intro);
72
75
  AdviceInfo *addAdvice (AspectInfo *ai, CT_AdviceDecl *ad);
73
 
  IntroductionInfo *addIntroduction (AspectInfo *ai, ACIntroductionInfo *acii);
74
 
  OrderInfo *addOrder (AspectInfo *ai, CT_AdviceDecl *ad);
 
76
  OrderInfo *addOrder (JPL_Aspect &a, JPL_Order &o);
 
77
  const list<OrderInfo*> &order_infos () const { return _order_infos; }
 
78
  const list<IntroductionInfo*> &introduction_infos () const { return _introduction_infos; }
75
79
  
76
80
  // consider a join point and advice/intro in the plan
77
81
  void consider (JoinPointLoc *jpl, const Condition &cond, AdviceInfo *ai);
78
 
  void consider (JoinPointLoc *jpl, IntroductionInfo *ii);
79
 
  void consider (JoinPointLoc *jpl, ACAspectInfo&, ACAspectInfo&);
 
82
  JPP_Class *consider (JoinPointLoc *jpl, JPL_Introduction *intro);
 
83
  void consider (JoinPointLoc *jpl, JPL_Aspect&, JPL_Aspect&);
80
84
  void consider (JoinPointLoc *jpl, const CFlow& cflow);
81
85
 
 
86
  // calculate the order for a single join points
 
87
  void order (JoinPointLoc *jpl);
 
88
  
 
89
  // calculate the order for all join points
 
90
  void order ();
 
91
  
 
92
  // check the plan for a specific join point
 
93
  void check (JoinPointLoc *jpl);
 
94
 
82
95
  // check the final plan -> messages to the error sink
83
96
  void check ();
84
97
 
85
 
  // read the lists of managed ressources
86
 
  int intros () const { return _introduction_infos.length (); }
87
 
  IntroductionInfo *intro (int i) const {
88
 
    return _introduction_infos.lookup (i);
89
 
  }
90
 
 
91
98
  // read the accumulated plans
92
99
  int exec_jp_plans () const { return _exec_jpls.length (); }
93
100
  JPL_Method &exec_jp_loc (int i) const {
139
146
};
140
147
 
141
148
#endif // __Plan_h__
142
 
 
143