Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3911/src/ccmtools/parser/assembly/metamodel
Modified Files:
Assembly.java Port.java Connection.java
Log Message:
Java assemblies
Index: Connection.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel/Connection.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Connection.java 12 Feb 2007 16:01:13 -0000 1.3
--- Connection.java 16 Feb 2007 12:34:32 -0000 1.4
***************
*** 28,31 ****
--- 28,41 ----
}
+ public Port getFacet()
+ {
+ return facet_;
+ }
+
+ public Port getReceptacle()
+ {
+ return receptacle_;
+ }
+
void postProcessing( Assembly parent, Map<String, Component> components )
{
***************
*** 34,41 ****
receptacle_.postProcessing(components);
}
public void prettyPrint( PrintStream out, String offset )
{
! out.println(offset + "connect " + facet_ + " to " + receptacle_ + " ;");
}
}
--- 44,56 ----
receptacle_.postProcessing(components);
}
+
+ public String toString()
+ {
+ return "connect " + facet_ + " to " + receptacle_;
+ }
public void prettyPrint( PrintStream out, String offset )
{
! out.println(offset + toString() + " ;");
}
}
Index: Port.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel/Port.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Port.java 12 Feb 2007 16:01:12 -0000 1.4
--- Port.java 16 Feb 2007 12:34:32 -0000 1.5
***************
*** 32,35 ****
--- 32,51 ----
connector_ = connector;
}
+
+ /**
+ * returns the name of the inner component or null if this is a port of the outer component
+ */
+ public String getComponent()
+ {
+ return component_;
+ }
+
+ /**
+ * returns the name of this facet or receptacle
+ */
+ public String getConnector()
+ {
+ return connector_;
+ }
/**
Index: Assembly.java
===================================================================
RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/metamodel/Assembly.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Assembly.java 15 Feb 2007 16:46:41 -0000 1.6
--- Assembly.java 16 Feb 2007 12:34:32 -0000 1.7
***************
*** 12,15 ****
--- 12,16 ----
import java.io.PrintStream;
import java.util.HashMap;
+ import java.util.List;
import java.util.Map;
import java.util.Vector;
***************
*** 31,37 ****
elements_ = elements;
}
private HashMap<String, Component> components_;
!
public Map<String, Component> getComponents()
{
--- 32,43 ----
elements_ = elements;
}
+
+ public List<AssemblyElement> getElements()
+ {
+ return elements_;
+ }
private HashMap<String, Component> components_;
!
public Map<String, Component> getComponents()
{
***************
*** 54,65 ****
}
}
!
private MComponentDef ccmComponent_;
!
! void updateCcmModel(MComponentDef component)
{
ccmComponent_ = component;
}
!
public MComponentDef getCcmComponent()
{
--- 60,71 ----
}
}
!
private MComponentDef ccmComponent_;
!
! void updateCcmModel( MComponentDef component )
{
ccmComponent_ = component;
}
!
public MComponentDef getCcmComponent()
{
|