import java.util.*;
import Util.GraphNode;
-public class EGTaskNode extends TaskNode {
+public class EGTaskNode extends GraphNode {
private boolean source=false;
- private int loopmarker=0;
- private boolean tomention=true;
private FlagState fs;
private FlagState postfs;
private TaskDescriptor td;
private int index;
+ private String name;
+ private int uid;
+ private static int nodeid;
public EGTaskNode(String name, TaskDescriptor td, FlagState postfs){
this(name, null, td, -1, postfs);
}
public EGTaskNode(String name, FlagState fs, TaskDescriptor td, int index, FlagState postfs){
- super(name);
+ this.name=name;
+ this.uid=nodeid++;
this.fs = fs;
this.td = td;
this.index=index;
this.postfs=postfs;
}
+
+ public String getTextLabel() {
+ return "Task "+getName()+"["+fs+"]->["+postfs+"]";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getLabel() {
+ return "N"+uid;
+ }
public int getIndex() {
return index;
}
+ public String toString() {
+ return getTextLabel();
+ }
+
public FlagState getPostFS() {
return postfs;
}
return uid;
}
- public void doSelfLoopMarking(){
- loopmarker=1;
- }
-
- public void doLoopMarking(){
- loopmarker=2;
- }
-
- public boolean isSelfLoop(){
- if (loopmarker==1) return true;
- else return false;
- }
-
- public boolean isLoop(){
- if (loopmarker==2) return true;
- else return false;
- }
-
public boolean isMultipleParams(){
return getTD()!=null&&getTD().numParameters()>1;
}
public FlagState getFS(){
return fs;
}
-
- public void dontMention(){
- tomention = false;
- }
-
- public boolean toMention(){
- return tomention;
- }
}