1 /* $Id: CommunicationBinding.java 1 2010-02-24 13:03:05Z haidw $ */
\r
2 package dol.datamodel.mapping;
\r
4 import dol.datamodel.architecture.ReadPath;
\r
5 import dol.datamodel.architecture.WritePath;
\r
6 import dol.datamodel.pn.Channel;
\r
7 import dol.visitor.MapVisitor;
\r
10 * This class represents a communication binding element in the mapping.
\r
12 public class CommunicationBinding extends Binding {
\r
15 * Constructor to create a CommunicationBinding with a name.
\r
17 public CommunicationBinding(String name) {
\r
19 _type = COMMUNICATION;
\r
23 * Clone this Binding
\r
25 * @return a new instance of the Binding.
\r
27 public Object clone() {
\r
28 CommunicationBinding newObj = (CommunicationBinding) super.clone();
\r
29 newObj.setChannel(_channel);
\r
30 newObj.setReadPath(_readPath);
\r
31 newObj.setWritePath(_writePath);
\r
38 * @param x visitor object
\r
40 public void accept(MapVisitor x) {
\r
41 x.visitComponent(this);
\r
44 /** Set the SW channel */
\r
45 public void setChannel(Channel c) {
\r
49 /** Get the SW channel */
\r
50 public Channel getChannel() {
\r
54 /** Set the read path */
\r
55 public void setReadPath(ReadPath p) {
\r
59 /** Get the read path */
\r
60 public ReadPath getReadPath() {
\r
64 /** Set the write path */
\r
65 public void setWritePath(WritePath p) {
\r
69 /** Get the write path */
\r
70 public WritePath getWritePath() {
\r
75 * Return a description of the binding.
\r
77 * @return a description of the binding.
\r
79 public String toString() {
\r
80 return "CommunicationBinding: " + getName() ;
\r
83 private Channel _channel = null;
\r
85 private ReadPath _readPath = null;
\r
87 private WritePath _writePath = null;
\r