X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Ftemplates%2FBuiltinTemplates.java;fp=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Ftemplates%2FBuiltinTemplates.java;h=860be2c08d385155f74878b3bd6e56dad6029e43;hp=0000000000000000000000000000000000000000;hb=969bd23cab98a79ca9101af33334000879fb60c5;hpb=866dba5cd5a3929bbeae85991796acb212338a08 diff --git a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/BuiltinTemplates.java b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/BuiltinTemplates.java new file mode 100644 index 000000000..860be2c08 --- /dev/null +++ b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/templates/BuiltinTemplates.java @@ -0,0 +1,26 @@ +package org.simantics.graph.compiler.internal.templates; + +import gnu.trove.map.hash.THashMap; + +import org.simantics.graph.query.Path; +import org.simantics.graph.query.PathChild; +import org.simantics.graph.query.Paths; + + +public class BuiltinTemplates { + public final THashMap TEMPLATES = + new THashMap(); + + public void add(Path path, ITemplate template) { + TEMPLATES.put(path, template); + } + + public BuiltinTemplates(Paths paths) { + add(new PathChild("new", paths.Layer0), NewTemplate.INSTANCE); + add(new PathChild("list", paths.Layer0), ListTemplate.INSTANCE); + add(new PathChild("orderedSet", paths.Layer0), OrderedSetTemplate.INSTANCE); + add(new PathChild("loadBytes", paths.Layer0), LoadBytesTemplate.INSTANCE); + add(new PathChild("loadString", paths.Layer0), LoadStringTemplate.INSTANCE); + add(new PathChild("loadDataValue", paths.Layer0), LoadDataValueTemplate.INSTANCE); + } +}