Changeset 12148
- Timestamp:
- 03/06/15 12:54:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/EnumValue.cs
r12037 r12148 29 29 [Item("EnumValue", "An abstract base class for representing values of enum types.")] 30 30 [StorableClass] 31 public abstractclass 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 { 32 32 public static new Image StaticItemImage { 33 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Enum; } … … 39 39 } 40 40 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 41 50 [StorableConstructor] 42 pr otectedEnumValue(bool deserializing) : base(deserializing) { }43 pr otectedEnumValue(EnumValue<T> original, Cloner cloner)51 private EnumValue(bool deserializing) : base(deserializing) { } 52 private EnumValue(EnumValue<T> original, Cloner cloner) 44 53 : base(original, cloner) { 45 54 this.value = original.value; 46 55 this.readOnly = original.readOnly; 47 56 } 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); 55 60 } 56 61 57 public virtualint CompareTo(EnumValue<T> other) {62 public int CompareTo(EnumValue<T> other) { 58 63 return Value.CompareTo(other.Value); 59 64 }
Note: See TracChangeset
for help on using the changeset viewer.