Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/06/10 03:30:37 (15 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • implemented reviewers' comments on version r2917.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs

    r2947 r2948  
    3535      get { return base.Value; }
    3636      set {
    37         if (value == null) throw new ArgumentNullException();
     37        if ((value == null) && (Value != null)) throw new ArgumentNullException();
    3838        base.Value = value;
    3939      }
    4040    }
    4141
    42     private ValueParameter() : base() { }
     42    public ValueParameter() : base() { }
     43    public ValueParameter(string name) : base(name) { }
    4344    public ValueParameter(string name, T value) : base(name, value) { }
     45    public ValueParameter(string name, string description) : base(name, description) { }
    4446    public ValueParameter(string name, string description, T value) : base(name, description, value) { }
    45 
    46     public override IDeepCloneable Clone(Cloner cloner) {
    47       ValueParameter<T> clone = new ValueParameter<T>(Name, Description, Value);
    48       cloner.RegisterClonedObject(this, clone);
    49       clone.Value = (T)cloner.Clone(Value);
    50       return clone;
    51     }
    5247  }
    5348}
Note: See TracChangeset for help on using the changeset viewer.