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