Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/11 21:09:40 (13 years ago)
Author:
ascheibe
Message:

#1215

  • removed storing of valid types and valid values. This leads to wrong plugin discovery by the Persistence and Hive. Previously references to types of all available algorithms and problems were saved and needed by Hive for deserializing a MetaOpt task. Now only the actual values are saved and valid types and values are discovered after deserialization.
  • added missing license headers
  • added missing plugin references to plugin file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/ConstrainedTypeValue.cs

    r5337 r7153  
    22using System.Collections.Generic;
    33using System.Linq;
    4 using System.Text;
     4using HeuristicLab.Common;
    55using HeuristicLab.Core;
    6 using HeuristicLab.Data;
    7 using System.Drawing;
    86using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    9 using HeuristicLab.Common;
    107using HeuristicLab.PluginInfrastructure;
    118
     
    1512  public class ConstrainedTypeValue : TypeValue {
    1613
    17     [Storable]
    1814    private IEnumerable<Type> validTypes;
    1915    public IEnumerable<Type> ValidTypes {
     
    2925    }
    3026
    31     public ConstrainedTypeValue() : base() {
     27    public ConstrainedTypeValue()
     28      : base() {
    3229      this.readOnly = false;
    3330    }
    34     public ConstrainedTypeValue(Type value) : this() {
     31    public ConstrainedTypeValue(Type value)
     32      : this() {
    3533      this.Value = value;
    3634    }
     
    5149  public class ConstrainedTypeValue<T> : ConstrainedTypeValue where T : class, IItem {
    5250
    53     public ConstrainedTypeValue() : base() {
     51    public ConstrainedTypeValue()
     52      : base() {
    5453      this.ValidTypes = ApplicationManager.Manager.GetTypes(typeof(T), true).ToList();
    5554      this.Value = ValidTypes.First();
    5655    }
    57     public ConstrainedTypeValue(Type value) : base() {
     56    public ConstrainedTypeValue(Type value)
     57      : base() {
    5858      this.ValidTypes = ApplicationManager.Manager.GetTypes(typeof(T), true).ToList();
    5959      this.Value = value;
    6060    }
     61
    6162    [StorableConstructor]
    62     protected ConstrainedTypeValue(bool deserializing) : base(deserializing) { }
     63    protected ConstrainedTypeValue(bool deserializing)
     64      : base(deserializing) {
     65      if (deserializing) {
     66        this.ValidTypes = ApplicationManager.Manager.GetTypes(typeof(T), true).ToList();
     67      }
     68    }
     69
    6370    protected ConstrainedTypeValue(ConstrainedTypeValue original, Cloner cloner) : base(original, cloner) { }
    6471    public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset for help on using the changeset viewer.