1 package net.mograsim.logic.model.model.components.atomic;
3 import net.mograsim.logic.core.components.gates.CoreNotGate;
4 import net.mograsim.logic.model.model.LogicModelModifiable;
5 import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
6 import net.mograsim.logic.model.modeladapter.componentadapters.SimpleGateAdapter;
7 import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
9 public class ModelNotGate extends SimpleRectangularModelGate
11 public ModelNotGate(LogicModelModifiable model, int logicWidth)
13 this(model, logicWidth, null);
16 public ModelNotGate(LogicModelModifiable model, int logicWidth, String name)
18 super(model, "NotGate", "1", true, logicWidth, name, false);
25 LogicCoreAdapter.addComponentAdapter(new SimpleGateAdapter<>(ModelNotGate.class, (t, p, o, i) -> new CoreNotGate(t, p, i[0], o)));
26 IndirectModelComponentCreator.setComponentSupplier(ModelNotGate.class.getCanonicalName(),
27 (m, p, n) -> new ModelNotGate(m, p.getAsInt(), n));