Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 15:59:12 (13 years ago)
Author:
abeham
Message:

#922

  • Refactored HeuristicLab.Data
  • Refactored HeuristicLab.Operators
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Data/3.3/StringMatrix.cs

    r3431 r4662  
    134134    }
    135135
     136    [StorableConstructor]
     137    protected StringMatrix(bool deserializing) : base(deserializing) { }
     138    protected StringMatrix(StringMatrix original, Cloner cloner)
     139      : base(original, cloner) {
     140      this.matrix = (string[,])original.matrix.Clone();
     141      this.columnNames = new List<string>(original.columnNames);
     142      this.rowNames = new List<string>(original.rowNames);
     143      this.sortableView = original.sortableView;
     144      this.readOnly = original.readOnly;
     145    }
    136146    public StringMatrix() {
    137147      matrix = new string[0, 0];
     
    182192
    183193    public override IDeepCloneable Clone(Cloner cloner) {
    184       StringMatrix clone = new StringMatrix();
    185       cloner.RegisterClonedObject(this, clone);
    186       clone.matrix = (string[,])matrix.Clone();
    187       clone.columnNames = new List<string>(columnNames);
    188       clone.rowNames = new List<string>(rowNames);
    189       clone.sortableView = sortableView;
    190       clone.readOnly = readOnly;
    191       return clone;
     194      return new StringMatrix(this, cloner);
    192195    }
    193196
Note: See TracChangeset for help on using the changeset viewer.