Changeset 2526 for trunk/sources/HeuristicLab.Core/3.3/EngineBase.cs
- Timestamp:
- 11/23/09 16:43:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/EngineBase.cs
r2474 r2526 127 127 /// Clones the current instance (deep clone). 128 128 /// </summary> 129 /// <remarks>Deep clone through <see cref=" Auxiliary.Clone"/> method of helper class129 /// <remarks>Deep clone through <see cref="cloner.Clone"/> method of helper class 130 130 /// <see cref="Auxiliary"/>.</remarks> 131 131 /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param> 132 132 /// <returns>The cloned object as <see cref="EngineBase"/>.</returns> 133 public override object Clone(IDictionary<Guid, object> clonedObjects) {134 EngineBase clone = (EngineBase)base.Clone(clone dObjects);135 clone.myOperatorGraph = (IOperatorGraph) Auxiliary.Clone(OperatorGraph, clonedObjects);136 clone.myGlobalScope = (IScope) Auxiliary.Clone(GlobalScope, clonedObjects);133 public override IItem Clone(ICloner cloner) { 134 EngineBase clone = (EngineBase)base.Clone(cloner); 135 clone.myOperatorGraph = (IOperatorGraph)cloner.Clone(OperatorGraph); 136 clone.myGlobalScope = (IScope)cloner.Clone(GlobalScope); 137 137 clone.myExecutionTime = ExecutionTime; 138 138 IOperation[] operations = new IOperation[ExecutionStack.Count]; 139 139 ExecutionStack.CopyTo(operations, 0); 140 140 for (int i = operations.Length - 1; i >= 0; i--) 141 clone.myExecutionStack.Push((IOperation) Auxiliary.Clone(operations[i], clonedObjects));141 clone.myExecutionStack.Push((IOperation)cloner.Clone(operations[i])); 142 142 clone.myRunning = Running; 143 143 clone.myCanceled = Canceled;
Note: See TracChangeset
for help on using the changeset viewer.