Changeset 3317 for trunk/sources/HeuristicLab.Operators/3.3
- Timestamp:
- 04/13/10 06:41:56 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/MultipleCallsOperator.cs
r3212 r3317 37 37 private List<IValueParameter<IOperator>> operatorParameters; 38 38 39 [Storable] 39 40 private OperatorList operators; 40 [Storable]41 41 public OperatorList Operators { 42 42 get { return operators; } 43 private set {44 if (operators != null) DeregisterOperatorsEvents();45 operators = value;46 if (operators != null) RegisterOperatorsEvents();47 }48 43 } 49 44 50 45 public MultipleCallsOperator() 51 46 : base() { 52 Operators = new OperatorList();47 operators = new OperatorList(); 53 48 Initialize(); 54 49 } 50 [StorableConstructor] 51 protected MultipleCallsOperator(bool deserializing) : base(deserializing) { } 55 52 56 53 [StorableHook(HookType.AfterDeserialization)] 57 54 private void Initialize() { 55 if (operators != null) RegisterOperatorsEvents(); 58 56 operatorParameters = new List<IValueParameter<IOperator>>(); 59 57 for (int i = 0; i < Operators.Count; i++) { … … 66 64 public override IDeepCloneable Clone(Cloner cloner) { 67 65 MultipleCallsOperator clone = (MultipleCallsOperator)base.Clone(cloner); 68 clone. Operators = (OperatorList)cloner.Clone(operators);66 clone.operators = (OperatorList)cloner.Clone(operators); 69 67 clone.Initialize(); 70 68 return clone; -
trunk/sources/HeuristicLab.Operators/3.3/Operator.cs
r3306 r3317 113 113 breakpoint = false; 114 114 } 115 [StorableConstructor] 116 protected Operator(bool deserializing) : base(deserializing) { } 115 117 116 118 /// <summary> -
trunk/sources/HeuristicLab.Operators/3.3/SingleSuccessorOperator.cs
r3160 r3317 43 43 Parameters.Add(new OperatorParameter("Successor", "Operator which is executed next.")); 44 44 } 45 [StorableConstructor] 46 protected SingleSuccessorOperator(bool deserializing) : base(deserializing) { } 45 47 46 48 public override IOperation Apply() { -
trunk/sources/HeuristicLab.Operators/3.3/ValuesCollector.cs
r3160 r3317 31 31 [StorableClass] 32 32 public abstract class ValuesCollector : SingleSuccessorOperator, IOperator { 33 [Storable] 33 34 private ParameterCollection collectedValues; 34 [Storable]35 35 public ParameterCollection CollectedValues { 36 36 get { return collectedValues; } 37 private set {38 collectedValues = value;39 collectedValues.ItemsAdded += new CollectionItemsChangedEventHandler<IParameter>(collectedValues_ItemsAdded);40 collectedValues.ItemsRemoved += new CollectionItemsChangedEventHandler<IParameter>(collectedValues_ItemsRemoved);41 collectedValues.CollectionReset += new CollectionItemsChangedEventHandler<IParameter>(collectedValues_CollectionReset);42 }43 37 } 44 38 45 39 public ValuesCollector() 46 40 : base() { 47 CollectedValues = new ParameterCollection(); 41 collectedValues = new ParameterCollection(); 42 Initialize(); 43 } 44 [StorableConstructor] 45 protected ValuesCollector(bool deserializing) : base(deserializing) { } 46 47 [StorableHook(HookType.AfterDeserialization)] 48 private void Initialize() { 49 collectedValues.ItemsAdded += new CollectionItemsChangedEventHandler<IParameter>(collectedValues_ItemsAdded); 50 collectedValues.ItemsRemoved += new CollectionItemsChangedEventHandler<IParameter>(collectedValues_ItemsRemoved); 51 collectedValues.CollectionReset += new CollectionItemsChangedEventHandler<IParameter>(collectedValues_CollectionReset); 48 52 } 49 53 50 54 public override IDeepCloneable Clone(Cloner cloner) { 51 55 ValuesCollector clone = (ValuesCollector)base.Clone(cloner); 52 clone.CollectedValues = (ParameterCollection)cloner.Clone(collectedValues); 56 clone.collectedValues = (ParameterCollection)cloner.Clone(collectedValues); 57 clone.Initialize(); 53 58 return clone; 54 59 }
Note: See TracChangeset
for help on using the changeset viewer.