Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/13/10 04:37:49 (15 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • implemented reviewers' comments
  • added additional plugins HeuristicLab.Evolutionary, HeuristicLab.Permutation, HeuristicLab.Selection, and HeuristicLab.Routing.TSP
Location:
trunk/sources/HeuristicLab.Core/3.3
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/Attributes/CreatableAttribute.cs

    r2546 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs

    r2546 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/ChangedEventArgs.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Collections.Generic;
    2424using System.Text;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Core {
     
    2829
    2930  public class ChangedEventArgs : EventArgs {
    30     private class ReferenceEqualityComparer : IEqualityComparer<object> {
    31       bool IEqualityComparer<object>.Equals(object x, object y) {
    32         return object.ReferenceEquals(x, y);
    33       }
    34 
    35       int IEqualityComparer<object>.GetHashCode(object obj) {
    36         if (obj == null) return 0;
    37         return obj.GetHashCode();
    38       }
    39     }
    40 
    4131    private HashSet<object> changedObjects;
    4232
    4333    public ChangedEventArgs() {
    44       changedObjects = new HashSet<object>(new ReferenceEqualityComparer());
     34      changedObjects = new HashSet<object>(new ReferenceEqualityComparer<object>());
     35    }
     36    public ChangedEventArgs(IEnumerable<object> collection) {
     37      changedObjects = new HashSet<object>(collection, new ReferenceEqualityComparer<object>());
    4538    }
    4639
  • trunk/sources/HeuristicLab.Core/3.3/Cloner.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Collections.Generic;
    2424using System.Text;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Core {
     
    2930  /// </summary>
    3031  public sealed class Cloner {
    31     private class ReferenceEqualityComparer : IEqualityComparer<IDeepCloneable> {
    32       bool IEqualityComparer<IDeepCloneable>.Equals(IDeepCloneable x, IDeepCloneable y) {
    33         return object.ReferenceEquals(x, y);
    34       }
    35 
    36       int IEqualityComparer<IDeepCloneable>.GetHashCode(IDeepCloneable obj) {
    37         if (obj == null) return 0;
    38         return obj.GetHashCode();
    39       }
    40     }
    41 
    4232    private Dictionary<IDeepCloneable, IDeepCloneable> mapping;
    4333
     
    4636    /// </summary>
    4737    public Cloner() {
    48       mapping = new Dictionary<IDeepCloneable, IDeepCloneable>(new ReferenceEqualityComparer());
     38      mapping = new Dictionary<IDeepCloneable, IDeepCloneable>(new ReferenceEqualityComparer<IDeepCloneable>());
    4939    }
    5040
  • trunk/sources/HeuristicLab.Core/3.3/DeepCloneable.cs

    r2664 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Engine.cs

    r2773 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    5858          if (operatorGraph != null) operatorGraph.InitialOperatorChanged += new EventHandler(operatorGraph_InitialOperatorChanged);
    5959          OnOperatorGraphChanged();
    60           Initialize();
     60          Prepare();
    6161        }
    6262      }
     
    6767    /// </summary>
    6868    [Storable]
    69     private Scope globalScope;
     69    private IScope globalScope;
    7070    /// <summary>
    7171    /// Gets the current global scope.
     
    132132    /// Initializes a new instance of <see cref="EngineBase"/> with a new global scope.
    133133    /// </summary>
    134     /// <remarks>Calls <see cref="Reset"/>.</remarks>
    135134    protected Engine() {
    136135      globalScope = new Scope("Global");
     
    161160    /// <inheritdoc/>
    162161    /// <remarks>Sets <c>myCanceled</c> and <c>myRunning</c> to <c>false</c>. The global scope is cleared,
    163     /// the execution time is reseted, the execution stack is cleared and a new <see cref="AtomicOperation"/>
     162    /// the execution time is reset, the execution stack is cleared and a new <see cref="AtomicOperation"/>
    164163    /// with the initial operator is added. <br/>
    165     /// Calls <see cref="OnInitialized"/>.</remarks>
    166     public void Initialize() {
     164    /// Calls <see cref="OnPrepared"/>.</remarks>
     165    public void Prepare() {
    167166      canceled = false;
    168167      running = false;
     
    172171      if (OperatorGraph.InitialOperator != null)
    173172        executionStack.Push(new ExecutionContext(null, OperatorGraph.InitialOperator, GlobalScope));
    174       OnInitialized();
     173      OnPrepared();
    175174    }
    176175    /// <inheritdoc/>
     
    226225
    227226    private void operatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
    228       Initialize();
     227      Prepare();
    229228    }
    230229
     
    246245    }
    247246    /// <summary>
    248     /// Occurs when the execution is initialized.
    249     /// </summary>
    250     public event EventHandler Initialized;
    251     /// <summary>
    252     /// Fires a new <c>Initialized</c> event.
    253     /// </summary>
    254     protected virtual void OnInitialized() {
    255       if (Initialized != null)
    256         Initialized(this, new EventArgs());
     247    /// Occurs when the execution is prepared for a new run.
     248    /// </summary>
     249    public event EventHandler Prepared;
     250    /// <summary>
     251    /// Fires a new <c>Prepared</c> event.
     252    /// </summary>
     253    protected virtual void OnPrepared() {
     254      if (Prepared != null)
     255        Prepared(this, new EventArgs());
    257256    }
    258257    /// <summary>
  • trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs

    r2773 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/ExecutionContextCollection.cs

    r2773 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/HeuristicLabCorePlugin.cs.frame

    r2754 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IDeepCloneable.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    5656
    5757    /// <summary>
    58     /// Resets the current instance.
     58    /// Prepares the engine for a new run.
    5959    /// </summary>
    60     void Initialize();
     60    void Prepare();
    6161    /// <summary>
    6262    /// Executes the whole run.
     
    7878    event EventHandler ExecutionTimeChanged;
    7979    /// <summary>
    80     /// Occurs when the engine is initialized.
     80    /// Occurs when the engine is prepared for a new run.
    8181    /// </summary>
    82     event EventHandler Initialized;
     82    event EventHandler Prepared;
    8383    /// <summary>
    8484    /// Occurs when the engine is executed.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionSequence.cs

    r2773 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItem.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/ILookupParameter.cs

    r2756 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/INamedItem.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperator.cs

    r2773 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameter.cs

    r2757 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IRandom.cs

    r817 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IScope.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3535    VariableCollection Variables { get; }
    3636    ScopeList SubScopes { get; }
     37
     38    void Clear();
    3739  }
    3840}
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IValueLookupParameter.cs

    r2756 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IValueParameter.cs

    r2756 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IVariable.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Item.cs

    r2664 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/ItemArray.cs

    r2757 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/ItemCollection.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/ItemList.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/ItemSet.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/NamedItem.cs

    r2664 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131  public abstract class NamedItem : Item, INamedItem {
    3232    [Storable]
    33     protected string name;
     33    private string name;
    3434    /// <inheritdoc/>
    3535    /// <remarks>Calls <see cref="OnNameChanging"/> and also <see cref="OnNameChanged"/>
     
    5454    }
    5555    [Storable]
    56     protected string description;
     56    private string description;
    5757    public string Description {
    5858      get { return description; }
  • trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs

    r2676 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using System;
    23 using System.Collections;
    2423using System.Collections.Generic;
    25 using System.Collections.ObjectModel;
    26 using System.Text;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using System.Drawing;
    2825using HeuristicLab.Collections;
    2926using HeuristicLab.Common;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3028
    3129namespace HeuristicLab.Core {
    32   public class NamedItemCollection<T> : ObservableKeyedCollection<string, T>, IDeepCloneable where T : class, INamedItem {
     30  [Item("NamedItemCollection<T>", "Represents a collection of named items.")]
     31  public class NamedItemCollection<T> : ObservableKeyedCollection<string, T>, IItem where T : class, INamedItem {
     32    public virtual string ItemName {
     33      get { return ItemAttribute.GetName(this.GetType()); }
     34    }
     35    public virtual string ItemDescription {
     36      get { return ItemAttribute.GetDescription(this.GetType()); }
     37    }
     38    public virtual Image ItemImage {
     39      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Class; }
     40    }
     41
    3342    [Storable(Name = "RestoreEvents")]
    3443    private object RestoreEvents {
     
    5059      return Clone(new Cloner());
    5160    }
    52 
    5361    public IDeepCloneable Clone(Cloner cloner) {
    5462      List<T> items = new List<T>();
     
    5866      cloner.RegisterClonedObject(this, clone);
    5967      return clone;
     68    }
     69
     70    public override string ToString() {
     71      return ItemName;
    6072    }
    6173
  • trunk/sources/HeuristicLab.Core/3.3/OperatorCollection.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs

    r2756 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    141141        operators.ItemsRemoved += new CollectionItemsChangedEventHandler<IOperator>(Operators_ItemsRemoved);
    142142        operators.CollectionReset += new CollectionItemsChangedEventHandler<IOperator>(Operators_CollectionReset);
     143        foreach (IOperator op in operators) {
     144          RegisterOperatorEvents(op);
     145          foreach (IParameter param in op.Parameters) {
     146            IValueParameter<IOperator> opParam = param as IValueParameter<IOperator>;
     147            if (opParam != null) RegisterOperatorParameterEvents(opParam);
     148          }
     149        }
    143150      }
    144151    }
    145152    private void DeregisterOperatorsEvents() {
    146153      if (operators != null) {
     154        foreach (IOperator op in operators) {
     155          foreach (IParameter param in op.Parameters) {
     156            IValueParameter<IOperator> opParam = param as IValueParameter<IOperator>;
     157            if (opParam != null) DeregisterOperatorParameterEvents(opParam);
     158          }
     159          DeregisterOperatorEvents(op);
     160        }
    147161        operators.Changed -= new ChangedEventHandler(Operators_Changed);
    148162        operators.ItemsAdded -= new CollectionItemsChangedEventHandler<IOperator>(Operators_ItemsAdded);
  • trunk/sources/HeuristicLab.Core/3.3/OperatorList.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/OperatorSet.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/ParameterCollection.cs

    r2653 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Collections;
    2422using System.Collections.Generic;
    25 using System.Collections.ObjectModel;
    26 using System.Text;
    27 using System.Drawing;
    2823using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using HeuristicLab.Common.Resources;
    3024
    3125namespace HeuristicLab.Core {
     
    3327  [Item("ParameterCollection", "Represents a collection of parameters.")]
    3428  [Creatable("Test")]
    35   public class ParameterCollection : NamedItemCollection<IParameter>, IItem {
    36     public virtual string ItemName {
    37       get { return ItemAttribute.GetName(this.GetType()); }
    38     }
    39     public virtual string ItemDescription {
    40       get { return ItemAttribute.GetDescription(this.GetType()); }
    41     }
    42     public virtual Image ItemImage {
    43       get { return VS2008ImageLibrary.Class; }
    44     }
    45 
     29  public class ParameterCollection : NamedItemCollection<IParameter> {
    4630    public ParameterCollection() : base() { }
    4731    public ParameterCollection(int capacity) : base(capacity) { }
    4832    public ParameterCollection(IEnumerable<IParameter> collection) : base(collection) { }
    49 
    50     public override string ToString() {
    51       return ItemName;
    52     }
    5333  }
    5434}
  • trunk/sources/HeuristicLab.Core/3.3/Properties/AssemblyInfo.frame

    r2754 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Scope.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    9797      Scope clone = new Scope();
    9898      cloner.RegisterClonedObject(this, clone);
    99       clone.name = name;
    100       clone.description = description;
     99      clone.Name = Name;
     100      clone.Description = Description;
    101101      clone.parent = (IScope)cloner.Clone(parent);
    102102      clone.Variables = (VariableCollection)cloner.Clone(variables);
  • trunk/sources/HeuristicLab.Core/3.3/ScopeList.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • trunk/sources/HeuristicLab.Core/3.3/Variable.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    7777      Variable clone = new Variable();
    7878      cloner.RegisterClonedObject(this, clone);
    79       clone.name = name;
    80       clone.description = description;
     79      clone.Name = Name;
     80      clone.Description = Description;
    8181      clone.Value = (IItem)cloner.Clone(value);
    8282      return clone;
  • trunk/sources/HeuristicLab.Core/3.3/VariableCollection.cs

    r2687 r2790  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Collections;
    2422using System.Collections.Generic;
    25 using System.Collections.ObjectModel;
    26 using System.Text;
    27 using System.Drawing;
    2823using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    29 using HeuristicLab.Common.Resources;
    3024
    3125namespace HeuristicLab.Core {
     
    3327  [Item("VariableCollection", "Represents a collection of variables.")]
    3428  [Creatable("Test")]
    35   public class VariableCollection : NamedItemCollection<IVariable>, IItem {
    36     public virtual string ItemName {
    37       get { return ItemAttribute.GetName(this.GetType()); }
    38     }
    39     public virtual string ItemDescription {
    40       get { return ItemAttribute.GetDescription(this.GetType()); }
    41     }
    42     public virtual Image ItemImage {
    43       get { return VS2008ImageLibrary.Class; }
    44     }
    45 
     29  public class VariableCollection : NamedItemCollection<IVariable> {
    4630    public VariableCollection() : base() { }
    4731    public VariableCollection(int capacity) : base(capacity) { }
    4832    public VariableCollection(IEnumerable<IVariable> collection) : base(collection) { }
    49 
    50     public override string ToString() {
    51       return ItemName;
    52     }
    5333  }
    5434}
Note: See TracChangeset for help on using the changeset viewer.