Changeset 4659


Ignore:
Timestamp:
10/29/10 14:55:54 (9 years ago)
Author:
swagner
Message:

Finished cloning refactoring of Item (#922)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Core/3.3/Item.cs

    r4477 r4659  
    4545    }
    4646
    47     protected Item() { }
    4847    [StorableConstructor]
    4948    protected Item(bool deserializing) { }
     49    protected Item(Item original, Cloner cloner) {
     50      cloner.RegisterClonedObject(original, this);
     51    }
     52    protected Item() { }
    5053
    5154    public object Clone() {
    5255      return Clone(new Cloner());
    5356    }
    54     public virtual IDeepCloneable Clone(Cloner cloner) {
    55       Item clone = (Item)Activator.CreateInstance(this.GetType(), true);
    56       cloner.RegisterClonedObject(this, clone);
    57       return clone;
    58     }
     57    public abstract IDeepCloneable Clone(Cloner cloner);
    5958
    6059    /// <summary>
Note: See TracChangeset for help on using the changeset viewer.