- Timestamp:
- 01/15/15 17:17:41 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/Scripts/CompiledProblemDefinition.cs
r11753 r11768 21 21 22 22 using System; 23 using HeuristicLab.Common;24 using HeuristicLab.Core;25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;26 23 27 24 namespace HeuristicLab.Problems.Programmable { 28 public abstract class CompiledProblemDefinition : NamedItem, IProblemDefinition { 29 [Storable(Name = "Encoding")] 25 public abstract class CompiledProblemDefinition : IProblemDefinition { 30 26 private IEncoding encoding; 31 27 public IEncoding Encoding { … … 33 29 protected set { 34 30 if (value == null) throw new ArgumentNullException("The encoding must not be null."); 35 if (encoding == value) return;36 31 encoding = value; 37 32 } … … 41 36 public abstract void Initialize(); 42 37 43 [StorableConstructor] 44 protected CompiledProblemDefinition(bool deserializing) : base(deserializing) { } 45 protected CompiledProblemDefinition(CompiledProblemDefinition original, Cloner cloner) 46 : base(original, cloner) { 47 this.encoding = cloner.Clone(original.encoding); 48 } 49 public override IDeepCloneable Clone(Cloner cloner) { 50 throw new InvalidOperationException("ProblemScript instances cannot be cloned."); 51 } 52 53 public CompiledProblemDefinition() { } 54 protected CompiledProblemDefinition(IEncoding encoding) : this(encoding, "ProblemDefinition") { } 55 protected CompiledProblemDefinition(IEncoding encoding, string name) : this(encoding, name, string.Empty) { } 56 protected CompiledProblemDefinition(IEncoding encoding, string name, string description) 57 : base(name, description) { 38 protected CompiledProblemDefinition() { } 39 protected CompiledProblemDefinition(IEncoding encoding) 40 : base() { 58 41 Encoding = encoding; 59 42 }
Note: See TracChangeset
for help on using the changeset viewer.