]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.structural2/scl/Structural/Procedural.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.structural2 / scl / Structural / Procedural.scl
diff --git a/bundles/org.simantics.structural2/scl/Structural/Procedural.scl b/bundles/org.simantics.structural2/scl/Structural/Procedural.scl
new file mode 100644 (file)
index 0000000..b4600dc
--- /dev/null
@@ -0,0 +1,31 @@
+include "Simantics/DB"\r
+\r
+@JavaType "org.simantics.structural2.procedural.Property"\r
+data Property =\r
+    @FieldNames [relation, value]\r
+    Property Resource a\r
+\r
+instance Show Property where\r
+    sb <+ Property relation value = sb << "(Property " <+ relation << ")"\r
+\r
+@JavaType "org.simantics.structural2.procedural.ConnectionPoint"\r
+data ConnectionPoint =\r
+    @JavaType "org.simantics.structural2.procedural.Terminal"\r
+    @FieldNames [component, relation]\r
+    Terminal String Resource\r
+  | @JavaType "org.simantics.structural2.procedural.Interface"\r
+    @FieldNames [relation]\r
+    Interface Resource\r
+\r
+deriving instance Show ConnectionPoint\r
+\r
+@JavaType "org.simantics.structural2.procedural.SubstructureElement"\r
+data SubstructureElement =\r
+    @JavaType "org.simantics.structural2.procedural.Component"\r
+    @FieldNames [name, "type", properties]\r
+    Component String Resource [Property]\r
+  | @JavaType "org.simantics.structural2.procedural.Connection"\r
+    @FieldNames [connectionPoints]  \r
+    Connection [ConnectionPoint]\r
+\r
+deriving instance Show SubstructureElement
\ No newline at end of file