- Timestamp:
- 02/19/10 02:15:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs
r2796 r2830 27 27 namespace HeuristicLab.Operators { 28 28 /// <summary> 29 /// Operator which contains an operator graph.29 /// An operator which contains an operator graph. 30 30 /// </summary> 31 31 [Item("CombinedOperator", "An operator which contains an operator graph.")] 32 32 [Creatable("Test")] 33 public sealed class CombinedOperator : SingleSuccessorOperator, IOperator { 34 public override Image ItemImage { 35 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Module; } 36 } 37 [Storable] 38 private OperatorGraph operatorGraph; 39 public OperatorGraph OperatorGraph { 40 get { return operatorGraph; } 41 } 33 public sealed class CombinedOperator : AlgorithmOperator, IOperator { 42 34 public new ParameterCollection Parameters { 43 35 get { … … 52 44 } 53 45 54 public CombinedOperator() 55 : base() { 56 operatorGraph = new OperatorGraph(); 57 } 58 59 public override IDeepCloneable Clone(Cloner cloner) { 60 CombinedOperator clone = (CombinedOperator)base.Clone(cloner); 61 clone.operatorGraph = (OperatorGraph)cloner.Clone(operatorGraph); 62 return clone; 63 } 64 65 public override IExecutionSequence Apply() { 66 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 67 if (operatorGraph.InitialOperator != null) 68 next.Insert(0, ExecutionContext.CreateChildContext(operatorGraph.InitialOperator)); 69 return next; 70 } 46 public CombinedOperator() : base() { } 71 47 } 72 48 }
Note: See TracChangeset
for help on using the changeset viewer.