]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/scl/Simantics/District/TechType.scl
Add enable/disable feature for tech type tables
[simantics/district.git] / org.simantics.district.network / scl / Simantics / District / TechType.scl
index 18663b85e7c6f5845d9a7b1afe17c50d190e2ac4..33d40360fedb8993aace95ac17885a4c7bb145b1 100644 (file)
@@ -1,4 +1,5 @@
 import "Simantics/DB"
+import "Map" as Map
 
 importJava "org.simantics.district.network.techtype.TechTypeUtils" where
     "Update component properties from tech type table: `updateComponent component`"
@@ -7,3 +8,16 @@ importJava "org.simantics.district.network.techtype.TechTypeUtils" where
     resetComponents :: Resource -> <Proc> ()
     "Reset all map diagram elements to values in a tech type table: `resetMapElements table`"
     resetMapElements :: Resource -> <Proc> ()
+    "Load a tech type table for a given component type from a CSV file: `loadTechTypeTable componentType filePath`"
+    loadTechTypeTable :: Resource -> String -> <Proc> ()
+    
+    "Get a possible tech type key property name for a component type"
+    getPossibleTechTypeKeyName :: Resource -> <ReadGraph> Maybe String
+    "Get a possible tech type table in a model for a component type: `getPossibleTechTypeTable model componentType`"
+    getPossibleTechTypeTable :: Resource -> Resource -> <ReadGraph> Maybe Resource
+    "Get data from a tech type table"
+    getTechTypeData :: Resource -> <ReadGraph> Map.T String (Map.T String String)
+    "Get data for enabled items in a tech type table"
+    getEnabledTechTypeData :: Resource -> <ReadGraph> Map.T String (Map.T String String)
+    "Get a possible row from a tech type table for the given key value"
+    getPossibleTechTypeItem :: Resource -> String -> <ReadGraph> Maybe (Map.T String String)