- Timestamp:
- 03/18/08 15:56:41 (17 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/OperatorBase.cs
r61 r76 41 41 } 42 42 43 pr ivatebool myCanceled;43 protected bool myCanceled; 44 44 public bool Canceled { 45 45 get { return myCanceled; } … … 372 372 373 373 IOperation next = Apply(scope); 374 375 foreach (IVariableInfo variableInfo in VariableInfos) 376 scope.RemoveAlias(variableInfo.FormalName); 377 374 378 OnExecuted(); 375 379 return next; -
trunk/sources/HeuristicLab.Operators/CombinedOperator.cs
r61 r76 64 64 } 65 65 66 public override IOperation Execute(IScope scope) { 67 myCanceled = false; 68 69 if (scope.GetVariable(Guid.ToString()) == null) { // contained operator not yet executed 70 // add marker 71 scope.AddVariable(new Variable(Guid.ToString(), null)); 72 73 // add aliases 74 foreach (IVariableInfo variableInfo in VariableInfos) 75 scope.AddAlias(variableInfo.FormalName, variableInfo.ActualName); 76 77 CompositeOperation next = new CompositeOperation(); 78 next.AddOperation(Apply(scope)); 79 // execute combined operator again after contained operators have been executed 80 next.AddOperation(new AtomicOperation(this, scope)); 81 82 OnExecuted(); 83 return next; 84 } else { // contained operator already executed 85 // remove marker 86 scope.RemoveVariable(Guid.ToString()); 87 88 // remove aliases 89 foreach (IVariableInfo variableInfo in VariableInfos) 90 scope.RemoveAlias(variableInfo.FormalName); 91 92 OnExecuted(); 93 return null; 94 } 95 } 96 66 97 public override IOperation Apply(IScope scope) { 67 98 if (OperatorGraph.InitialOperator != null) {
Note: See TracChangeset
for help on using the changeset viewer.