Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/19/17 14:32:57 (7 years ago)
Author:
pfleck
Message:

#2809:

  • Removed FilterLogic.
  • Made Contents storable and implemented proper cloning.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs

    r15210 r15274  
    2929using HeuristicLab.Core;
    3030using HeuristicLab.Data;
     31using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3132
    3233namespace HeuristicLab.DataPreprocessing {
    3334  [Item("PreprocessingChart", "Represents a preprocessing chart.")]
    34   public class PreprocessingChartContent : Item, IViewShortcut {
     35  [StorableClass]
     36  public class PreprocessingChartContent : PreprocessingContent, IViewShortcut {
    3537    public enum LegendOrder {
    3638      Alphabetically,
     
    4244    }
    4345
    44     private ICheckedItemList<StringValue> variableItemList = null;
     46    [Storable]
     47    private ICheckedItemList<StringValue> variableItemList;
    4548    public ICheckedItemList<StringValue> VariableItemList {
    4649      get {
    4750        if (variableItemList == null)
    4851          variableItemList = CreateVariableItemList(PreprocessingData);
    49         return this.variableItemList;
     52        return variableItemList;
    5053      }
    5154    }
    5255
    53     public IFilteredPreprocessingData PreprocessingData { get; private set; }
    5456    public event DataPreprocessingChangedEventHandler Changed {
    5557      add { PreprocessingData.Changed += value; }
     
    5759    }
    5860
    59     public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) {
    60       PreprocessingData = preprocessingData;
     61    #region Constructor, Cloning & Persistence
     62    public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData)
     63       : base(preprocessingData) {
    6164    }
    6265
    63     public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner)
    64       : base(content, cloner) {
    65       this.PreprocessingData = content.PreprocessingData;
    66       this.variableItemList = cloner.Clone<ICheckedItemList<StringValue>>(variableItemList);
     66    public PreprocessingChartContent(PreprocessingChartContent original, Cloner cloner)
     67      : base(original, cloner) {
     68      variableItemList = cloner.Clone(original.variableItemList);
    6769    }
    6870    public override IDeepCloneable Clone(Cloner cloner) {
    6971      return new PreprocessingChartContent(this, cloner);
    7072    }
     73
     74    [StorableConstructor]
     75    protected PreprocessingChartContent(bool deserializing)
     76      : base(deserializing) { }
     77    #endregion
    7178
    7279    public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
Note: See TracChangeset for help on using the changeset viewer.