]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/scl/Simantics/District.scl
Allow starting/ending of manual network creation to vertices only
[simantics/district.git] / org.simantics.district.network / scl / Simantics / District.scl
index 36dee3979b74ea97dbc7fc2e15fa507518332a11..f96ed607da33ee705fd591a08c946f401b3522ae 100644 (file)
@@ -82,8 +82,8 @@ translateElement elem = do
     ()
 
 importJava "org.simantics.district.network.DistrictNetworkUtil" where
-    createVertex :: Resource -> Vector Double -> Resource -> <WriteGraph, Proc> Resource
-    createEdge :: Resource -> Resource -> <WriteGraph, Proc> Resource
+    createVertex :: Resource -> Vector Double -> Double -> Resource -> <WriteGraph, Proc> Resource
+    createEdge :: Resource -> Resource -> Vector Double -> <WriteGraph, Proc> Resource
 
 """
 Tries to look for the Resource representing the configuration component
@@ -112,14 +112,14 @@ possibleMappedComponentVariable r = match possibleMappedComponent r with
 
 """
 """
-possibleMappedComponentPropertyValue :: String -> Resource -> <ReadGraph> Maybe Double
+possibleMappedComponentPropertyValue :: Serializable a => Typeable a => String -> Resource -> <ReadGraph> Maybe a
 possibleMappedComponentPropertyValue propName r = match possibleMappedComponentVariable r with
     Nothing -> Nothing
     Just mv -> possiblePropertyValue mv propName
 
 """
 """
-mappedComponentPropertyValue :: Double -> String -> Resource -> <ReadGraph> Double
+mappedComponentPropertyValue :: Serializable a => Typeable a => a -> String -> Resource -> <ReadGraph> a
 mappedComponentPropertyValue def propName r = match possibleMappedComponentVariable r with
     Nothing -> def
     Just mv -> match possiblePropertyValue mv propName with