- Timestamp:
- 12/02/08 21:10:17 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactorBranch/HeuristicLab.Logging/Linechart.cs
r2 r887 59 59 } 60 60 61 /// <summary> 62 /// Copy constructor to create deep clones. 63 /// </summary> 64 /// <param name="original">The instance to be cloned.</param> 65 public Linechart(Linechart original) : this(original, new Dictionary<Guid, object>()) { } 61 66 67 68 /// <summary> 69 /// Copy constructor for DistributedEngine clones (deep clone) reusing already cloned object references 70 /// </summary> 71 /// <remarks>Calls the copy constructor of the base class <see cref="EngineBase"/></remarks> 72 /// <param name="original">Instance to be cloned</param> 73 /// <param name="clonedObjects">Already cloned object reference</param> 74 protected Linechart(Linechart original, IDictionary<Guid, object> clonedObjects) 75 : base(original, clonedObjects) { 76 this.myNumberOfLines = (IntData)Auxiliary.Clone(original.myNumberOfLines,clonedObjects); 77 this.myValues = (ItemList)Auxiliary.Clone(original.Values, clonedObjects); 78 } 79 80 /// <summary> 81 /// Creates a deep clone with the copy constructor reusing already cloned 82 /// object references. 83 /// </summary> 84 /// <param name="clonedObjects">Already cloned objects (for referential integrity).</param> 85 /// <returns>The cloned instance.</returns> 62 86 public override object Clone(IDictionary<Guid, object> clonedObjects) { 63 Linechart clone = (Linechart)base.Clone(clonedObjects); 64 clone.myNumberOfLines = (IntData)Auxiliary.Clone(myNumberOfLines, clonedObjects); 65 clone.myValues = (ItemList)Auxiliary.Clone(Values, clonedObjects); 66 return clone; 87 return new Linechart(this, clonedObjects); 67 88 } 68 89
Note: See TracChangeset
for help on using the changeset viewer.