- Timestamp:
- 12/02/08 21:10:17 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactorBranch/HeuristicLab.Logging/Log.cs
r2 r887 41 41 } 42 42 43 /// <summary> 44 /// Copy constructor to create deep clones. 45 /// </summary> 46 /// <param name="original">The instance to be cloned.</param> 47 public Log(Log original) : this(original, new Dictionary<Guid, object>()) { } 48 /// <summary> 49 /// Copy constructor for DistributedEngine clones (deep clone) reusing already cloned object references 50 /// </summary> 51 /// <remarks>Calls the copy constructor of the base class <see cref="EngineBase"/></remarks> 52 /// <param name="original">Instance to be cloned</param> 53 /// <param name="clonedObjects">Already cloned object reference</param> 54 protected Log(Log original, IDictionary<Guid, object> clonedObjects) 55 : base(original, clonedObjects) { 56 this.myItems = (ItemList)Auxiliary.Clone(original.Items, clonedObjects); 57 } 43 58 59 /// <summary> 60 /// Creates a deep clone with the copy constructor reusing already cloned 61 /// object references. 62 /// </summary> 63 /// <param name="clonedObjects">Already cloned objects (for referential integrity).</param> 64 /// <returns>The cloned instance.</returns> 44 65 public override object Clone(IDictionary<Guid, object> clonedObjects) { 45 Log clone = (Log)base.Clone(clonedObjects); 46 clone.myItems = (ItemList)Auxiliary.Clone(Items, clonedObjects); 47 return clone; 66 return new Log(this, clonedObjects); 48 67 } 49 68
Note: See TracChangeset
for help on using the changeset viewer.