Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 18:55:22 (14 years ago)
Author:
gkronber
Message:

Refactored cloning in SymbolicExpressionTreeEncoding. #922

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunctionTreeNode.cs

    r3484 r4674  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2425namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
     
    3435    }
    3536
    36     private InvokeFunctionTreeNode() : base() { }
    37 
    38     // copy constructor
    39     private InvokeFunctionTreeNode(InvokeFunctionTreeNode original)
    40       : base(original) {
    41     }
    42 
     37    [StorableConstructor]
     38    private InvokeFunctionTreeNode(bool deserializing) : base(deserializing) { }
     39    protected InvokeFunctionTreeNode(InvokeFunctionTreeNode original, Cloner cloner) : base(original, cloner) { }
    4340    public InvokeFunctionTreeNode(InvokeFunction invokeSymbol) : base(invokeSymbol) { }
    4441
    45     public override object Clone() {
    46       return new InvokeFunctionTreeNode(this);
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new InvokeFunctionTreeNode(this, cloner);
    4744    }
    4845  }
Note: See TracChangeset for help on using the changeset viewer.