1 package org.simantics.graph.compiler.internal.templates;
3 import gnu.trove.map.hash.THashMap;
5 import org.simantics.graph.query.Path;
6 import org.simantics.graph.query.PathChild;
7 import org.simantics.graph.query.Paths;
10 public class BuiltinTemplates {
11 public final THashMap<Path, ITemplate> TEMPLATES =
12 new THashMap<Path, ITemplate>();
14 public void add(Path path, ITemplate template) {
15 TEMPLATES.put(path, template);
18 public BuiltinTemplates(Paths paths) {
19 add(new PathChild("new", paths.Layer0), NewTemplate.INSTANCE);
20 add(new PathChild("list", paths.Layer0), ListTemplate.INSTANCE);
21 add(new PathChild("orderedSet", paths.Layer0), OrderedSetTemplate.INSTANCE);
22 add(new PathChild("loadBytes", paths.Layer0), LoadBytesTemplate.INSTANCE);
23 add(new PathChild("loadString", paths.Layer0), LoadStringTemplate.INSTANCE);
24 add(new PathChild("loadDataValue", paths.Layer0), LoadDataValueTemplate.INSTANCE);