Free cookie consent management tool by TermsFeed Policy Generator

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

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

Create own class for OperatorTrace, remove unnecessary event handlers, prevent flickering while stepping, permanently highlight execution context's scope (#47)

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