Line | |
---|
1 | using HeuristicLab.Common;
|
---|
2 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
3 |
|
---|
4 | namespace 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.