Changeset 6017 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurations
- Timestamp:
- 04/17/11 11:03:48 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurations/ParameterConfiguration.cs
r5927 r6017 138 138 protected IItemSet<IItem> validValues; 139 139 140 [Storable] 141 private bool autoPopulateValueConfigurations = true; 142 public bool AutoPopulateValueConfigurations { 143 get { return autoPopulateValueConfigurations; } 144 set { autoPopulateValueConfigurations = value; } 145 } 146 147 140 148 #region Constructors and Cloning 141 149 public ParameterConfiguration(string parameterName, IValueParameter valueParameter, bool discoverValidValues) { 150 this.AutoPopulateValueConfigurations = true; 142 151 this.ParameterName = parameterName; 143 152 this.parameterDataType = valueParameter.GetType(); … … 162 171 } 163 172 public ParameterConfiguration(string parameterName, Type type, IItem actualValue, IEnumerable<IValueConfiguration> valueConfigurations) { 173 this.AutoPopulateValueConfigurations = false; 164 174 this.ParameterName = parameterName; 165 175 this.parameterDataType = type; … … 174 184 } 175 185 public ParameterConfiguration(string parameterName, Type type, IItem actualValue) { 186 this.AutoPopulateValueConfigurations = true; 176 187 this.ParameterName = parameterName; 177 188 this.parameterDataType = type; … … 206 217 this.discoverValidValues = original.discoverValidValues; 207 218 if (this.valueConfigurations != null) RegisterValueConfigurationEvents(); 219 this.AutoPopulateValueConfigurations = original.AutoPopulateValueConfigurations; 208 220 } 209 221 … … 238 250 239 251 protected virtual void PopulateValueConfigurations() { 252 if (!this.AutoPopulateValueConfigurations) 253 return; 254 240 255 foreach (Type t in this.validTypes) { 241 256 if (t == typeof(NullValue)) { … … 266 281 267 282 protected virtual void ClearValueConfigurations() { 283 if (!this.AutoPopulateValueConfigurations) 284 return; 285 268 286 this.ValueConfigurations.Clear(); 269 287 }
Note: See TracChangeset
for help on using the changeset viewer.