MPROMEditor now calls its columns "Opcode" and "muPC"
[Mograsim.git] / plugins / net.mograsim.logic.model / src / net / mograsim / logic / model / snippets / highlevelstatehandlers / standard / atomic / AtomicHighLevelStateHandler.java
1 package net.mograsim.logic.model.snippets.highlevelstatehandlers.standard.atomic;
2
3 import java.util.function.Consumer;
4
5 import com.google.gson.JsonElement;
6
7 import net.mograsim.logic.model.serializing.JSONSerializable;
8 import net.mograsim.logic.model.snippets.HighLevelStateHandler;
9
10 public interface AtomicHighLevelStateHandler extends JSONSerializable
11 {
12         /**
13          * Gets the current value of the atomic high level state represented by this AtomicHighLevelStateHandler.<br>
14          * See {@link HighLevelStateHandler} for an explanation of high-level state IDs.
15          * 
16          * @author Daniel Kirschten
17          */
18         public Object getHighLevelState();
19
20         /**
21          * Sets the atomic high level state represented by this AtomicHighLevelStateHandler to the given value.<br>
22          * See {@link HighLevelStateHandler} for an explanation of high-level state IDs.
23          * 
24          * @author Daniel Kirschten
25          */
26         public void setHighLevelState(Object newState);
27
28         public static class AtomicHighLevelStateHandlerParams
29         {
30                 public String id;
31                 public JsonElement params;
32         }
33
34         public void addListener(Consumer<Object> stateChanged);
35
36         public void removeListener(Consumer<Object> stateChanged);
37 }