Changeset 16875 for trunk/HeuristicLab.Parameters
- Timestamp:
- 04/29/19 15:22:17 (5 years ago)
- Location:
- trunk/HeuristicLab.Parameters/3.3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Parameters/3.3/ConstrainedValueParameter.cs
r16565 r16875 22 22 using System; 23 23 using System.Linq; 24 using HEAL.Attic; 24 25 using HeuristicLab.Collections; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; 27 using HEAL.Attic;28 28 29 29 namespace HeuristicLab.Parameters { … … 47 47 public ConstrainedValueParameter() : base() { } 48 48 public ConstrainedValueParameter(string name) : base(name) { } 49 public ConstrainedValueParameter(string name, bool getsCollected) : base(name, getsCollected) { }50 49 public ConstrainedValueParameter(string name, ItemSet<T> validValues) : base(name, validValues) { } 51 public ConstrainedValueParameter(string name, ItemSet<T> validValues, bool getsCollected) : base(name, validValues, getsCollected) { }52 50 public ConstrainedValueParameter(string name, ItemSet<T> validValues, T value) : base(name, validValues, value) { } 53 public ConstrainedValueParameter(string name, ItemSet<T> validValues, T value, bool getsCollected) : base(name, validValues, value, getsCollected) { }54 51 public ConstrainedValueParameter(string name, string description) : base(name, description) { } 55 public ConstrainedValueParameter(string name, string description, bool getsCollected) : base(name, description, getsCollected) { }56 52 public ConstrainedValueParameter(string name, string description, ItemSet<T> validValues) : base(name, description, validValues) { } 57 public ConstrainedValueParameter(string name, string description, ItemSet<T> validValues, bool getsCollected) : base(name, description, validValues, getsCollected) { }58 53 public ConstrainedValueParameter(string name, string description, ItemSet<T> validValues, T value) : base(name, description, validValues, value) { } 59 public ConstrainedValueParameter(string name, string description, ItemSet<T> validValues, T value, bool getsCollected) : base(name, description, validValues, value, getsCollected) { }60 54 61 55 public override IDeepCloneable Clone(Cloner cloner) { -
trunk/HeuristicLab.Parameters/3.3/FixedValueParameter.cs
r16565 r16875 21 21 22 22 using System; 23 using HEAL.Attic; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 using HEAL.Attic;26 26 27 27 namespace HeuristicLab.Parameters { … … 31 31 [Item("FixedValueParameter", "A parameter whose value is defined in the parameter itself and cannot be set.")] 32 32 [StorableType("7787B99D-5F32-4639-B47A-76CB4D204392")] 33 public class FixedValueParameter<T> : ValueParameter<T>, IFixedValueParameter<T> where T : class, IItem, new() {33 public class FixedValueParameter<T> : ValueParameter<T>, IFixedValueParameter<T> where T : class, IItem, new() { 34 34 35 35 public override T Value { … … 46 46 public FixedValueParameter() : base() { } 47 47 public FixedValueParameter(string name) : base(name) { } 48 public FixedValueParameter(string name, bool getsCollected) : base(name, getsCollected) { }49 48 public FixedValueParameter(string name, T value) : base(name, value) { } 50 public FixedValueParameter(string name, T value, bool getsCollected) : base(name, value, getsCollected) { }51 49 public FixedValueParameter(string name, string description) : base(name, description) { } 52 public FixedValueParameter(string name, string description, bool getsCollected) : base(name, description, getsCollected) { }53 50 public FixedValueParameter(string name, string description, T value) : base(name, description, value) { } 54 public FixedValueParameter(string name, string description, T value, bool getsCollected) : base(name, description, value, getsCollected) { }55 51 56 52 public override IDeepCloneable Clone(Cloner cloner) { -
trunk/HeuristicLab.Parameters/3.3/OperatorParameter.cs
r16565 r16875 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 using HEAL.Attic;25 25 26 26 namespace HeuristicLab.Parameters { … … 36 36 public OperatorParameter() : base("Anonymous") { } 37 37 public OperatorParameter(string name) : base(name) { } 38 public OperatorParameter(string name, bool getsCollected) : base(name, getsCollected) { }39 38 public OperatorParameter(string name, IOperator value) : base(name, value) { } 40 public OperatorParameter(string name, IOperator value, bool getsCollected) : base(name, value, getsCollected) { }41 39 public OperatorParameter(string name, string description) : base(name, description) { } 42 public OperatorParameter(string name, string description, bool getsCollected) : base(name, description, getsCollected) { }43 40 public OperatorParameter(string name, string description, IOperator value) : base(name, description, value) { } 44 public OperatorParameter(string name, string description, IOperator value, bool getsCollected) : base(name, description, value, getsCollected) { }45 41 46 42 public override IDeepCloneable Clone(Cloner cloner) { -
trunk/HeuristicLab.Parameters/3.3/OptionalConstrainedValueParameter.cs
r16872 r16875 123 123 Initialize(); 124 124 } 125 public OptionalConstrainedValueParameter(string name, bool getsCollected)126 : base(name, typeof(T)) {127 this.validValues = new ItemSet<T>();128 this.readOnly = false;129 this.getsCollected = getsCollected;130 Initialize();131 }132 125 public OptionalConstrainedValueParameter(string name, ItemSet<T> validValues) 133 126 : base(name, typeof(T)) { … … 137 130 Initialize(); 138 131 } 139 public OptionalConstrainedValueParameter(string name, ItemSet<T> validValues, bool getsCollected)140 : base(name, typeof(T)) {141 this.validValues = validValues;142 this.readOnly = false;143 this.getsCollected = getsCollected;144 Initialize();145 }146 132 public OptionalConstrainedValueParameter(string name, ItemSet<T> validValues, T value) 147 133 : base(name, typeof(T)) { … … 150 136 this.readOnly = false; 151 137 this.getsCollected = true; 152 Initialize();153 }154 public OptionalConstrainedValueParameter(string name, ItemSet<T> validValues, T value, bool getsCollected)155 : base(name, typeof(T)) {156 this.validValues = validValues;157 this.value = value;158 this.readOnly = false;159 this.getsCollected = getsCollected;160 138 Initialize(); 161 139 } … … 167 145 Initialize(); 168 146 } 169 public OptionalConstrainedValueParameter(string name, string description, bool getsCollected)170 : base(name, description, typeof(T)) {171 this.validValues = new ItemSet<T>();172 this.readOnly = false;173 this.getsCollected = getsCollected;174 Initialize();175 }176 147 public OptionalConstrainedValueParameter(string name, string description, ItemSet<T> validValues) 177 148 : base(name, description, typeof(T)) { … … 181 152 Initialize(); 182 153 } 183 public OptionalConstrainedValueParameter(string name, string description, ItemSet<T> validValues, bool getsCollected)184 : base(name, description, typeof(T)) {185 this.validValues = validValues;186 this.readOnly = false;187 this.getsCollected = getsCollected;188 Initialize();189 }190 154 public OptionalConstrainedValueParameter(string name, string description, ItemSet<T> validValues, T value) 191 155 : base(name, description, typeof(T)) { … … 194 158 this.readOnly = false; 195 159 this.getsCollected = true; 196 Initialize();197 }198 public OptionalConstrainedValueParameter(string name, string description, ItemSet<T> validValues, T value, bool getsCollected)199 : base(name, description, typeof(T)) {200 this.validValues = validValues;201 this.value = value;202 this.readOnly = false;203 this.getsCollected = getsCollected;204 160 Initialize(); 205 161 } -
trunk/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs
r16872 r16875 137 137 this.reactOnValueToStringChangedAndValueItemImageChanged = true; 138 138 } 139 public OptionalValueParameter(string name, bool getsCollected)140 : base(name, typeof(T)) {141 this.readOnly = false;142 this.getsCollected = getsCollected;143 this.reactOnValueToStringChangedAndValueItemImageChanged = true;144 }145 139 public OptionalValueParameter(string name, T value) 146 140 : base(name, typeof(T)) { … … 151 145 RegisterValueEvents(); 152 146 } 153 public OptionalValueParameter(string name, T value, bool getsCollected)154 : base(name, typeof(T)) {155 this.value = value;156 this.readOnly = false;157 this.getsCollected = getsCollected;158 this.reactOnValueToStringChangedAndValueItemImageChanged = true;159 RegisterValueEvents();160 }161 147 public OptionalValueParameter(string name, string description) 162 148 : base(name, description, typeof(T)) { … … 165 151 this.reactOnValueToStringChangedAndValueItemImageChanged = true; 166 152 } 167 public OptionalValueParameter(string name, string description, bool getsCollected) 168 : base(name, description, typeof(T)) { 169 this.readOnly = false; 170 this.getsCollected = getsCollected; 171 this.reactOnValueToStringChangedAndValueItemImageChanged = true; 172 } 153 173 154 public OptionalValueParameter(string name, string description, T value) 174 155 : base(name, description, typeof(T)) { … … 176 157 this.readOnly = false; 177 158 this.getsCollected = true; 178 this.reactOnValueToStringChangedAndValueItemImageChanged = true;179 RegisterValueEvents();180 }181 public OptionalValueParameter(string name, string description, T value, bool getsCollected)182 : base(name, description, typeof(T)) {183 this.value = value;184 this.readOnly = false;185 this.getsCollected = getsCollected;186 159 this.reactOnValueToStringChangedAndValueItemImageChanged = true; 187 160 RegisterValueEvents(); -
trunk/HeuristicLab.Parameters/3.3/ValueLookupParameter.cs
r16872 r16875 112 112 this.getsCollected = true; 113 113 } 114 public ValueLookupParameter(string name, bool getsCollected)115 : base(name) {116 this.readOnly = false;117 this.Hidden = false;118 this.getsCollected = getsCollected;119 }120 114 public ValueLookupParameter(string name, T value) 121 115 : base(name) { … … 126 120 RegisterValueEvents(); 127 121 } 128 public ValueLookupParameter(string name, T value, bool getsCollected)129 : base(name) {130 this.value = value;131 this.readOnly = false;132 this.Hidden = false;133 this.getsCollected = getsCollected;134 RegisterValueEvents();135 }136 122 public ValueLookupParameter(string name, string description) 137 123 : base(name, description) { … … 139 125 this.Hidden = false; 140 126 this.getsCollected = true; 141 }142 public ValueLookupParameter(string name, string description, bool getsCollected)143 : base(name, description) {144 this.readOnly = false;145 this.Hidden = false;146 this.getsCollected = getsCollected;147 127 } 148 128 public ValueLookupParameter(string name, string description, T value) … … 154 134 RegisterValueEvents(); 155 135 } 156 public ValueLookupParameter(string name, string description, T value, bool getsCollected)157 : base(name, description) {158 this.value = value;159 this.readOnly = false;160 this.Hidden = false;161 this.getsCollected = getsCollected;162 RegisterValueEvents();163 }164 136 public ValueLookupParameter(string name, string description, string actualName) 165 137 : base(name, description, actualName) { … … 167 139 this.Hidden = false; 168 140 this.getsCollected = true; 169 }170 public ValueLookupParameter(string name, string description, string actualName, bool getsCollected)171 : base(name, description, actualName) {172 this.readOnly = false;173 this.Hidden = false;174 this.getsCollected = getsCollected;175 141 } 176 142 #endregion -
trunk/HeuristicLab.Parameters/3.3/ValueParameter.cs
r16565 r16875 22 22 using System; 23 23 using System.Reflection; 24 using HEAL.Attic; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 using HEAL.Attic;27 27 28 28 namespace HeuristicLab.Parameters { … … 47 47 public ValueParameter() : base() { } 48 48 public ValueParameter(string name) : base(name) { base.Value = CreateDefaultValue(); } 49 public ValueParameter(string name, bool getsCollected) : base(name, getsCollected) { base.Value = CreateDefaultValue(); }50 49 public ValueParameter(string name, T value) : base(name, value) { } 51 public ValueParameter(string name, T value, bool getsCollected) : base(name, value, getsCollected) { }52 50 public ValueParameter(string name, string description) : base(name, description) { base.Value = CreateDefaultValue(); } 53 public ValueParameter(string name, string description, bool getsCollected) : base(name, description, getsCollected) { base.Value = CreateDefaultValue(); }54 51 public ValueParameter(string name, string description, T value) : base(name, description, value) { } 55 public ValueParameter(string name, string description, T value, bool getsCollected) : base(name, description, value, getsCollected) { } 56 52 57 53 protected T CreateDefaultValue() { 58 54 Type type = typeof(T);
Note: See TracChangeset
for help on using the changeset viewer.