1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package nl.tudelft.goal.emohawk.translators;
21
22 import nl.tudelft.goal.EIS2Java.exception.TranslationException;
23 import nl.tudelft.goal.EIS2Java.translation.Java2Parameter;
24 import nl.tudelft.goal.EIS2Java.translation.Translator;
25 import nl.tudelft.goal.unreal.translators.LocationTranslator;
26 import cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric.Place;
27 import eis.iilang.Function;
28 import eis.iilang.Identifier;
29 import eis.iilang.Numeral;
30 import eis.iilang.Parameter;
31
32 public class PlaceTranslator implements Java2Parameter<Place> {
33
34 @Override
35 public Parameter[] translate(Place o) throws TranslationException {
36 return new Parameter[] {
37 new Identifier(o.name().toLowerCase()),
38 Translator.getInstance().translate2Parameter(o.getPlaceLocation())[0],
39 new Numeral(o.getPlaceRadius()) };
40 }
41
42 @Override
43 public Class<? extends Place> translatesFrom() {
44 return Place.class;
45 }
46
47 }