Changeset 40 for trunk/sources/HeuristicLab.Evolutionary
- Timestamp:
- 03/05/08 02:08:02 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Evolutionary/SubScopesStorer.cs
r2 r40 36 36 : base() { 37 37 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)); 39 39 } 40 40 41 41 public override IOperation Apply(IScope scope) { 42 42 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); 44 44 45 45 if (subScopesStore == null) { 46 subScopesStore = new ItemList(); 47 subScopesStore.ItemType = typeof(IScope); 46 subScopesStore = new ItemList<IScope>(); 48 47 IVariableInfo info = GetVariableInfo("SubScopesStore"); 49 48 if (info.Local) … … 60 59 // restore sub-scopes 61 60 for (int i = 0; i < subScopesStore.Count; i++) { 62 right.AddSubScope( (IScope)subScopesStore[i]);61 right.AddSubScope(subScopesStore[i]); 63 62 IVariableInfo info = GetVariableInfo("SubScopesStore"); 64 63 if (info.Local)
Note: See TracChangeset
for help on using the changeset viewer.