This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 package IR.Flat;
2 import IR.*;
3
4 public class TempDescriptor extends Descriptor {
5     static int currentid=0;
6     int id;
7     //    String safename;
8     TypeDescriptor type;
9     TagDescriptor tag;
10
11     public TempDescriptor(String name) {
12         super(name);
13         id=currentid++;
14     }
15
16     public TempDescriptor(String name, TypeDescriptor td) {
17         this(name);
18         type=td;
19     }
20
21     public TempDescriptor(String name, TypeDescriptor type, TagDescriptor td) {
22         this(name);
23         this.type=type;
24         tag=td;
25     }
26     
27     public static TempDescriptor tempFactory() {
28         return new TempDescriptor("temp_"+currentid);
29     }
30
31     public static TempDescriptor tempFactory(String name) {
32         return new TempDescriptor(name+currentid);
33     }
34
35     public static TempDescriptor tempFactory(String name, TypeDescriptor td) {
36         return new TempDescriptor(name+currentid,td);
37     }
38
39     public static TempDescriptor tempFactory(String name, TypeDescriptor type, TagDescriptor tag) {
40         return new TempDescriptor(name+currentid,type,tag);
41     }
42
43     public static TempDescriptor paramtempFactory(String name, TypeDescriptor td) {
44         return new TempDescriptor(name,td);
45     }
46
47     public static TempDescriptor paramtempFactory(String name, TypeDescriptor tagtype, TagDescriptor tag) {
48         return new TempDescriptor(name, tagtype, tag);
49     }
50
51     public String toString() {
52         return safename;
53     }
54
55     public void setType(TypeDescriptor td) {
56         type=td;
57     }
58
59     public TypeDescriptor getType() {
60         return type;
61     }
62
63     public TagDescriptor getTag() {
64         return tag;
65     }
66
67     public void setTag(TagDescriptor tag) {
68         this.tag=tag;
69     }
70 }