Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/23/09 16:43:34 (14 years ago)
Author:
swagner
Message:

Refactored cloning (#806)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/3.3/ObjectData.cs

    r1842 r2526  
    5252    /// Clones the current instance.
    5353    /// </summary>
    54     /// <remarks>HeuristicLab data items are cloned with the <see cref="HeuristicLab.Core.Auxiliary.Clone"/> method of
     54    /// <remarks>HeuristicLab data items are cloned with the <see cref="HeuristicLab.Core.cloner.Clone"/> method of
    5555    /// class <see cref="Auxiliary"/> (deep copy), all other items (like basic data types)
    5656    /// are cloned with their own <c>Clone</c> methods (shadow copy).</remarks>
     
    5858    /// <param name="clonedObjects">A dictionary of all already cloned objects.</param>
    5959    /// <returns>The clone instance.</returns>
    60     public override object Clone(IDictionary<Guid, object> clonedObjects) {
    61       ObjectData clone = (ObjectData)base.Clone(clonedObjects);
    62       if (Data is IStorable)
    63         clone.myData = Auxiliary.Clone((IStorable)Data, clonedObjects);
     60    public override IItem Clone(ICloner cloner) {
     61      ObjectData clone = (ObjectData)base.Clone(cloner);
     62      if (Data is IItem)
     63        clone.myData = cloner.Clone((IItem)Data);
    6464      else if (Data is ICloneable)
    6565        clone.myData = ((ICloneable)Data).Clone();
Note: See TracChangeset for help on using the changeset viewer.