]> 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 e8ab4eec1d00ae1d788bb16bc6d25098c66392c9..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`"
@@ -9,3 +10,14 @@ importJava "org.simantics.district.network.techtype.TechTypeUtils" where
     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)