X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fdatamodel%2Fmapping%2FBinding.java;fp=dol%2Fsrc%2Fdol%2Fdatamodel%2Fmapping%2FBinding.java;h=ac39c52253e567b4ba2bb940e3d2f44b07602503;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/datamodel/mapping/Binding.java b/dol/src/dol/datamodel/mapping/Binding.java new file mode 100644 index 0000000..ac39c52 --- /dev/null +++ b/dol/src/dol/datamodel/mapping/Binding.java @@ -0,0 +1,87 @@ +package dol.datamodel.mapping; + +import dol.visitor.MapVisitor; + +/** + * This class represents a binding element in the mapping. + */ +abstract public class Binding extends MapResource { + + /** + * Constructor to create a Binding with a name. + */ + public Binding(String name) { + super(name); + } + + /** + * Accept a Visitor + * @param x A Visitor Object. + */ + public void accept(MapVisitor x) { + x.visitComponent(this); + } + + /** + * Clone this Binding + * + * @return a new instance of the Binding. + */ + public Object clone() { + Binding newObj = (Binding) super.clone(); + return (newObj); + } + + /** + * Get the range of this binding. + * + * @return range + */ + public String getRange() { + return _range; + } + + /** + * Set the range of this binding. + * + * @param range new range value + */ + public void setRange(String range) { + _range= range; + } + + /** + * Get the type of this binding. + * + * @return type + */ + public String getType() { + return _type; + } + + /** + * Return a description of the binding. + * + * @return a description of the binding. + */ + public String toString() { + return "Binding: " + getName() ; + } + + /** + * Range of the iterator when the instance belongs to an iterated + * series of bindings. + */ + protected String _range; + protected String _type; + + /** + * Type specifier for communication bindings. + */ + public static final String COMMUNICATION = "communication"; + + /** + * Type specifier for computation bindings. + */ + public static final String COMPUTATION = "computation"; +}