Free cookie consent management tool by TermsFeed Policy Generator

source: branches/SimulationCore/HeuristicLab.SimulationCore/3.3/DiscreteEvent/Model.cs @ 13806

Last change on this file since 13806 was 10454, checked in by abeham, 11 years ago

#1610: updated core, implemented card game sample

File size: 735 bytes
Line 
1using HeuristicLab.Common;
2using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
3
4namespace HeuristicLab.SimulationCore {
5  [StorableClass]
6  public abstract class Model : IModel {
7    [Storable]
8    public double CurrentTime { get; set; }
9
10    [StorableConstructor]
11    protected Model(bool deserializing) { }
12    protected Model(Model original, Cloner cloner) {
13      cloner.RegisterClonedObject(original, this);
14      CurrentTime = original.CurrentTime;
15    }
16    protected Model() { }
17    protected Model(double time) {
18      CurrentTime = time;
19    }
20
21    public object Clone() {
22      return Clone(new Cloner());
23    }
24
25    public abstract IDeepCloneable Clone(Cloner cloner);
26  }
27}
Note: See TracBrowser for help on using the repository browser.