Last change
on this file since 10501 was
10501,
checked in by bburlacu, 10 years ago
|
#1772: Merged trunk changes and added missing frame files (for HeuristicLab.EvolutionTracking and HeuristicLab.EvolutionTracking.Views.
|
File size:
1.1 KB
|
Line | |
---|
1 | using HeuristicLab.Common;
|
---|
2 | using HeuristicLab.Core;
|
---|
3 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
4 |
|
---|
5 | namespace HeuristicLab.EvolutionTracking {
|
---|
6 | [StorableClass]
|
---|
7 | [Item("Fragment", "A fragment is an object that represents a piece of genetic information that was transferred from parent to child.")]
|
---|
8 | public class Fragment : Item, IFragment {
|
---|
9 | [Storable]
|
---|
10 | public int NewPos { get; set; }
|
---|
11 |
|
---|
12 | [Storable]
|
---|
13 | public int OldPos { get; set; }
|
---|
14 |
|
---|
15 | [Storable]
|
---|
16 | private object root;
|
---|
17 | public object Root {
|
---|
18 | get { return root; }
|
---|
19 | set { root = value; }
|
---|
20 | }
|
---|
21 |
|
---|
22 | protected Fragment(Fragment original, Cloner cloner)
|
---|
23 | : base(original, cloner) {
|
---|
24 | Root = original.Root;
|
---|
25 | NewPos = original.NewPos;
|
---|
26 | OldPos = original.OldPos;
|
---|
27 | }
|
---|
28 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
29 | return new Fragment(this, cloner);
|
---|
30 | }
|
---|
31 | public Fragment() { }
|
---|
32 | }
|
---|
33 |
|
---|
34 | public class Fragment<T> : Fragment, IFragment<T> where T : class {
|
---|
35 | public new T Root {
|
---|
36 | get { return (T)base.Root; }
|
---|
37 | set { base.Root = value; }
|
---|
38 | }
|
---|
39 | }
|
---|
40 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.