Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/GenericWrapper.cs @ 8213

Last change on this file since 8213 was 8213, checked in by bburlacu, 12 years ago

#1772: Performance improvements for the GenealogyGraph. Minor refactoring to VisualGenealogyGraphArc and VisualGenealogyGraphNode classes. Added new functionality to the SymbolicExpressionTreeFragmentsAnalyzer, minor refactoring in the other two analyzers. Refactored View code. Updated project references and plugin dependencies and added HeuristicLab.Problems.DataAnalysis.Symbolic to the branch.

File size: 854 bytes
Line 
1using HeuristicLab.Common;
2using HeuristicLab.Core;
3using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
4
5namespace HeuristicLab.EvolutionaryTracking {
6  [Item("Generic wrapper", "Wrapper class for non-item HeuristicLab objects")]
7  [StorableClass]
8  public class GenericWrapper<T> : NamedItem where T : class {
9    public T Content { get; private set; }
10
11    private GenericWrapper() {
12    }
13
14    public GenericWrapper(T content) {
15      Content = content;
16    }
17
18    [StorableConstructor]
19    protected GenericWrapper(bool serializing)
20      : base(serializing) {
21    }
22
23    private GenericWrapper(GenericWrapper<T> original, Cloner cloner)
24      : base(original, cloner) {
25    }
26
27    public override IDeepCloneable Clone(Cloner cloner) {
28      return new GenericWrapper<T>(this, cloner);
29    }
30  }
31}
Note: See TracBrowser for help on using the repository browser.