]> gerrit.simantics Code Review - simantics/platform.git/blob
02ca1a6cb4f603a4708db7a7e1d80144adf732bb
[simantics/platform.git] /
1 package org.simantics.graph.compiler.internal.templates;
2
3 import gnu.trove.map.hash.THashMap;
4
5 import org.simantics.graph.query.Path;
6 import org.simantics.graph.query.PathChild;
7 import org.simantics.graph.query.Paths;
8
9
10 public class BuiltinTemplates { 
11         public final THashMap<Path, ITemplate> TEMPLATES = 
12                 new THashMap<Path, ITemplate>();
13         
14         public void add(Path path, ITemplate template) {
15                 TEMPLATES.put(path, template);
16         }
17         
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);
25         }
26 }