1 | package de.uka.ipd.sdq.simulation.abstractsimengine.ssj; |
2 | |
3 | import de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator; |
4 | import de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEventDelegator; |
5 | import de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator; |
6 | import de.uka.ipd.sdq.simulation.abstractsimengine.IEntity; |
7 | import de.uka.ipd.sdq.simulation.abstractsimengine.ISimEngineFactory; |
8 | import de.uka.ipd.sdq.simulation.abstractsimengine.ISimEvent; |
9 | import de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess; |
10 | import de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationControl; |
11 | import de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel; |
12 | |
13 | /** |
14 | * @author Steffen Becker |
15 | * @author Philipp Merkle |
16 | */ |
17 | public class SSJSimEngineFactory implements ISimEngineFactory { |
18 | |
19 | private SSJModel model; |
20 | |
21 | @Override |
22 | public void setModel(ISimulationModel model) { |
23 | this.model = new SSJModel(model); |
24 | } |
25 | |
26 | @Override |
27 | public ISimulationControl createSimulationControl() { |
28 | ISimulationControl delegate = new SSJExperiment(model); |
29 | model.setSimulationControl(delegate); |
30 | // model.setSimulationEngineFactory(this); |
31 | return delegate; |
32 | } |
33 | |
34 | @Override |
35 | public ISimProcess createSimProcess(AbstractSimProcessDelegator myProcess, String name) { |
36 | return new SSJSimProcess(myProcess, name); |
37 | } |
38 | |
39 | @Override |
40 | public <E extends IEntity> ISimEvent<E> createSimEvent(AbstractSimEventDelegator<E> myEvent, String name) { |
41 | return new SSJSimEvent<E>(myEvent, name); |
42 | } |
43 | |
44 | @Override |
45 | public IEntity createEntity(AbstractSimEntityDelegator e, String name) { |
46 | return new SSJEntity(e, name); |
47 | } |
48 | |
49 | } |