[17434] | 1 | using HEAL.Attic;
|
---|
| 2 | using HeuristicLab.Common;
|
---|
[10347] | 3 | using HeuristicLab.Core;
|
---|
| 4 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 5 |
|
---|
| 6 | namespace HeuristicLab.EvolutionTracking {
|
---|
[10830] | 7 | [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")]
|
---|
[17434] | 8 | [StorableType("21BE7538-052E-451E-A0A3-CD8CBF51B051")]
|
---|
[10347] | 9 | public class Fragment : Item, IFragment {
|
---|
| 10 | [Storable]
|
---|
[10755] | 11 | public int Index1 { get; set; }
|
---|
[10347] | 12 |
|
---|
| 13 | [Storable]
|
---|
[10755] | 14 | public int Index2 { get; set; }
|
---|
[10347] | 15 |
|
---|
| 16 | [Storable]
|
---|
| 17 | private object root;
|
---|
| 18 | public object Root {
|
---|
| 19 | get { return root; }
|
---|
| 20 | set { root = value; }
|
---|
| 21 | }
|
---|
[10830] | 22 | [StorableConstructor]
|
---|
[17434] | 23 | protected Fragment(StorableConstructorFlag _) : base(_) { }
|
---|
[10830] | 24 |
|
---|
[10347] | 25 | protected Fragment(Fragment original, Cloner cloner)
|
---|
| 26 | : base(original, cloner) {
|
---|
| 27 | Root = original.Root;
|
---|
[10755] | 28 | Index1 = original.Index1;
|
---|
| 29 | Index2 = original.Index2;
|
---|
[10347] | 30 | }
|
---|
[11928] | 31 |
|
---|
[10347] | 32 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 33 | return new Fragment(this, cloner);
|
---|
| 34 | }
|
---|
[11928] | 35 |
|
---|
[10347] | 36 | public Fragment() { }
|
---|
| 37 | }
|
---|
| 38 |
|
---|
[10830] | 39 | [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")]
|
---|
[17434] | 40 | [StorableType("19346017-6C9E-41BF-BCD2-00B1FE82F2FA")]
|
---|
[10347] | 41 | public class Fragment<T> : Fragment, IFragment<T> where T : class {
|
---|
| 42 | public new T Root {
|
---|
| 43 | get { return (T)base.Root; }
|
---|
| 44 | set { base.Root = value; }
|
---|
| 45 | }
|
---|
[10830] | 46 |
|
---|
[11928] | 47 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 48 | return new Fragment<T>(this, cloner);
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | protected Fragment(Fragment<T> original, Cloner cloner)
|
---|
[10830] | 52 | : base(original, cloner) {
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | [StorableConstructor]
|
---|
[17434] | 56 | protected Fragment(StorableConstructorFlag _) : base(_) { }
|
---|
[10830] | 57 |
|
---|
| 58 | public Fragment() { }
|
---|
[10347] | 59 | }
|
---|
| 60 | }
|
---|