protected ImmutableState(ImmutableState prev, ushort from, ushort to, DeviceState device) { _memory = prev._memory; _regs = prev._regs; _memoryMap = new MemoryMap(prev._memoryMap); _memoryMap.Map(from, to, device.Id); _deviceStates = new Dictionary<string,DeviceState>(prev._deviceStates); _deviceStates[device.Id] = device; }
protected DeviceState(DeviceState previous) { OnWrite = previous.OnWrite; }
public IState Map(ushort from, ushort to, DeviceState device) { _memoryMap.Map(from, to, device.Id); _deviceStates[device.Id] = device; return this; }
public IState Map(ushort from, ushort to, DeviceState device) { return new ImmutableState(this, from, to, device); }