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