Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/21/10 01:31:15 (15 years ago)
Author:
swagner
Message:

Started to adapt HeuristicLab.Data and HeuristicLab.Operators according to the changes in HeuristicLab.Core (#95)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data/3.3/IntData.cs

    r2526 r2663  
    2525using System.Xml;
    2626using HeuristicLab.Core;
    27 using System.Globalization;
    2827using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2928
    3029namespace HeuristicLab.Data {
    31   /// <summary>
    32   /// The representation of an int value.
    33   /// </summary>
    3430  [EmptyStorableClass]
    35   public class IntData : ObjectData {
    36     /// <summary>
    37     /// Gets or sets the int value.
    38     /// </summary>
    39     /// <remarks>Uses property <see cref="ObjectData.Data"/> of base class <see cref="ObjectData"/>.
    40     /// No own data storage present.</remarks>
    41     public new int Data {
    42       get { return (int)base.Data; }
    43       set { base.Data = value; }
     31  [Item("Int Data", "Represents an integer value.")]
     32  [Creatable("Test")]
     33  public sealed class IntData : ValueTypeData<int> {
     34    public IntData() : base() { }
     35    public IntData(int value)
     36      : base() {
     37      Value = value;
    4438    }
    4539
    46     /// <summary>
    47     /// Initializes a new instance of <see cref="IntData"/> with default value <c>0</c>.
    48     /// </summary>
    49     public IntData() {
    50       Data = 0;
    51     }
    52     /// <summary>
    53     /// Initializes a new instance of <see cref="IntData"/>.
    54     /// </summary>
    55     /// <param name="data">The int value the current instance should represent.</param>
    56     public IntData(int data) {
    57       Data = data;
    58     }
    59 
    60     /// <summary>
    61     /// Clones the current instance.
    62     /// </summary>
    63     /// <remarks>Adds the cloned instance to the dictionary <paramref name="clonedObjects"/>.</remarks>
    64     /// <param name="clonedObjects">Dictionary of all already cloned objects.</param>
    65     /// <returns>The cloned instance as <see cref="IntData"/>.</returns>
    66     public override IItem Clone(ICloner cloner) {
    67       IntData clone = new IntData();
     40    public override IDeepCloneable Clone(Cloner cloner) {
     41      IntData clone = new IntData(Value);
    6842      cloner.RegisterClonedObject(this, clone);
    69       clone.Data = Data;
    7043      return clone;
    7144    }
Note: See TracChangeset for help on using the changeset viewer.