Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5688


Ignore:
Timestamp:
03/15/11 14:35:05 (14 years ago)
Author:
mkommend
Message:

#1418: Added names and descriptions to grammars and adapted their view.

Location:
branches/DataAnalysis Refactoring
Files:
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj

    r5513 r5688  
    109109  </ItemGroup>
    110110  <ItemGroup>
    111     <Compile Include="SymbolicExpressionTreeGrammarView.cs">
    112       <SubType>UserControl</SubType>
    113     </Compile>
    114     <Compile Include="SymbolicExpressionTreeGrammarView.Designer.cs">
    115       <DependentUpon>SymbolicExpressionTreeGrammarView.cs</DependentUpon>
     111    <Compile Include="SymbolicExpressionGrammarView.cs">
     112      <SubType>UserControl</SubType>
     113    </Compile>
     114    <Compile Include="SymbolicExpressionGrammarView.Designer.cs">
     115      <DependentUpon>SymbolicExpressionGrammarView.cs</DependentUpon>
    116116    </Compile>
    117117    <Compile Include="SymbolView.cs">
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.Designer.cs

    r5685 r5688  
    2121
    2222namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
    23   partial class SymbolicExpressionTreeGrammarView {
     23  partial class SymbolicExpressionGrammarView {
    2424    /// <summary>
    2525    /// Required designer variable.
     
    5050                  | System.Windows.Forms.AnchorStyles.Left)
    5151                  | System.Windows.Forms.AnchorStyles.Right)));
    52       this.checkedItemListView.Location = new System.Drawing.Point(3, 3);
     52      this.checkedItemListView.Location = new System.Drawing.Point(0, 52);
    5353      this.checkedItemListView.Name = "itemListView";
    54       this.checkedItemListView.Size = new System.Drawing.Size(274, 239);
     54      this.checkedItemListView.Size = new System.Drawing.Size(351, 190);
    5555      this.checkedItemListView.TabIndex = 0;
    56       //
     56      //                                        
    5757      // DefaultSymbolicExpressionGrammarView
    5858      //
     
    6161      this.Controls.Add(this.checkedItemListView);
    6262      this.Name = "DefaultSymbolicExpressionGrammarView";
    63       this.Size = new System.Drawing.Size(280, 245);
     63      this.Size = new System.Drawing.Size(351, 245);
    6464      this.ResumeLayout(false);
    6565
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarView.cs

    r5686 r5688  
    3030namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
    3131  [View("Symbolic Expression Grammar View")]
    32   [Content(typeof(ISymbolicExpressionTreeGrammar), true)]
    33   public partial class SymbolicExpressionTreeGrammarView : ItemView {
     32  [Content(typeof(ISymbolicExpressionGrammar), true)]
     33  public partial class SymbolicExpressionGrammarView : NamedItemView {
    3434    private CheckedItemList<ISymbol> symbols;
    3535
    36     public new ISymbolicExpressionTreeGrammar Content {
    37       get { return (ISymbolicExpressionTreeGrammar)base.Content; }
     36    public new ISymbolicExpressionGrammar Content {
     37      get { return (ISymbolicExpressionGrammar)base.Content; }
    3838      set { base.Content = value; }
    3939    }
    4040
    41     public SymbolicExpressionTreeGrammarView() {
     41    public SymbolicExpressionGrammarView() {
    4242      InitializeComponent();
    4343      symbols = new CheckedItemList<ISymbol>();
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammar.cs

    r5686 r5688  
    100100    }
    101101
    102     public SymbolicExpressionGrammar()
    103       : base() {
     102    public SymbolicExpressionGrammar(string name, string description)
     103      : base(name, description) {
    104104      programRootSymbol = new ProgramRootSymbol();
    105105      AddSymbol(programRootSymbol);
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs

    r5686 r5688  
    4747    protected Dictionary<Tuple<string, int>, List<string>> allowedChildSymbolsPerIndex;
    4848
     49    public override bool CanChangeName {
     50      get { return false; }
     51    }
     52    public override bool CanChangeDescription {
     53      get { return false; }
     54    }
     55
    4956    [StorableConstructor]
    5057    protected SymbolicExpressionGrammarBase(bool deserializing)
     
    7279    }
    7380
    74     protected SymbolicExpressionGrammarBase()
    75       : base() {
     81    protected SymbolicExpressionGrammarBase(string name, string description)
     82      : base(name, description) {
    7683      cachedMinExpressionLength = new Dictionary<string, int>();
    7784      cachedMaxExpressionLength = new Dictionary<string, int>();
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs

    r5686 r5688  
    4141    private ISymbolicExpressionGrammar grammar;
    4242    public SymbolicExpressionTreeGrammar(ISymbolicExpressionGrammar grammar)
    43       : base() {
     43      : base("SymbolicExpressionTreeGrammar", "A grammar that is used held by symbolic expression trees and allows extensions to the wraped grammar.") {
    4444      if (grammar == null) throw new ArgumentNullException();
    4545      this.grammar = grammar;
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/Grammars.cs

    r5686 r5688  
    9797      protected SimpleArithmeticGrammar(SimpleArithmeticGrammar original, Cloner cloner) : base(original, cloner) { }
    9898      public SimpleArithmeticGrammar()
    99         : base() {
     99        : base("Grammar for unit tests","") {
    100100        Initialize();
    101101      }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.ArtificialAnt/3.4/ArtificialAntExpressionGrammar.cs

    r5686 r5688  
    2323using System.Collections.Generic;
    2424using HeuristicLab.Common;
     25using HeuristicLab.Core;
    2526using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    2829namespace HeuristicLab.Problems.ArtificialAnt {
    2930  [StorableClass]
     31  [Item(Name = "ArtificialAntExpressionGrammar", Description = "The default grammar for an artificial ant problem.")]
    3032  public class ArtificialAntExpressionGrammar : SymbolicExpressionGrammar {
    3133
    3234    public ArtificialAntExpressionGrammar()
    33       : base() {
     35      : base(ItemAttribute.GetName(typeof(ArtificialAntExpressionGrammar)), ItemAttribute.GetDescription(typeof(ArtificialAntExpressionGrammar))) {
    3436      Initialize();
    3537    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs

    r5686 r5688  
    3535    protected ArithmeticExpressionGrammar(ArithmeticExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
    3636    public ArithmeticExpressionGrammar()
    37       : base() {
     37      : base(ItemAttribute.GetName(typeof(ArithmeticExpressionGrammar)), ItemAttribute.GetDescription(typeof(ArithmeticExpressionGrammar))) {
    3838      Initialize();
    3939    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs

    r5686 r5688  
    3535    protected FullFunctionalExpressionGrammar(FullFunctionalExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
    3636    public FullFunctionalExpressionGrammar()
    37       : base() {
     37      : base(ItemAttribute.GetName(typeof(FullFunctionalExpressionGrammar)), ItemAttribute.GetDescription(typeof(FullFunctionalExpressionGrammar))) {
    3838      Initialize();
    3939    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r5686 r5688  
    3535    protected TypeCoherentExpressionGrammar(TypeCoherentExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
    3636    public TypeCoherentExpressionGrammar()
    37       : base() {
     37      : base(ItemAttribute.GetName(typeof(TypeCoherentExpressionGrammar)), ItemAttribute.GetDescription(typeof(TypeCoherentExpressionGrammar))) {
    3838      Initialize();
    3939    }
Note: See TracChangeset for help on using the changeset viewer.