Changeset 3048 for trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs
- Timestamp:
- 03/15/10 23:49:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs
r3017 r3048 33 33 [Creatable("Test")] 34 34 public sealed class IntCounter : SingleSuccessorOperator { 35 public LookupParameter<Int Data> ValueParameter {36 get { return (LookupParameter<Int Data>)Parameters["Value"]; }35 public LookupParameter<IntValue> ValueParameter { 36 get { return (LookupParameter<IntValue>)Parameters["Value"]; } 37 37 } 38 public ValueLookupParameter<Int Data> IncrementParameter {39 get { return (ValueLookupParameter<Int Data>)Parameters["Increment"]; }38 public ValueLookupParameter<IntValue> IncrementParameter { 39 get { return (ValueLookupParameter<IntValue>)Parameters["Increment"]; } 40 40 } 41 public Int DataIncrement {41 public IntValue Increment { 42 42 get { return IncrementParameter.Value; } 43 43 set { IncrementParameter.Value = value; } … … 46 46 public IntCounter() 47 47 : base() { 48 Parameters.Add(new LookupParameter<Int Data>("Value", "The value which should be incremented."));49 Parameters.Add(new ValueLookupParameter<Int Data>("Increment", "The increment which is added to the value.", new IntData(1)));48 Parameters.Add(new LookupParameter<IntValue>("Value", "The value which should be incremented.")); 49 Parameters.Add(new ValueLookupParameter<IntValue>("Increment", "The increment which is added to the value.", new IntValue(1))); 50 50 } 51 51 52 52 public override IOperation Apply() { 53 if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new Int Data();53 if (ValueParameter.ActualValue == null) ValueParameter.ActualValue = new IntValue(); 54 54 ValueParameter.ActualValue.Value += IncrementParameter.ActualValue.Value; 55 55 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.