Exemplo n.º 1
0
        /// <summary>
        /// Creates a new SimulationManager to manage the given simulator
        /// </summary>
        /// <param name="simulator">simulator to manage</param>
        /// <remarks>
        /// The simulator is started but breaks before executing the first instruction.
        /// Call <see cref="Continue"/> to run the simulation.
        /// </remarks>
        public SimulationManager(ProgramSimulator simulator)
        {
            this.Simulator = simulator;

            // Create simulation thread
            var thread = new Thread(SimulationThreadProc);
            thread.IsBackground = true;
            thread.Name = "SimulationManager Thread";
            thread.Start();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new simulation visitor from the given parent
 /// </summary>
 /// <param name="parent">parent simulator</param>
 public Visitor(ProgramSimulator parent)
 {
     this.parent = parent;
 }