Changeset 2890 for trunk/sources/HeuristicLab.Parameters
- Timestamp:
- 03/01/10 03:01:01 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Parameters/3.3
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj
r2852 r2890 69 69 <Compile Include="ConstrainedValueParameter.cs" /> 70 70 <Compile Include="LookupParameter.cs" /> 71 <Compile Include="OptionalValueParameter.cs" /> 71 72 <Compile Include="SubScopesLookupParameter.cs" /> 72 73 <Compile Include="ValueLookupParameter.cs" /> 73 <Compile Include="ValueParameter.cs" />74 74 <Compile Include="ScopeParameter.cs" /> 75 75 <Compile Include="HeuristicLabParametersPlugin.cs" /> -
trunk/sources/HeuristicLab.Parameters/3.3/OperatorParameter.cs
r2818 r2890 30 30 [EmptyStorableClass] 31 31 [Creatable("Test")] 32 public class OperatorParameter : ValueParameter<IOperator> {32 public class OperatorParameter : OptionalValueParameter<IOperator> { 33 33 public OperatorParameter() 34 34 : base("Anonymous") { -
trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs
r2889 r2890 27 27 namespace HeuristicLab.Parameters { 28 28 /// <summary> 29 /// A parameter whose value is defined it the parameter itself. 29 /// A parameter whose value is defined it the parameter itself. The value of the parameter can be null, if the parameter is not set. 30 30 /// </summary> 31 [Item(" ValueParameter<T>", "A parameter whose value is defined it the parameter itself.")]32 public class ValueParameter<T> : Parameter, IValueParameter<T> where T : class, IItem {31 [Item("OptionalValueParameter<T>", "A parameter whose value is defined it the parameter itself. The value of the parameter can be null, if the parameter is not set.")] 32 public class OptionalValueParameter<T> : Parameter, IValueParameter<T> where T : class, IItem { 33 33 private T value; 34 34 [Storable] … … 57 57 } 58 58 59 public ValueParameter()59 public OptionalValueParameter() 60 60 : base("Anonymous", typeof(T)) { 61 61 } 62 public ValueParameter(string name)62 public OptionalValueParameter(string name) 63 63 : base(name, typeof(T)) { 64 64 } 65 public ValueParameter(string name, T value)65 public OptionalValueParameter(string name, T value) 66 66 : base(name, typeof(T)) { 67 67 Value = value; 68 68 } 69 public ValueParameter(string name, string description)69 public OptionalValueParameter(string name, string description) 70 70 : base(name, description, typeof(T)) { 71 71 } 72 public ValueParameter(string name, string description, T value)72 public OptionalValueParameter(string name, string description, T value) 73 73 : base(name, description, typeof(T)) { 74 74 Value = value; … … 76 76 77 77 public override IDeepCloneable Clone(Cloner cloner) { 78 ValueParameter<T> clone = (ValueParameter<T>)base.Clone(cloner);78 OptionalValueParameter<T> clone = (OptionalValueParameter<T>)base.Clone(cloner); 79 79 clone.Value = (T)cloner.Clone(value); 80 80 return clone;
Note: See TracChangeset
for help on using the changeset viewer.