added demux; added getAllInputs() and getAllOutputs() for all components
[Mograsim.git] / era.mi / src / era / mi / logic / components / Component.java
diff --git a/era.mi/src/era/mi/logic/components/Component.java b/era.mi/src/era/mi/logic/components/Component.java
new file mode 100644 (file)
index 0000000..2d40cc2
--- /dev/null
@@ -0,0 +1,21 @@
+package era.mi.logic.components;
+
+import java.util.List;
+
+import era.mi.logic.wires.WireArray;
+
+public interface Component
+{
+
+       /**
+        * Returns immutable list of all inputs to the {@link Component} (including e.g. the select bits to a MUX).
+        * Intended for visualization in the UI.
+        */
+       public List<WireArray> getAllInputs();
+       
+       /**
+        * Returns immutable list of all outputs to the {@link Component}.
+        * Intended for visualization in the UI.
+        */
+       public List<WireArray> getAllOutputs();
+}