import net.mograsim.logic.core.LogicObserver;
import net.mograsim.logic.core.types.BitVectorFormatter;
import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
-import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.model.LogicModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.serializing.IdentifyParams;
import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
// creation and destruction
- public ModelWireCrossPoint(ViewModelModifiable model, int logicWidth)
+ public ModelWireCrossPoint(LogicModelModifiable model, int logicWidth)
{
this(model, logicWidth, null);
}
- public ModelWireCrossPoint(ViewModelModifiable model, int logicWidth, String name)
+ public ModelWireCrossPoint(LogicModelModifiable model, int logicWidth, String name)
{
- super(model, name);
+ super(model, name, false);
this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(CIRCLE_DIAM, CIRCLE_DIAM);
- addPin(this.pin = new Pin(this, "", logicWidth, PinUsage.TRISTATE, CIRCLE_RADIUS, CIRCLE_RADIUS));
+ addPin(this.pin = new Pin(model, this, "", logicWidth, PinUsage.TRISTATE, CIRCLE_RADIUS, CIRCLE_RADIUS));
+
+ init();
}
// pins
gc.fillOval(getPosX(), getPosY(), CIRCLE_DIAM, CIRCLE_DIAM);
}
- // logic model binding
+ // core model binding
/**
* Binds this {@link ModelWireCrossPoint} to the given {@link ReadEnd}: The color of this {@link ModelWireCrossPoint} will now depend on
*
* @author Daniel Kirschten
*/
- public void setLogicModelBinding(ReadEnd end)
+ public void setCoreModelBinding(ReadEnd end)
{
if (this.end != null)
this.end.deregisterObserver(logicObs);
}
/**
- * Returns whether this {@link ModelWireCrossPoint} has a logic model binding or not.
+ * Returns whether this {@link ModelWireCrossPoint} has a core model binding or not.
*/
- public boolean hasLogicModelBinding()
+ public boolean hasCoreModelBinding()
{
return end != null;
}