Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.DebugEngine/ExecutionStack.cs @ 4945

Last change on this file since 4945 was 4871, checked in by epitzer, 14 years ago

Refactoring and modularization of DebugEngine (#47)

File size: 1.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Collections;
6using HeuristicLab.Common;
7using HeuristicLab.Core;
8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
9
10namespace HeuristicLab.DebugEngine {
11
12  public class ExecutionStack : ObservableList<IOperation>, IContent, IDeepCloneable {
13
14    public ExecutionStack() : base() { }
15    public ExecutionStack(int capacity) : base(capacity) { }
16    public ExecutionStack(IEnumerable<IOperation> collection) : base(collection) { }
17
18    [StorableConstructor]
19    protected ExecutionStack(bool deserializing) : base(deserializing) { }
20    protected ExecutionStack(ExecutionStack original, Cloner cloner) {
21      cloner.RegisterClonedObject(original, this);
22      AddRange(original.Select(op => cloner.Clone(op)));
23    }
24    public object Clone() {
25      return Clone(new Cloner());
26    }
27    public virtual IDeepCloneable Clone(Cloner cloner) {
28      return new ExecutionStack(this, cloner);
29    }
30  }
31}
Note: See TracBrowser for help on using the repository browser.