X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fdatamodel%2Fmapping%2FComputationBinding.java;fp=dol%2Fsrc%2Fdol%2Fdatamodel%2Fmapping%2FComputationBinding.java;h=c117265e280769ce9c386d8b4e435086a0cecaad;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/datamodel/mapping/ComputationBinding.java b/dol/src/dol/datamodel/mapping/ComputationBinding.java new file mode 100644 index 0000000..c117265 --- /dev/null +++ b/dol/src/dol/datamodel/mapping/ComputationBinding.java @@ -0,0 +1,75 @@ +/* $Id: ComputationBinding.java 1 2010-02-24 13:03:05Z haidw $ */ +package dol.datamodel.mapping; + +import dol.datamodel.architecture.Processor; +import dol.datamodel.pn.Process; +import dol.visitor.MapVisitor; + +/** + * This class represents a computation binding element in the mapping. + */ +public class ComputationBinding extends Binding { + + /** + * Constructor to create a ComputationBinding with a name. + */ + public ComputationBinding(String name) { + super(name); + _type = COMPUTATION; + } + + /** + * Clone this Binding + * + * @return a new instance of the Binding. + */ + public Object clone() { + ComputationBinding newObj = (ComputationBinding) super.clone(); + newObj.setProcessor(_processor); + newObj.setProcess(_process); + return (newObj); + } + + /** + * Accept a Visitor + * + * @param x visitor object + */ + public void accept(MapVisitor x) { + x.visitComponent(this); + } + + /** Set the PN process */ + public void setProcess(Process p) { + _process = p; + } + + /** Get the PN process */ + public Process getProcess() { + return _process; + } + + /** Set the processor from the architecture */ + public void setProcessor(Processor p) { + _processor = p; + } + + /** Get the processor */ + public Processor getProcessor() { + return _processor; + } + + /** + * Return a description of the binding. + * + * @return a description of the binding. + */ + public String toString() { + return "ComputationBinding: " + getName() ; + } + + private Process _process = null; + + private Processor _processor = null; + +}