Changeset 5735 for branches/VNS/HeuristicLab.Operators
- Timestamp:
- 03/17/11 14:35:58 (13 years ago)
- Location:
- branches/VNS/HeuristicLab.Operators/3.3
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VNS/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj
r5351 r5735 124 124 <SubType>Code</SubType> 125 125 </Compile> 126 <Compile Include="SubScopesCloner.cs" /> 126 127 <Compile Include="SubScopesCounter.cs" /> 127 128 <Compile Include="SubScopesCreator.cs" /> -
branches/VNS/HeuristicLab.Operators/3.3/ScopeCleaner.cs
r5609 r5735 39 39 get { return CurrentScopeParameter.ActualValue; } 40 40 } 41 public ValueParameter<BoolValue> ClearSubScopesParameter {42 get { return (ValueParameter<BoolValue>)Parameters["ClearSubScopes"]; }43 }44 45 [StorableHook(HookType.AfterDeserialization)]46 private void AfterDeserializationHook() {47 #region Backwards Compatibility48 if (!Parameters.ContainsKey("ClearSubScopes")) {49 Parameters.Add(new ValueParameter<BoolValue>("ClearSubScopes", "Indicates, if the subscopes should be cleared.", new BoolValue(false)));50 }51 #endregion52 }53 41 54 42 [StorableConstructor] … … 58 46 } 59 47 public ScopeCleaner() 60 : base() { 48 : base() { 61 49 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope whose variables and sub-scopes should be removed.")); 62 Parameters.Add(new ValueParameter<BoolValue>("ClearSubScopes", "Indicates, if the subscopes should be cleared.", new BoolValue(false)));63 50 } 64 51 … … 69 56 public override IOperation Apply() { 70 57 CurrentScope.Variables.Clear(); 71 if(ClearSubScopesParameter.Value.Value) 72 CurrentScope.SubScopes.Clear(); 58 CurrentScope.SubScopes.Clear(); 73 59 return base.Apply(); 74 60 }
Note: See TracChangeset
for help on using the changeset viewer.