Made classes in package "nandbased" usable for JSON
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 3 Jul 2019 21:25:47 +0000 (23:25 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 3 Jul 2019 21:25:47 +0000 (23:25 +0200)
29 files changed:
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUI_rsLatch.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIand41.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIandor414.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdemux2.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdff.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdlatch.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdlatch4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIfulladder.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIhalfadder.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUImux1.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUImux1_4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUInand3.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUInot4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIor4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIor_4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIram2.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIram4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIsel2_4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIsel3_4.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIxor.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUFuncDecode.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUInclDecode.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUInclSourceDecodeInclFunctionDecode.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUOneBit.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901DestDecode.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901QReg.java
net.mograsim.logic.ui.am2900/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901SourceDecode.java

index 065544c..b190ffa 100644 (file)
@@ -9,6 +9,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUI_rsLatch extends SimpleRectangularSubmodelComponent
 {
@@ -95,4 +96,9 @@ public class GUI_rsLatch extends SimpleRectangularSubmodelComponent
                        throw new IllegalStateException("Illegal atomic state ID: " + stateID);
                }
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUI_rsLatch.class.getCanonicalName(), (m, p) -> new GUI_rsLatch(m));
+       }
 }
\ No newline at end of file
index 637750f..b21474e 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIand extends SimpleRectangularSubmodelComponent
 {
@@ -42,4 +43,9 @@ public class GUIand extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, cp1, not.getPin("B"), new Point(45, 30));
                new GUIWire(submodelModifiable, not.getPin("Y"), Y);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIand.class.getCanonicalName(), (m, p) -> new GUIand(m));
+       }
 }
\ No newline at end of file
index 3bfb814..fc1a5bd 100644 (file)
@@ -6,6 +6,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIand41 extends SimpleRectangularSubmodelComponent
 {
@@ -64,4 +65,9 @@ public class GUIand41 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, and3.getPin("Y"), Y3, new Point[0]);
                new GUIWire(submodelModifiable, and4.getPin("Y"), Y4, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIand41.class.getCanonicalName(), (m, p) -> new GUIand41(m));
+       }
 }
\ No newline at end of file
index f48795f..c514d4c 100644 (file)
@@ -5,6 +5,7 @@ import net.mograsim.logic.ui.model.ViewModelModifiable;
 import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmodelComponent;
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIandor414 extends SimpleRectangularSubmodelComponent
 {
@@ -62,4 +63,9 @@ public class GUIandor414 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, or.getPin("Y3"), Y3, new Point[0]);
                new GUIWire(submodelModifiable, or.getPin("Y4"), Y4, new Point(80, 72.5), new Point(80, 87.5));
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIandor414.class.getCanonicalName(), (m, p) -> new GUIandor414(m));
+       }
 }
\ No newline at end of file
index 5365e92..1f1940b 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIdemux2 extends SimpleRectangularSubmodelComponent
 {
@@ -85,4 +86,9 @@ public class GUIdemux2 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, andY10.getPin("Y"), Y10);
                new GUIWire(submodelModifiable, andY11.getPin("Y"), Y11);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIdemux2.class.getCanonicalName(), (m, p) -> new GUIdemux2(m));
+       }
 }
\ No newline at end of file
index ad8c212..440f4d1 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIdff extends SimpleRectangularSubmodelComponent
 {
@@ -93,4 +94,9 @@ public class GUIdff extends SimpleRectangularSubmodelComponent
                        throw new IllegalStateException("Illegal atomic state ID: " + stateID);
                }
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIdff.class.getCanonicalName(), (m, p) -> new GUIdff(m));
+       }
 }
\ No newline at end of file
index 39b1f71..ff15892 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIdlatch extends SimpleRectangularSubmodelComponent
 {
@@ -82,4 +83,9 @@ public class GUIdlatch extends SimpleRectangularSubmodelComponent
                        throw new IllegalStateException("Illegal atomic state ID: " + stateID);
                }
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIdlatch.class.getCanonicalName(), (m, p) -> new GUIdlatch(m));
+       }
 }
\ No newline at end of file
index 36a05af..10ee84d 100644 (file)
@@ -8,6 +8,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIdlatch4 extends SimpleRectangularSubmodelComponent
 {
@@ -132,4 +133,9 @@ public class GUIdlatch4 extends SimpleRectangularSubmodelComponent
                        throw new IllegalStateException("Illegal atomic state ID: " + stateID);
                }
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIdlatch4.class.getCanonicalName(), (m, p) -> new GUIdlatch4(m));
+       }
 }
\ No newline at end of file
index 23656fa..7ec7771 100644 (file)
@@ -6,6 +6,7 @@ import net.mograsim.logic.ui.model.components.atomic.GUINandGate;
 import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmodelComponent;
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIfulladder extends SimpleRectangularSubmodelComponent
 {
@@ -45,4 +46,9 @@ public class GUIfulladder extends SimpleRectangularSubmodelComponent
                                new Point(52.5, 35), new Point(52.5, 45));
                new GUIWire(submodelModifiable, nandZ.getPin("Y"), Z);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIfulladder.class.getCanonicalName(), (m, p) -> new GUIfulladder(m));
+       }
 }
\ No newline at end of file
index d68c892..7a80a95 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIhalfadder extends SimpleRectangularSubmodelComponent
 {
@@ -58,4 +59,9 @@ public class GUIhalfadder extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandYB.getPin("Y"), nandY.getPin("B"), new Point(62.5, 37.5), new Point(62.5, 17.5));
                new GUIWire(submodelModifiable, nandY.getPin("Y"), Y, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIhalfadder.class.getCanonicalName(), (m, p) -> new GUIhalfadder(m));
+       }
 }
\ No newline at end of file
index dc9ea53..291f628 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUImux1 extends SimpleRectangularSubmodelComponent
 {
@@ -54,4 +55,9 @@ public class GUImux1 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandI1.getPin("Y"), nandY.getPin("B"));
                new GUIWire(submodelModifiable, nandY.getPin("Y"), Y);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUImux1.class.getCanonicalName(), (m, p) -> new GUImux1(m));
+       }
 }
\ No newline at end of file
index 3d7336f..ff0353b 100644 (file)
@@ -6,6 +6,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUImux1_4 extends SimpleRectangularSubmodelComponent
 {
@@ -73,4 +74,9 @@ public class GUImux1_4 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, mux4.getPin("Y"), Y4);
 
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUImux1_4.class.getCanonicalName(), (m, p) -> new GUImux1_4(m));
+       }
 }
\ No newline at end of file
index 64fd958..39d29e2 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUInand3 extends SimpleRectangularSubmodelComponent
 {
@@ -47,4 +48,9 @@ public class GUInand3 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, C, nandABC.getPin("B"), new Point(60, 62.5), new Point(60, 17.5));
                new GUIWire(submodelModifiable, nandABC.getPin("Y"), Y, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUInand3.class.getCanonicalName(), (m, p) -> new GUInand3(m));
+       }
 }
\ No newline at end of file
index 7fb2b5b..13d2b1f 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUInot4 extends SimpleRectangularSubmodelComponent
 {
@@ -67,4 +68,9 @@ public class GUInot4 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nand3.getPin("Y"), Y3, new Point[0]);
                new GUIWire(submodelModifiable, nand4.getPin("Y"), Y4, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUInot4.class.getCanonicalName(), (m, p) -> new GUInot4(m));
+       }
 }
\ No newline at end of file
index 9aadcdf..9f7dde4 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIor4 extends SimpleRectangularSubmodelComponent
 {
@@ -87,4 +88,9 @@ public class GUIor4 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nor34.getPin("Y"), or1234.getPin("B"));
                new GUIWire(submodelModifiable, or1234.getPin("Y"), Y);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIor4.class.getCanonicalName(), (m, p) -> new GUIor4(m));
+       }
 }
\ No newline at end of file
index 9d14d1a..ba10373 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIor_4 extends SimpleRectangularSubmodelComponent
 {
@@ -115,4 +116,9 @@ public class GUIor_4 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandY3.getPin("Y"), Y3, new Point[0]);
                new GUIWire(submodelModifiable, nandY4.getPin("Y"), Y4, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIor_4.class.getCanonicalName(), (m, p) -> new GUIor_4(m));
+       }
 }
\ No newline at end of file
index 4892203..f0bbf49 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIram2 extends SimpleRectangularSubmodelComponent
 {
@@ -319,4 +320,9 @@ public class GUIram2 extends SimpleRectangularSubmodelComponent
                        throw new IllegalStateException("Illegal atomic state ID: " + stateID);
                }
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIram2.class.getCanonicalName(), (m, p) -> new GUIram2(m));
+       }
 }
\ No newline at end of file
index 333dc07..35d3df5 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIram4 extends SimpleRectangularSubmodelComponent
 {
@@ -357,4 +358,9 @@ public class GUIram4 extends SimpleRectangularSubmodelComponent
                return (addr3 == '0' || addr3 == '1') || (addr2 == '0' || addr2 == '1') || (addr1 == '0' || addr1 == '1')
                                || (addr0 == '0' || addr0 == '1');
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIram4.class.getCanonicalName(), (m, p) -> new GUIram4(m));
+       }
 }
\ No newline at end of file
index c43413c..fadfd38 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIsel2_4 extends SimpleRectangularSubmodelComponent
 {
@@ -111,4 +112,9 @@ public class GUIsel2_4 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandY3.getPin("Y"), Y3, new Point[0]);
                new GUIWire(submodelModifiable, nandY4.getPin("Y"), Y4, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIsel2_4.class.getCanonicalName(), (m, p) -> new GUIsel2_4(m));
+       }
 }
\ No newline at end of file
index 20c8fb4..83440ee 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIsel3_4 extends SimpleRectangularSubmodelComponent
 {
@@ -109,4 +110,9 @@ public class GUIsel3_4 extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandY3.getPin("Y"), Y3, new Point[0]);
                new GUIWire(submodelModifiable, nandY4.getPin("Y"), Y4, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIsel3_4.class.getCanonicalName(), (m, p) -> new GUIsel3_4(m));
+       }
 }
\ No newline at end of file
index dcf6c1f..537ed00 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIxor extends SimpleRectangularSubmodelComponent
 {
@@ -56,4 +57,9 @@ public class GUIxor extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandYB.getPin("Y"), nandY.getPin("B"));
                new GUIWire(submodelModifiable, nandY.getPin("Y"), Y);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIxor.class.getCanonicalName(), (m, p) -> new GUIxor(m));
+       }
 }
\ No newline at end of file
index 7548ec5..ec3cf86 100644 (file)
@@ -13,6 +13,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901 extends SimpleRectangularSubmodelComponent
 {
@@ -344,4 +345,9 @@ public class GUIAm2901 extends SimpleRectangularSubmodelComponent
                addHighLevelStateSubcomponentID("regs", ram);
                addHighLevelStateSubcomponentID("qreg", qreg);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901.class.getCanonicalName(), (m, p) -> new GUIAm2901(m));
+       }
 }
\ No newline at end of file
index 339b18a..f08898f 100644 (file)
@@ -9,6 +9,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901ALUFuncDecode extends SimpleRectangularSubmodelComponent
 {
@@ -106,4 +107,10 @@ public class GUIAm2901ALUFuncDecode extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nandL.getPin("Y"), L, new Point[0]);
                new GUIWire(submodelModifiable, andSBE.getPin("Y"), SBE, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901ALUFuncDecode.class.getCanonicalName(),
+                               (m, p) -> new GUIAm2901ALUFuncDecode(m));
+       }
 }
\ No newline at end of file
index db2292d..79bbba6 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901ALUInclDecode extends SimpleRectangularSubmodelComponent
 {
@@ -166,4 +167,10 @@ public class GUIAm2901ALUInclDecode extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, cpCnplus4, Cnplus4, new Point(130, 385), new Point(130, 180));
                new GUIWire(submodelModifiable, xorOVR.getPin("Y"), OVR);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901ALUInclDecode.class.getCanonicalName(),
+                               (m, p) -> new GUIAm2901ALUInclDecode(m));
+       }
 }
\ No newline at end of file
index d822282..784e200 100644 (file)
@@ -8,6 +8,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901ALUInclSourceDecodeInclFunctionDecode extends SimpleRectangularSubmodelComponent
 {
@@ -137,4 +138,10 @@ public class GUIAm2901ALUInclSourceDecodeInclFunctionDecode extends SimpleRectan
                new GUIWire(submodelModifiable, alu.getPin("Cn+4"), Cnplus4, new Point(120, 60), new Point(120, 180));
                new GUIWire(submodelModifiable, alu.getPin("OVR"), OVR, new Point(115, 70), new Point(115, 220));
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901ALUInclSourceDecodeInclFunctionDecode.class.getCanonicalName(),
+                               (m, p) -> new GUIAm2901ALUInclSourceDecodeInclFunctionDecode(m));
+       }
 }
\ No newline at end of file
index 4db026f..c35f7cf 100644 (file)
@@ -11,6 +11,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901ALUOneBit extends SimpleRectangularSubmodelComponent
 {
@@ -86,4 +87,9 @@ public class GUIAm2901ALUOneBit extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, Coutand.getPin("Y"), Cout, new Point[0]);
                new GUIWire(submodelModifiable, Fxor.getPin("Y"), F, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901ALUOneBit.class.getCanonicalName(), (m, p) -> new GUIAm2901ALUOneBit(m));
+       }
 }
\ No newline at end of file
index 070618c..defe85b 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901DestDecode extends SimpleRectangularSubmodelComponent
 {
@@ -117,8 +118,7 @@ public class GUIAm2901DestDecode extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, cpNotI81, cpNotI82, new Point[0]);
                new GUIWire(submodelModifiable, cpNotI82, nandRAMWE.getPin("A"), new Point[0]);
                new GUIWire(submodelModifiable, cpNotI82, nandI7NotI8.getPin("A"), new Point(45, 95));
-               new GUIWire(submodelModifiable, cpI73, nandI7NotI8.getPin("B"), new Point(10, 115), new Point(45, 115),
-                               new Point(45, 105));
+               new GUIWire(submodelModifiable, cpI73, nandI7NotI8.getPin("B"), new Point(10, 115), new Point(45, 115), new Point(45, 105));
                new GUIWire(submodelModifiable, nandI8I7.getPin("Y"), cpNandI8I7, new Point(40, 100));
                new GUIWire(submodelModifiable, cpNandI8I7, nandLSH.getPin("A"), new Point[0]);
                new GUIWire(submodelModifiable, cpNandI8I7, nandLSH.getPin("B"), new Point(40, 145));
@@ -136,12 +136,17 @@ public class GUIAm2901DestDecode extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, cpNotI6, nandQWE.getPin("B"), new Point[0]);
                new GUIWire(submodelModifiable, notRSH.getPin("Y"), RSH, new Point(130, 20), new Point(130, 60));
                new GUIWire(submodelModifiable, andI7NotI8.getPin("Y"), nandYF.getPin("A"));
-               new GUIWire(submodelModifiable, cpNotI6, nandYF.getPin("B"), new Point(75, 170), new Point(105, 170),
-                               new Point(105, 120));
+               new GUIWire(submodelModifiable, cpNotI6, nandYF.getPin("B"), new Point(75, 170), new Point(105, 170), new Point(105, 120));
                new GUIWire(submodelModifiable, nandQWE.getPin("Y"), cpNandQWE, new Point(110, 155));
                new GUIWire(submodelModifiable, cpNandQWE, notQWE.getPin("A"), new Point[0]);
                new GUIWire(submodelModifiable, cpNandQWE, notQWE.getPin("B"), new Point(110, 225));
                new GUIWire(submodelModifiable, nandYF.getPin("Y"), YF);
                new GUIWire(submodelModifiable, notQWE.getPin("Y"), QWE, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901DestDecode.class.getCanonicalName(),
+                               (m, p) -> new GUIAm2901DestDecode(m));
+       }
 }
\ No newline at end of file
index 11a7241..804e85d 100644 (file)
@@ -10,6 +10,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901QReg extends SimpleRectangularSubmodelComponent
 {
@@ -140,4 +141,9 @@ public class GUIAm2901QReg extends SimpleRectangularSubmodelComponent
                        throw new IllegalStateException("Illegal atomic state ID: " + stateID);
                }
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901QReg.class.getCanonicalName(), (m, p) -> new GUIAm2901QReg(m));
+       }
 }
\ No newline at end of file
index 832d995..d0ef4d5 100644 (file)
@@ -7,6 +7,7 @@ import net.mograsim.logic.ui.model.components.submodels.SimpleRectangularSubmode
 import net.mograsim.logic.ui.model.wires.GUIWire;
 import net.mograsim.logic.ui.model.wires.Pin;
 import net.mograsim.logic.ui.model.wires.WireCrossPoint;
+import net.mograsim.logic.ui.serializing.IndirectGUIComponentCreator;
 
 public class GUIAm2901SourceDecode extends SimpleRectangularSubmodelComponent
 {
@@ -111,8 +112,7 @@ public class GUIAm2901SourceDecode extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, cpI01, notI0.getPin("A"), new Point(7.5, 95));
                new GUIWire(submodelModifiable, cpI01, cpI02, new Point[0]);
                new GUIWire(submodelModifiable, cpI02, notI0.getPin("B"), new Point[0]);
-               new GUIWire(submodelModifiable, cpI02, nand23.getPin("B"), new Point(7.5, 112.5), new Point(32.5, 112.5),
-                               new Point(32.5, 105));
+               new GUIWire(submodelModifiable, cpI02, nand23.getPin("B"), new Point(7.5, 112.5), new Point(32.5, 112.5), new Point(32.5, 105));
                new GUIWire(submodelModifiable, notI2.getPin("Y"), cpNotI2, new Point(32.5, 20));
                new GUIWire(submodelModifiable, cpNotI2, nand22.getPin("A"), new Point[0]);
                new GUIWire(submodelModifiable, cpNotI2, nand23.getPin("A"), new Point(32.5, 95));
@@ -149,4 +149,10 @@ public class GUIAm2901SourceDecode extends SimpleRectangularSubmodelComponent
                new GUIWire(submodelModifiable, nand41.getPin("Y"), SQ, new Point[0]);
                new GUIWire(submodelModifiable, nand42.getPin("Y"), RD, new Point[0]);
        }
+
+       static
+       {
+               IndirectGUIComponentCreator.setComponentProvider(GUIAm2901SourceDecode.class.getCanonicalName(),
+                               (m, p) -> new GUIAm2901SourceDecode(m));
+       }
 }
\ No newline at end of file