--- /dev/null
+/* $Id: CommunicationBinding.java 1 2010-02-24 13:03:05Z haidw $ */\r
+package dol.datamodel.mapping;\r
+\r
+import dol.datamodel.architecture.ReadPath;\r
+import dol.datamodel.architecture.WritePath;\r
+import dol.datamodel.pn.Channel;\r
+import dol.visitor.MapVisitor;\r
+\r
+/**\r
+ * This class represents a communication binding element in the mapping.\r
+ */\r
+public class CommunicationBinding extends Binding {\r
+\r
+ /**\r
+ * Constructor to create a CommunicationBinding with a name.\r
+ */\r
+ public CommunicationBinding(String name) {\r
+ super(name);\r
+ _type = COMMUNICATION;\r
+ }\r
+\r
+ /**\r
+ * Clone this Binding\r
+ *\r
+ * @return a new instance of the Binding.\r
+ */\r
+ public Object clone() {\r
+ CommunicationBinding newObj = (CommunicationBinding) super.clone();\r
+ newObj.setChannel(_channel);\r
+ newObj.setReadPath(_readPath);\r
+ newObj.setWritePath(_writePath);\r
+ return (newObj);\r
+ }\r
+\r
+ /**\r
+ * Accept a Visitor\r
+ *\r
+ * @param x visitor object\r
+ */\r
+ public void accept(MapVisitor x) {\r
+ x.visitComponent(this);\r
+ }\r
+\r
+ /** Set the SW channel */\r
+ public void setChannel(Channel c) {\r
+ _channel = c;\r
+ }\r
+\r
+ /** Get the SW channel */\r
+ public Channel getChannel() {\r
+ return _channel;\r
+ }\r
+\r
+ /** Set the read path */\r
+ public void setReadPath(ReadPath p) {\r
+ _readPath = p;\r
+ }\r
+\r
+ /** Get the read path */\r
+ public ReadPath getReadPath() {\r
+ return _readPath;\r
+ }\r
+\r
+ /** Set the write path */\r
+ public void setWritePath(WritePath p) {\r
+ _writePath = p;\r
+ }\r
+\r
+ /** Get the write path */\r
+ public WritePath getWritePath() {\r
+ return _writePath;\r
+ }\r
+\r
+ /**\r
+ * Return a description of the binding.\r
+ *\r
+ * @return a description of the binding.\r
+ */\r
+ public String toString() {\r
+ return "CommunicationBinding: " + getName() ;\r
+ }\r
+\r
+ private Channel _channel = null;\r
+\r
+ private ReadPath _readPath = null;\r
+\r
+ private WritePath _writePath = null;\r
+\r
+}\r