X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fdatamodel%2Fmapping%2FCommunicationBinding.java;fp=dol%2Fsrc%2Fdol%2Fdatamodel%2Fmapping%2FCommunicationBinding.java;h=568c326c460ef9bb36cc6dfc6e75bd41dc0f62df;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/datamodel/mapping/CommunicationBinding.java b/dol/src/dol/datamodel/mapping/CommunicationBinding.java new file mode 100644 index 0000000..568c326 --- /dev/null +++ b/dol/src/dol/datamodel/mapping/CommunicationBinding.java @@ -0,0 +1,89 @@ +/* $Id: CommunicationBinding.java 1 2010-02-24 13:03:05Z haidw $ */ +package dol.datamodel.mapping; + +import dol.datamodel.architecture.ReadPath; +import dol.datamodel.architecture.WritePath; +import dol.datamodel.pn.Channel; +import dol.visitor.MapVisitor; + +/** + * This class represents a communication binding element in the mapping. + */ +public class CommunicationBinding extends Binding { + + /** + * Constructor to create a CommunicationBinding with a name. + */ + public CommunicationBinding(String name) { + super(name); + _type = COMMUNICATION; + } + + /** + * Clone this Binding + * + * @return a new instance of the Binding. + */ + public Object clone() { + CommunicationBinding newObj = (CommunicationBinding) super.clone(); + newObj.setChannel(_channel); + newObj.setReadPath(_readPath); + newObj.setWritePath(_writePath); + return (newObj); + } + + /** + * Accept a Visitor + * + * @param x visitor object + */ + public void accept(MapVisitor x) { + x.visitComponent(this); + } + + /** Set the SW channel */ + public void setChannel(Channel c) { + _channel = c; + } + + /** Get the SW channel */ + public Channel getChannel() { + return _channel; + } + + /** Set the read path */ + public void setReadPath(ReadPath p) { + _readPath = p; + } + + /** Get the read path */ + public ReadPath getReadPath() { + return _readPath; + } + + /** Set the write path */ + public void setWritePath(WritePath p) { + _writePath = p; + } + + /** Get the write path */ + public WritePath getWritePath() { + return _writePath; + } + + /** + * Return a description of the binding. + * + * @return a description of the binding. + */ + public String toString() { + return "CommunicationBinding: " + getName() ; + } + + private Channel _channel = null; + + private ReadPath _readPath = null; + + private WritePath _writePath = null; + +}