Changeset 5579 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationProblem.cs
- Timestamp:
- 03/01/11 14:42:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationProblem.cs
r5577 r5579 20 20 #endregion 21 21 22 using System;23 22 using HeuristicLab.Common; 24 23 using HeuristicLab.Core; 25 using HeuristicLab.Parameters;26 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 25 … … 30 28 [Item("ClassificationProblem", "")] 31 29 [Creatable] 32 public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, 33 IClassificationProblem { 34 private const string ProblemDataParameterName = "ProblemData"; 35 public ClassificationProblem(ClassificationProblem original, Cloner cloner) 36 : base(original, cloner) { 37 RegisterEventHandlers(); 38 } 30 public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem { 39 31 [StorableConstructor] 40 32 public ClassificationProblem(bool deserializing) : base(deserializing) { } 33 public ClassificationProblem(ClassificationProblem original, Cloner cloner) : base(original, cloner) { } 34 public override IDeepCloneable Clone(Cloner cloner) { return new ClassificationProblem(this, cloner); } 35 41 36 public ClassificationProblem() 42 37 : base() { 43 Parameters.Add(new ValueParameter<IClassificationProblemData>(ProblemDataParameterName, "", new ClassificationProblemData())); 44 RegisterEventHandlers(); 38 ProblemData = new ClassificationProblemData(); 45 39 } 46 47 [StorableHook(HookType.AfterDeserialization)]48 private void AfterDeserialization() {49 RegisterEventHandlers();50 }51 52 public override IDeepCloneable Clone(Cloner cloner) {53 return new ClassificationProblem(this, cloner);54 }55 56 private void RegisterEventHandlers() {57 ProblemDataParameter.Value.Changed += new EventHandler(Value_Changed);58 }59 60 #region event propagation61 private void Value_Changed(object sender, EventArgs e) {62 //OnReset();63 }64 #endregion65 40 } 66 41 }
Note: See TracChangeset
for help on using the changeset viewer.