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/Counter.cs

    r1530 r2027  
    4343    public Counter()
    4444      : base() {
    45       AddVariableInfo(new VariableInfo("Value", "Counter value", typeof(IntData), VariableKind.In | VariableKind.Out));
     45      AddParameter(new Parameter("Value", "Counter value", typeof(IntData), ParameterType.InOut));
    4646    }
    4747
     
    5151    /// <param name="scope">The scope whose variable should be incremented.</param>
    5252    /// <returns><c>null</c>.</returns>
    53     public override IOperation Apply(IScope scope) {
    54       IntData value = GetVariableValue<IntData>("Value", scope, true);
     53    public override IOperation Apply(IEnvironment env, IScope scope) {
     54      IntData value = scope.GetVariableValue<IntData>(env.TranslateName("Value"), true);
    5555      value.Data++;
    5656      return null;
Note: See TracChangeset for help on using the changeset viewer.