Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (13 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/ConstantTreeNode.cs

    r4089 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3940    }
    4041
    41     private ConstantTreeNode() : base() { }
    42 
    43     // copy constructor
    44     private ConstantTreeNode(ConstantTreeNode original)
    45       : base(original) {
    46       constantValue = original.constantValue;
     42    [StorableConstructor]
     43    private ConstantTreeNode(bool deserializing) : base(deserializing) { }
     44    private ConstantTreeNode(ConstantTreeNode original, Cloner cloner)
     45      : base(original, cloner) {
     46    }
     47    public override IDeepCloneable Clone(Cloner cloner) {
     48      return new ConstantTreeNode(this, cloner);
    4749    }
    4850
     
    6769    }
    6870
    69     public override object Clone() {
    70       return new ConstantTreeNode(this);
    71     }
    72 
    7371    public override string ToString() {
    7472      return ";" + constantValue.ToString("E4");
Note: See TracChangeset for help on using the changeset viewer.