Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/08 02:08:02 (16 years ago)
Author:
swagner
Message:

Worked on ticket #41

  • added generic ItemList<T>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Evolutionary/SubScopesStorer.cs

    r2 r40  
    3636      : base() {
    3737      AddVariableInfo(new VariableInfo("SubScopes", "Number of sub-scopes that should be available", typeof(IntData), VariableKind.In));
    38       AddVariableInfo(new VariableInfo("SubScopesStore", "Temporarily stored sub-scopes", typeof(ItemList), VariableKind.New | VariableKind.In | VariableKind.Out | VariableKind.Deleted));
     38      AddVariableInfo(new VariableInfo("SubScopesStore", "Temporarily stored sub-scopes", typeof(ItemList<IScope>), VariableKind.New | VariableKind.In | VariableKind.Out | VariableKind.Deleted));
    3939    }
    4040
    4141    public override IOperation Apply(IScope scope) {
    4242      IntData subScopes = GetVariableValue<IntData>("SubScopes", scope, true);
    43       ItemList subScopesStore = GetVariableValue<ItemList>("SubScopesStore", scope, false);
     43      ItemList<IScope> subScopesStore = GetVariableValue<ItemList<IScope>>("SubScopesStore", scope, false);
    4444
    4545      if (subScopesStore == null) {
    46         subScopesStore = new ItemList();
    47         subScopesStore.ItemType = typeof(IScope);
     46        subScopesStore = new ItemList<IScope>();
    4847        IVariableInfo info = GetVariableInfo("SubScopesStore");
    4948        if (info.Local)
     
    6059        // restore sub-scopes
    6160        for (int i = 0; i < subScopesStore.Count; i++) {
    62           right.AddSubScope((IScope)subScopesStore[i]);
     61          right.AddSubScope(subScopesStore[i]);
    6362          IVariableInfo info = GetVariableInfo("SubScopesStore");
    6463          if (info.Local)
Note: See TracChangeset for help on using the changeset viewer.