using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; namespace HeuristicLab.Problems.ProgramSynthesis { [StorableClass] [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")] public class Fragment : Item, IFragment { [Storable] public int Index1 { get; set; } [Storable] public int Index2 { get; set; } [Storable] private object root; public object Root { get { return root; } set { root = value; } } [StorableConstructor] protected Fragment(bool deserializable) : base(deserializable) { } protected Fragment(Fragment original, Cloner cloner) : base(original, cloner) { Root = original.Root; Index1 = original.Index1; Index2 = original.Index2; } public override IDeepCloneable Clone(Cloner cloner) { return new Fragment(this, cloner); } public Fragment() { } } [StorableClass] [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")] public class Fragment : Fragment, IFragment where T : class { public new T Root { get { return (T)base.Root; } set { base.Root = value; } } public override IDeepCloneable Clone(Cloner cloner) { return new Fragment(this, cloner); } protected Fragment(Fragment original, Cloner cloner) : base(original, cloner) { } [StorableConstructor] protected Fragment(bool deserializable) : base(deserializable) { } public Fragment() { } } }