Free cookie consent management tool by TermsFeed Policy Generator

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

Refactored cloning (#806)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/OperatorLibrary.cs

    r2520 r2526  
    5151    /// Clones the current instance (deep clone).
    5252    /// </summary>
    53     /// <remarks>Deep clone through <see cref="Auxiliary.Clone"/> method of helper class
     53    /// <remarks>Deep clone through <see cref="cloner.Clone"/> method of helper class
    5454    /// <see cref="Auxiliary"/>.</remarks>
    5555    /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param>
    5656    /// <returns>The cloned object as <see cref="OperatorLibrary"/>.</returns>
    57     public override object Clone(IDictionary<Guid, object> clonedObjects) {
     57    public override IItem Clone(ICloner cloner) {
    5858      OperatorLibrary clone = new OperatorLibrary();
    59       clonedObjects.Add(Guid, clone);
    60       clone.myGroup = (IOperatorGroup)Auxiliary.Clone(Group, clonedObjects);
     59      cloner.RegisterClonedObject(this, clone);
     60      clone.myGroup = (IOperatorGroup)cloner.Clone(Group);
    6161      return clone;
    6262    }
Note: See TracChangeset for help on using the changeset viewer.