Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12278


Ignore:
Timestamp:
04/01/15 15:57:37 (10 years ago)
Author:
mkommend
Message:

#2327: Merged r12037 and r12148 into stable.

Location:
stable
Files:
5 edited
3 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Data.Views/3.3

  • stable/HeuristicLab.Data.Views/3.3/HeuristicLab.Data.Views-3.3.csproj

    r11920 r12278  
    133133      <DependentUpon>EnhancedStringConvertibleMatrixView.cs</DependentUpon>
    134134    </Compile>
     135    <Compile Include="EnumValueView.cs">
     136      <SubType>UserControl</SubType>
     137    </Compile>
     138    <Compile Include="EnumValueView.Designer.cs">
     139      <DependentUpon>EnumValueView.cs</DependentUpon>
     140    </Compile>
    135141    <Compile Include="IntRangeView.cs">
    136142      <SubType>UserControl</SubType>
  • stable/HeuristicLab.Data/3.3

  • stable/HeuristicLab.Data/3.3/EnumValue.cs

    r12037 r12278  
    2929  [Item("EnumValue", "An abstract base class for representing values of enum types.")]
    3030  [StorableClass]
    31   public abstract class EnumValue<T> : ValueTypeValue<T>, IComparable<EnumValue<T>> where T : struct, IComparable {
     31  public sealed class EnumValue<T> : ValueTypeValue<T>, IComparable<EnumValue<T>> where T : struct, IComparable {
    3232    public static new Image StaticItemImage {
    3333      get { return HeuristicLab.Common.Resources.VSImageLibrary.Enum; }
     
    3939    }
    4040
     41    public EnumValue() {
     42      this.value = default(T);
     43      this.readOnly = false;
     44    }
     45    public EnumValue(T value) {
     46      this.value = value;
     47      this.readOnly = false;
     48    }
     49
    4150    [StorableConstructor]
    42     protected EnumValue(bool deserializing) : base(deserializing) { }
    43     protected EnumValue(EnumValue<T> original, Cloner cloner)
     51    private EnumValue(bool deserializing) : base(deserializing) { }
     52    private EnumValue(EnumValue<T> original, Cloner cloner)
    4453      : base(original, cloner) {
    4554      this.value = original.value;
    4655      this.readOnly = original.readOnly;
    4756    }
    48     protected EnumValue() {
    49       this.value = default(T);
    50       this.readOnly = false;
    51     }
    52     protected EnumValue(T value) {
    53       this.value = value;
    54       this.readOnly = false;
     57
     58    public override IDeepCloneable Clone(Cloner cloner) {
     59      return new EnumValue<T>(this, cloner);
    5560    }
    5661
    57     public virtual int CompareTo(EnumValue<T> other) {
     62    public int CompareTo(EnumValue<T> other) {
    5863      return Value.CompareTo(other.Value);
    5964    }
  • stable/HeuristicLab.Data/3.3/HeuristicLab.Data-3.3.csproj

    r11920 r12278  
    123123    <Compile Include="Comparison.cs" />
    124124    <Compile Include="ComparisonType.cs" />
     125    <Compile Include="EnumValue.cs" />
    125126    <Compile Include="Path Types\DirectoryValue.cs" />
    126127    <Compile Include="Path Types\FileValue.cs" />
Note: See TracChangeset for help on using the changeset viewer.