ActiveInstructionChangedListener moved to Machine and updated
[Mograsim.git] / plugins / net.mograsim.machine / src / net / mograsim / machine / mi / StandardMicroInstructionMemory.java
index 94905a5..c8866fd 100644 (file)
@@ -1,7 +1,6 @@
 package net.mograsim.machine.mi;
 
 import java.util.HashSet;
-import java.util.Set;
 
 import net.mograsim.machine.standard.memory.MemoryException;
 
@@ -10,8 +9,6 @@ public class StandardMicroInstructionMemory implements MicroInstructionMemory
        private MicroInstruction[] data;
        private MicroInstructionMemoryDefinition definition;
        private HashSet<MemoryCellModifiedListener> observers = new HashSet<>();
-       private Set<ActiveMicroInstructionChangedListener> activeInstructionListeners = new HashSet<>();
-       private long activeInstruction = -1;
 
        public StandardMicroInstructionMemory(MicroInstructionMemoryDefinition definition)
        {
@@ -55,42 +52,14 @@ public class StandardMicroInstructionMemory implements MicroInstructionMemory
                observers.remove(ob);
        }
 
-       @Override
-       public void registerActiveMicroInstructionChangedListener(ActiveMicroInstructionChangedListener ob)
-       {
-               activeInstructionListeners.add(ob);
-       }
-
-       @Override
-       public void deregisterActiveMicroInstructionChangedListener(ActiveMicroInstructionChangedListener ob)
-       {
-               activeInstructionListeners.remove(ob);
-       }
-
        private void notifyMemoryChanged(long address)
        {
                observers.forEach(ob -> ob.update(address));
        }
 
-       private void notifyActiveInstructionChanged(long address)
-       {
-               activeInstructionListeners.forEach(o -> o.activeMicroInstructionChanged(address));
-       }
-
        @Override
        public MicroInstructionMemoryDefinition getDefinition()
        {
                return definition;
        }
-
-       @Override
-       public void setActiveInstruction(long address)
-       {
-               if (address != activeInstruction)
-               {
-                       activeInstruction = address;
-                       notifyActiveInstructionChanged(address);
-               }
-       }
-
 }