Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 19:26:56 (13 years ago)
Author:
gkronber
Message:

Refactored cloning in DataAnalysis plugins. #922

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs

    r4068 r4678  
    7777    }
    7878    #endregion
     79    [StorableConstructor]
     80    protected Constant(bool deserializing) : base(deserializing) { }
     81    protected Constant(Constant original, Cloner cloner)
     82      : base(original, cloner) {
     83      minValue = original.minValue;
     84      maxValue = original.maxValue;
     85      manipulatorNu = original.manipulatorNu;
     86      manipulatorSigma = original.manipulatorSigma;
     87    }
    7988    public Constant()
    8089      : base("Constant", "Represents a constant value.") {
     
    8998    }
    9099
    91     public override IDeepCloneable Clone(Cloner cloner) {
    92       Constant clone = (Constant)base.Clone(cloner);
    93       clone.minValue = minValue;
    94       clone.maxValue = maxValue;
    95       clone.manipulatorNu = manipulatorNu;
    96       clone.manipulatorSigma = manipulatorSigma;
    97       return clone;
     100    public override IDeepCloneable Clone(Cloner clone) {
     101      return new Constant(this, cloner);
    98102    }
    99103  }
Note: See TracChangeset for help on using the changeset viewer.