Changeset 4796 for branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/Jobs/OptimizerJob.cs
- Timestamp:
- 11/15/10 14:27:27 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/Jobs/OptimizerJob.cs
r4629 r4796 29 29 30 30 namespace HeuristicLab.Clients.Hive.Jobs { 31 [Item("Optimizer Job", "Represents Job which executes a IOptimizer object.")] 31 32 [StorableClass] 32 public class OptimizerJob : IJob {33 public class OptimizerJob : DeepCloneable, IJob { 33 34 [Storable] 34 35 protected IOptimizer optimizer; … … 70 71 } 71 72 72 73 73 [Storable] 74 74 private bool collectChildJobs; … … 81 81 this.log = new Log(); 82 82 } 83 84 83 public OptimizerJob(IOptimizer optimizer) 85 84 : this() { … … 93 92 this.ComputeInParallel = false; 94 93 } 94 } 95 [StorableConstructor] 96 protected OptimizerJob(bool deserializing) { } 97 protected OptimizerJob(OptimizerJob original, Cloner cloner) 98 : base(original, cloner) { 99 this.Optimizer = cloner.Clone(original.Optimizer); 100 this.log = cloner.Clone(original.Log); 101 this.ComputeInParallel = original.ComputeInParallel; 102 this.IndexInParentOptimizerList = original.IndexInParentOptimizerList; 103 this.CollectChildJobs = original.CollectChildJobs; 104 this.RegisterEvents(); 105 } 106 public override IDeepCloneable Clone(Cloner cloner) { 107 return new OptimizerJob(this, cloner); 95 108 } 96 109 … … 310 323 #endregion 311 324 312 #region IDeepCloneable Members313 314 public IDeepCloneable Clone(Cloner cloner) {315 OptimizerJob clone = (OptimizerJob)Activator.CreateInstance(this.GetType());316 cloner.RegisterClonedObject(this, clone);317 clone.Optimizer = (IOptimizer)cloner.Clone(this.Optimizer);318 clone.log = (ILog)cloner.Clone(this.Log);319 clone.ComputeInParallel = this.ComputeInParallel;320 clone.IndexInParentOptimizerList = this.IndexInParentOptimizerList;321 clone.CollectChildJobs = this.CollectChildJobs;322 clone.RegisterEvents();323 return clone;324 }325 326 #endregion327 328 #region ICloneable Members329 330 public object Clone() {331 return Clone(new Cloner());332 }333 334 #endregion335 336 325 /// <summary> 337 326 /// Gets the string representation of the current instance in the format: <c>Name: [null|Value]</c>.
Note: See TracChangeset
for help on using the changeset viewer.