Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/31/11 17:10:15 (12 years ago)
Author:
abeham
Message:

#567

  • updated problem and algorithm
  • reverted plugin wizard
Location:
trunk/tools/Templates/HeuristicLabProblemTemplate
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/Templates/HeuristicLabProblemTemplate/DefaultProblem.cs

    r5704 r5912  
    3939  public sealed class $safeitemname$ : $problemTypeImplementation$ {
    4040    public override Image ItemImage {
    41       get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; }
     41      get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; }
    4242    }
    4343
     
    5050    #endregion
    5151
    52     [Storable]
    53     private List<IOperator> operators;
    54 
    5552    [StorableConstructor]
    5653    private $safeitemname$(bool deserializing) : base(deserializing) { }
     54    private $safeitemname$($safeitemname$ original, Cloner cloner)
     55      : base(original, cloner) {
     56      // TODO: Clone your private fields here
     57      AttachEventHandlers();
     58    }
    5759    public $safeitemname$()
    5860      : base() {
    5961      // TODO: Create a new instance of evaluator and solution creator
    60 
    61       $problemSpecificParameterInitializers$
     62     
    6263      $parameterInitializers$
    6364
     
    7071
    7172    public override IDeepCloneable Clone(Cloner cloner) {
    72       $safeitemname$ clone = ($safeitemname$)base.Clone(cloner);
    73       clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
    74       // TODO: Clone private fields here
    75       clone.AttachEventHandlers();
    76       return clone;
     73      return new $safeitemname$(this, cloner);
    7774    }
    7875
    7976    #region Events
    80     public event EventHandler SolutionCreatorChanged;
    81     private void OnSolutionCreatorChanged() {
    82       EventHandler handler = SolutionCreatorChanged;
    83       if (handler != null) handler(this, EventArgs.Empty);
    84     }
    85     public event EventHandler EvaluatorChanged;
    86     private void OnEvaluatorChanged() {
    87       EventHandler handler = EvaluatorChanged;
    88       if (handler != null) handler(this, EventArgs.Empty);
    89     }
    90     public event EventHandler OperatorsChanged;
    91     private void OnOperatorsChanged() {
    92       EventHandler handler = OperatorsChanged;
    93       if (handler != null) handler(this, EventArgs.Empty);
    94     }
    95     public event EventHandler Reset;
    96     private void OnReset() {
    97       EventHandler handler = Reset;
    98       if (handler != null) handler(this, EventArgs.Empty);
    99     }
    100 
    10177    // TODO: Add your event handlers here
    10278    #endregion
     
    11389
    11490    private void InitializeOperators() {
    115       operators = new List<IOperator>();
    11691      // TODO: Add custom problem analyzer to the list
    11792      // TODO: Add operators from the representation either by direct instantiation, or by using ApplicationManager.Manger.GetInstances<T>().Cast<IOperator>()
Note: See TracChangeset for help on using the changeset viewer.