Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/13/10 04:37:49 (14 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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.