Changeset 2526 for trunk/sources/HeuristicLab.Operators
- Timestamp:
- 11/23/09 16:43:34 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs
r2520 r2526 87 87 /// (System.Collections.Generic.IDictionary<System.Guid, object>)"/> 88 88 /// of base class <see cref="DelegatingOperator"/>.<br/> 89 /// Deep clone through <see cref=" Auxiliary.Clone"/> method of helper class89 /// Deep clone through <see cref="cloner.Clone"/> method of helper class 90 90 /// <see cref="Auxiliary"/>.</remarks> 91 91 /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param> 92 92 /// <returns>The cloned object as <see cref="CombinedOperator"/>.</returns> 93 public override object Clone(IDictionary<Guid, object> clonedObjects) {94 CombinedOperator clone = (CombinedOperator)base.Clone(clone dObjects);93 public override IItem Clone(ICloner cloner) { 94 CombinedOperator clone = (CombinedOperator)base.Clone(cloner); 95 95 clone.myDescription = Description; 96 clone.myOperatorGraph = (IOperatorGraph) Auxiliary.Clone(OperatorGraph, clonedObjects);96 clone.myOperatorGraph = (IOperatorGraph)cloner.Clone(OperatorGraph); 97 97 return clone; 98 98 } -
trunk/sources/HeuristicLab.Operators/3.3/DelegatingOperator.cs
r1530 r2526 31 31 /// </summary> 32 32 public abstract class DelegatingOperator : OperatorBase { 33 private Guid myGuid; 34 protected Guid Guid { 35 get { return myGuid; } 36 } 37 38 protected DelegatingOperator() 39 : base() { 40 myGuid = Guid.NewGuid(); 41 } 42 43 public override IItem Clone(ICloner cloner) { 44 DelegatingOperator clone = (DelegatingOperator)base.Clone(cloner); 45 clone.myGuid = Guid; 46 return clone; 47 } 48 33 49 /// <summary> 34 50 /// Executes the specified operator in the given <paramref name="scope"/>. -
trunk/sources/HeuristicLab.Operators/3.3/VariableInjector.cs
r2520 r2526 53 53 /// Clones the current instance (deep clone). 54 54 /// </summary> 55 /// <remarks>Deep clone performed with <see cref=" Auxiliary.Clone"/> of helper class55 /// <remarks>Deep clone performed with <see cref="cloner.Clone"/> of helper class 56 56 /// <see cref="Auxiliary"/>.</remarks> 57 57 /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param> 58 58 /// <returns>The cloned object as <see cref="VariableInjector"/>.</returns> 59 public override object Clone(IDictionary<Guid, object> clonedObjects) {59 public override IItem Clone(ICloner cloner) { 60 60 VariableInjector clone = new VariableInjector(); 61 clone dObjects.Add(Guid, clone);61 cloner.RegisterClonedObject(this, clone); 62 62 clone.Name = Name; 63 63 foreach (IVariable variable in Variables) 64 clone.AddVariable((IVariable) Auxiliary.Clone(variable, clonedObjects));64 clone.AddVariable((IVariable)cloner.Clone(variable)); 65 65 return clone; 66 66 }
Note: See TracChangeset
for help on using the changeset viewer.