Changeset 1851 for trunk/sources/HeuristicLab.SequentialEngine
- Timestamp:
- 05/19/09 13:18:46 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SequentialEngine/3.2/SequentialEngine.cs
r1847 r1851 33 33 public class SequentialEngine : EngineBase, IEditable { 34 34 private IOperator currentOperator; 35 private IOperation currentOperation;36 35 37 36 /// <summary> … … 58 57 public override void Abort() { 59 58 base.Abort(); 60 if (currentOperator != null && currentOperator.SupportsAbort) {59 if (currentOperator != null) 61 60 currentOperator.Abort(); 62 myExecutionStack.Push(currentOperation);63 }64 61 } 65 62 … … 72 69 /// If the execution was successful <see cref="EngineBase.OnOperationExecuted"/> is called.</remarks> 73 70 protected override void ProcessNextOperation() { 74 currentOperation = myExecutionStack.Pop();75 if ( currentOperation is AtomicOperation) {76 AtomicOperation atomicOperation = (AtomicOperation) currentOperation;71 IOperation operation = myExecutionStack.Pop(); 72 if (operation is AtomicOperation) { 73 AtomicOperation atomicOperation = (AtomicOperation)operation; 77 74 IOperation next = null; 78 75 try { … … 90 87 OnOperationExecuted(atomicOperation); 91 88 if (atomicOperation.Operator.Breakpoint) Abort(); 92 } else if ( currentOperation is CompositeOperation) {93 CompositeOperation compositeOperation = (CompositeOperation) currentOperation;89 } else if (operation is CompositeOperation) { 90 CompositeOperation compositeOperation = (CompositeOperation)operation; 94 91 for (int i = compositeOperation.Operations.Count - 1; i >= 0; i--) 95 92 myExecutionStack.Push(compositeOperation.Operations[i]);
Note: See TracChangeset
for help on using the changeset viewer.