public override void Propagate(IInstanceState state) { Value in1 = state.Get(1); Value in2 = state.Get(2); state.Set(0, in1.Or(in2), 1); }
public override void Propagate(IInstanceState state) { SwitchInstance myState = state.Instance as SwitchInstance; Value curVal = myState == null ? Value.X : myState.currentValue; state.Set(0, curVal, 1); }
protected override void HandleEventHook(InstanceEvent evnt, IInstanceState state) { SimulationModel simModel = null; if (evnt is SimulationInstanceEvent) { simModel = ((SimulationInstanceEvent)evnt).SimulationModel; } if (evnt.Type == InstanceEvent.Types.InstanceAdded) { Transaction xn = new Transaction(); ILayoutAccess subLayout = xn.RequestReadAccess(subLayoutModel); ISimulationAccess sim = xn.RequestWriteAccess(simModel); using (xn.Start()) { subSimulation = new LayoutSimulation(simModel, subLayoutModel); subSimulation.SetActivated(true); RenewPortLinks(subLayout, sim); } } else if (evnt.Type == InstanceEvent.Types.InstancePortsChanged) { if (simModel == null) { simModel = subSimulation.SimulationModel; } if (subLayoutModel == null || simModel == null) { return; } Transaction xn = new Transaction(); ILayoutAccess subLayout = xn.RequestReadAccess(subLayoutModel); ISimulationAccess sim = xn.RequestWriteAccess(simModel); using (xn.Start()) { RenewPortLinks(subLayout, sim); } } else if (evnt.Type == InstanceEvent.Types.InstanceRemoved) { subSimulation.SetActivated(false); } }
public override sealed void HandleEvent(InstanceEvent evnt, IInstanceState state) { InstanceEvent.Types type = evnt.Type; if (type == InstanceEvent.Types.InstanceDirty) { Component.Propagate(state); } else { switch (type) { case InstanceEvent.Types.InstanceAdded: Component.SetInstanceLive(this, true); break; case InstanceEvent.Types.InstanceRemoved: Component.SetInstanceLive(this, false); break; } HandleEventHook(evnt, state); } }
public void Propagate(IInstanceState state) { }
public override void Propagate(IInstanceState state) { }
public override void Propagate(IInstanceState state) { module.Implementation.Propagate(state); }
public abstract override void Propagate(IInstanceState state);
public ComponentPainter(IPaintbrush master, IInstanceState state) : base(master) { this.InstanceState = state; }
public override void Propagate(IInstanceState state) { Value incoming = state.Get(1); state.Set(0, incoming.Not, 1); }
public abstract void Propagate(IInstanceState state);
public abstract void HandleEvent(InstanceEvent evnt, IInstanceState state);
protected virtual void HandleEventHook(InstanceEvent evnt, IInstanceState state) { }