Merge branch 'development' of
[Mograsim.git] / net.mograsim.logic.model / src / net / mograsim / logic / model / serializing / snippets / HighLevelStateHandler.java
1 package net.mograsim.logic.model.serializing.snippets;
2
3 import net.mograsim.logic.model.model.components.GUIComponent;
4
5 public interface HighLevelStateHandler
6 {
7         /**
8          * Sets the given high-level state to the given value. <br>
9          * A high level state ID consists of parts separated by dots ('.').<br>
10          * The last part (the part after the last dot) is called "atomic high level state ID". The parts before that part are called
11          * "subcomponent ID"s.<br>
12          * If there is no dot in a high level state ID, the whole high level state ID is called atomic.<br>
13          * Note that subcomponent IDs don't have to correspond to actual subcomponents. For example, a RAM component may supply subcomponent IDs
14          * "c0000", "c0001" ... "cFFFF" without actually having a subcomponent for each cell. It also is allowed to delegate an atomic high
15          * level state ID to a subcomponent.
16          * 
17          * @see #getHighLevelState(String)
18          * @see GUIComponent#setHighLevelState(String, Object)
19          * 
20          * @author Daniel Kirschten
21          */
22         public void setHighLevelState(String stateID, Object newState);
23
24         /**
25          * Gets the current value of the given high-level state. <br>
26          * See {@link #setHighLevelState(String, Object)} for an explanation of high-level state IDs.
27          * 
28          * @see #setHighLevelState(String, Object)
29          * @see GUIComponent#getHighLevelState(String)
30          * 
31          * @author Daniel Kirschten
32          */
33         public Object getHighLevelState(String stateID);
34 }