Changeset 11003


Ignore:
Timestamp:
06/11/14 15:43:41 (8 years ago)
Author:
mleitner
Message:

Refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/FilteredPreprocessingData.cs

    r10999 r11003  
    7676    public void SetCell<T>(int columnIndex, int rowIndex, T value) {
    7777      if (IsFiltered)
    78         throw new InvalidOperationException("SetCell not possible while data is filtered");
    79 
     78        throw new InvalidOperationException("SetValues not possible while data is filtered");
    8079      originalData.SetCell<T>(columnIndex, rowIndex, value);
    8180    }
     
    183182    }
    184183
    185     public void Undo() {
    186       if (IsFiltered)
    187         throw new InvalidOperationException("Undo not possible while data is filtered");
    188 
    189       originalData.Undo();
    190     }
    191 
    192     public void InTransaction(Action action, DataPreprocessingChangedEventType type = DataPreprocessingChangedEventType.Any) {
    193       if (IsFiltered)
    194         throw new InvalidOperationException("Transaction not possible while data is filtered");
    195       originalData.InTransaction(action, type);
    196     }
    197 
    198     public void BeginTransaction(DataPreprocessingChangedEventType type) {
    199       if (IsFiltered)
    200         throw new InvalidOperationException("Transaction not possible while data is filtered");
    201       originalData.BeginTransaction(type);
    202     }
    203 
    204     public void EndTransaction() {
    205       originalData.EndTransaction();
    206     }
    207 
    208     public IEnumerable<string> GetDoubleVariableNames() {
    209       return originalData.GetDoubleVariableNames();
    210     }
    211 
    212     public void ClearSelection() {
    213       originalData.ClearSelection();
    214     }
    215 
    216184    public event DataPreprocessingChangedEventHandler Changed {
    217185      add { originalData.Changed += value; }
     
    219187    }
    220188
     189    public bool SetValue(string value, int columnIndex, int rowIndex) {
     190      if (IsFiltered)
     191        throw new InvalidOperationException("SetValue not possible while data is filtered");
     192      return originalData.SetValue(value, columnIndex, rowIndex);
     193    }
     194
     195    public bool AreAllStringColumns(IEnumerable<int> columnIndices) {
     196      return originalData.AreAllStringColumns(columnIndices);
     197    }
     198
     199    public void DeleteRowsWithIndices(IEnumerable<int> rows) {
     200      if (IsFiltered)
     201        throw new InvalidOperationException("DeleteRowsWithIndices not possible while data is filtered");
     202
     203      originalData.DeleteRowsWithIndices(rows);
     204    }
     205
     206    public void Undo() {
     207      if (IsFiltered)
     208        throw new InvalidOperationException("Undo not possible while data is filtered");
     209
     210      originalData.Undo();
     211    }
     212
     213    public void InTransaction(Action action, DataPreprocessingChangedEventType type = DataPreprocessingChangedEventType.Any) {
     214      if (IsFiltered)
     215        throw new InvalidOperationException("Transaction not possible while data is filtered");
     216      originalData.InTransaction(action, type);
     217    }
     218
     219    public void BeginTransaction(DataPreprocessingChangedEventType type) {
     220      if (IsFiltered)
     221        throw new InvalidOperationException("Transaction not possible while data is filtered");
     222      originalData.BeginTransaction(type);
     223    }
     224
     225    public void EndTransaction() {
     226      originalData.EndTransaction();
     227    }
     228
     229    public IEnumerable<string> GetDoubleVariableNames() {
     230      return originalData.GetDoubleVariableNames();
     231    }
     232
     233    public void ClearSelection() {
     234      originalData.ClearSelection();
     235    }
     236
    221237    public event EventHandler SelectionChanged {
    222238      add { originalData.SelectionChanged += value; }
     
    224240    }
    225241
     242    #region IPreprocessingData Members
     243
     244    public bool Validate(string value, out string errorMessage, int columnIndex) {
     245      return originalData.Validate(value, out errorMessage, columnIndex);
     246    }
     247
    226248    public event EventHandler FilterChanged;
     249    #endregion
    227250  }
    228251}
Note: See TracChangeset for help on using the changeset viewer.