49
typedef set<AspectInfo> AspectContainer;
50
Array<AdviceCode*> _advice_codes;
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;
65
Plan (ErrorSink &e) : _err (e) {}
67
Plan (ErrorStream &e, JoinPointModel &jpm);
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; }
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);
86
// calculate the order for a single join points
87
void order (JoinPointLoc *jpl);
89
// calculate the order for all join points
92
// check the plan for a specific join point
93
void check (JoinPointLoc *jpl);
82
95
// check the final plan -> messages to the error sink
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);
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 {