This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 package IR.Tree;
2
3 import IR.*;
4 import java.util.*;
5
6 public class FlagEffects {
7   Vector effects;
8   Vector tageffects;
9   String name;
10   VarDescriptor vd;
11
12   public FlagEffects(String name) {
13     effects=new Vector();
14     tageffects=new Vector();
15     this.name=name;
16   }
17
18   public void setVar(VarDescriptor vd) {
19     this.vd=vd;
20   }
21
22   public VarDescriptor getVar() {
23     return vd;
24   }
25
26   public String getName() {
27     return name;
28   }
29
30   public void addEffect(FlagEffect fe) {
31     effects.add(fe);
32   }
33
34   public void addTagEffect(TagEffect te) {
35     tageffects.add(te);
36   }
37
38   public int numTagEffects() {
39     return tageffects.size();
40   }
41
42   public TagEffect getTagEffect(int i) {
43     return (TagEffect) tageffects.get(i);
44   }
45
46   public int numEffects() {
47     return effects.size();
48   }
49
50   public FlagEffect getEffect(int i) {
51     return (FlagEffect) effects.get(i);
52   }
53
54   public String printNode(int indent) {
55     String st=name+"(";
56     for(int i=0; i<effects.size(); i++) {
57       FlagEffect fe=(FlagEffect)effects.get(i);
58       st+=fe.printNode(0);
59       if ((i+1)!=effects.size())
60         st+=",";
61     }
62     return st+")";
63   }
64 }