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