Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/10 04:43:06 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on parameters and operators
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators/3.3/SequentialProcessor.cs

    r2684 r2740  
    3636  [Creatable("Test")]
    3737  [EmptyStorableClass]
    38   public sealed class SequentialProcessor : Operator, IOperator {
    39     public new ParameterCollection Parameters {
    40       get {
    41         return base.Parameters;
    42       }
    43     }
    44     IObservableKeyedCollection<string, IParameter> IOperator.Parameters {
    45       get { return Parameters; }
    46     }
    47 
     38  public sealed class SequentialProcessor : MultipleSuccessorsOperator {
    4839    public SequentialProcessor()
    4940      : base() {
    5041    }
    5142
    52     public override ExecutionContextCollection Apply(ExecutionContext context) {
     43    public override ExecutionContextCollection Apply() {
    5344      ExecutionContextCollection next = new ExecutionContextCollection();
    54       foreach (IParameter param in Parameters) {
    55         IOperatorParameter opParam = param as IOperatorParameter;
    56         if (opParam != null) {
    57           IOperator op = (IOperator)opParam.GetValue(context);
    58           if (op != null) next.Add(new ExecutionContext(context.Parent, op, context.Scope));
    59         }
    60       }
     45      for (int i = 0; i < Successors.Count; i++)
     46        next.Add(new ExecutionContext(ExecutionContext.Parent, Successors[i], ExecutionContext.Scope));
    6147      return next;
    6248    }
Note: See TracChangeset for help on using the changeset viewer.