Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1840


Ignore:
Timestamp:
05/15/09 19:11:47 (15 years ago)
Author:
swagner
Message:

Removed automatic creation of model in ChartDataRowsModelDataCollector (#408)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/3.2/ChartDataRowsModelDataCollector.cs

    r1530 r1840  
    3939    /// <summary>
    4040    /// Initializes a new instance of <see cref="ChartDataRowsModelDataCollector"/> with two variable infos
    41     /// (<c>VariableNames</c> and <c>Values</c>).
     41    /// (<c>VariableNames</c> and <c>Model</c>).
    4242    /// </summary>
    4343    public ChartDataRowsModelDataCollector() {
     
    4747      ItemList<StringData> variableNames = new ItemList<StringData>();
    4848      AddVariable(new Variable("VariableNames", variableNames));
    49       AddVariableInfo(new VariableInfo("Model", "Data model in which the collected values should be fed.", typeof(IChartDataRowsModel), VariableKind.New | VariableKind.In | VariableKind.Out));
     49      AddVariableInfo(new VariableInfo("Model", "Data model in which the collected values should be fed.", typeof(IChartDataRowsModel), VariableKind.In | VariableKind.Out));
    5050    }
    5151
     
    5959      IChartDataRowsModel model = GetVariableValue<IChartDataRowsModel>("Model", scope, true, false);
    6060
    61       // if necessary, add a new model
    62       if (model == null) {
    63         model = new ChartDataRowsModel();
    64         for (int i = 0; i < names.Count; i++)
    65           model.AddDataRow(new DataRow(names[i].Data));  // create new data row for each variable name to collect
    66 
    67         IVariableInfo info = GetVariableInfo("Model");
    68         if (info.Local)
    69           AddVariable(new Variable(info.ActualName, model));
    70         else
    71           scope.AddVariable(new Variable(scope.TranslateName(info.FormalName), model));
    72       }
    73 
    7461      // collect data values and feed them into the model
    7562      for (int i = 0; i < names.Count; i++) {
Note: See TracChangeset for help on using the changeset viewer.