Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/06/09 02:09:35 (15 years ago)
Author:
swagner
Message:

Refactoring of the operator architecture (#95)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Operator Architecture Refactoring/HeuristicLab.Operators/3.2/DoubleCounter.cs

    r1530 r2027  
    4444    public DoubleCounter()
    4545      : base() {
    46       AddVariableInfo(new VariableInfo("Value", "Counter value", typeof(DoubleData), VariableKind.In | VariableKind.Out));
    47       AddVariableInfo(new VariableInfo("Interval", "Interval value", typeof(DoubleData), VariableKind.In));
     46      AddParameter(new Parameter("Value", "Counter value", typeof(DoubleData), ParameterType.InOut));
     47      AddParameter(new Parameter("Interval", "Interval value", typeof(DoubleData), ParameterType.In));
    4848    }
    4949
     
    5353    /// <param name="scope">The scope whose variable should be incremented.</param>
    5454    /// <returns><c>null</c>.</returns>
    55     public override IOperation Apply(IScope scope) {
    56       DoubleData value = GetVariableValue<DoubleData>("Value", scope, true);
    57       double interval = GetVariableValue<DoubleData>("Interval", scope, true).Data;
     55    public override IOperation Apply(IEnvironment env, IScope scope) {
     56      DoubleData value = scope.GetVariableValue<DoubleData>(env.TranslateName("Value"), true);
     57      double interval = scope.GetVariableValue<DoubleData>(env.TranslateName("Interval"), true).Data;
    5858      value.Data += interval;
    5959      return null;
Note: See TracChangeset for help on using the changeset viewer.