diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-02 22:12:41 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-21 11:31:14 +0200 |
| commit | d65978b5f3426280d1dd64105e8442f5d5d98b9e (patch) | |
| tree | e488f2bdff38f2b0e4dd34c7c20009ecba1cdf9d /opendc-simulator/opendc-simulator-compute/src/main | |
| parent | c9d4b846dfa7bf71bc394761717cb165951fa790 (diff) | |
refactor(sim/compute): Remove FlowEngine from SimMachineContext
This change removes the reference to the active FlowEngine from the
SimMachineContext interface. This prevents leaking the lower layer into
this module.
Diffstat (limited to 'opendc-simulator/opendc-simulator-compute/src/main')
2 files changed, 1 insertions, 8 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt index 7f6766ee..ef0cd323 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt +++ b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimAbstractMachine.kt @@ -101,7 +101,7 @@ public abstract class SimAbstractMachine( */ private var isClosed = false - override val engine: FlowEngine = this@SimAbstractMachine.engine + val engine: FlowEngine = this@SimAbstractMachine.engine /** * Start this context. diff --git a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimMachineContext.kt b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimMachineContext.kt index 1317f728..5e3a7766 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimMachineContext.kt +++ b/opendc-simulator/opendc-simulator-compute/src/main/kotlin/org/opendc/simulator/compute/SimMachineContext.kt @@ -22,8 +22,6 @@ package org.opendc.simulator.compute -import org.opendc.simulator.flow.FlowEngine - /** * A simulated execution context in which a bootable image runs. This interface represents the * firmware interface between the running image (e.g. operating system) and the physical or virtual firmware on @@ -31,11 +29,6 @@ import org.opendc.simulator.flow.FlowEngine */ public interface SimMachineContext : AutoCloseable { /** - * The [FlowEngine] that simulates the machine. - */ - public val engine: FlowEngine - - /** * The metadata associated with the context. */ public val meta: Map<String, Any> |
