Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11401


Ignore:
Timestamp:
09/29/14 02:32:06 (10 years ago)
Author:
swagner
Message:

#2205: Worked on basic infrastructure for optimization networks

Location:
branches/OptimizationNetworks
Files:
14 added
2 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/IModelerUserInterfaceItemProvider.cs

    r11063 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/ModelerDockingMainForm.Designer.cs

    r11063 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/ModelerDockingMainForm.cs

    r11063 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/Plugin.cs.frame

    r11063 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/OptimizationNetworks/HeuristicLab.Modeler/3.3/Properties/AssemblyInfo.cs.frame

    r11063 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232[assembly: AssemblyCompany("")]
    3333[assembly: AssemblyProduct("HeuristicLab")]
    34 [assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
     34[assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
    3535[assembly: AssemblyTrademark("")]
    3636[assembly: AssemblyCulture("")]
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/Plugin.cs.frame

    r11069 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/Properties/AssemblyInfo.cs.frame

    r11069 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232[assembly: AssemblyCompany("")]
    3333[assembly: AssemblyProduct("HeuristicLab")]
    34 [assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
     34[assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
    3535[assembly: AssemblyTrademark("")]
    3636[assembly: AssemblyCulture("")]
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj

    r11177 r11401  
    4848  </ItemGroup>
    4949  <ItemGroup>
    50     <Compile Include="Entity.cs" />
    51     <Compile Include="IEntity.cs" />
     50    <Compile Include="EventArgs.cs" />
     51    <Compile Include="IInputOutputPort.cs" />
     52    <Compile Include="InputOutputPort.cs" />
     53    <Compile Include="IOutputInputPort.cs" />
     54    <Compile Include="OutputInputPort.cs" />
     55    <Compile Include="OutputPort.cs" />
     56    <Compile Include="IOutputPort.cs" />
     57    <Compile Include="INetwork.cs" />
     58    <Compile Include="IInputPort.cs" />
    5259    <Compile Include="IPort.cs" />
     60    <Compile Include="INode.cs" />
     61    <Compile Include="Network.cs" />
     62    <Compile Include="InputPort.cs" />
     63    <Compile Include="NodeCollection.cs" />
    5364    <Compile Include="PortCollection.cs" />
    5465    <Compile Include="Port.cs" />
    5566    <Compile Include="Plugin.cs" />
    5667    <Compile Include="Properties\AssemblyInfo.cs" />
     68    <Compile Include="Node.cs" />
    5769  </ItemGroup>
    5870  <ItemGroup>
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/IPort.cs

    r11177 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
     22using HeuristicLab.Core;
    2223using System;
    23 using HeuristicLab.Core;
    2424
    2525namespace HeuristicLab.Optimization.Networks {
    2626  public interface IPort : INamedItem {
    27     object Value { get; set; }
     27    object Value { get; }
    2828
    2929    event EventHandler ValueChanged;
     
    3131
    3232  public interface IPort<T> : IPort where T : class, IItem {
    33     new T Value { get; set; }
     33    new T Value { get; }
    3434  }
    3535}
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Plugin.cs.frame

    r11177 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Port.cs

    r11177 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2020#endregion
    2121
    22 using System;
    23 using System.Drawing;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using System;
     26using System.Drawing;
    2727
    2828namespace HeuristicLab.Optimization.Networks {
    29   [Item("Port", "A port of an optimization network entity.")]
     29  [Item("Port", "Abstract base class for ports of an optimization network node.")]
    3030  [StorableClass]
    31   public class Port<T> : NamedItem, IPort<T> where T : class, IItem {
    32     public override Image ItemImage {
    33       get {
    34         if (value != null) return value.ItemImage;
    35         else return base.ItemImage;
    36       }
     31  public abstract class Port<T> : NamedItem, IPort<T> where T : class, IItem {
     32    public static new Image StaticItemImage {
     33      get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; }
    3734    }
    3835
    3936    [Storable]
    4037    protected T value;
    41     public T Value {
     38    public virtual T Value {
    4239      get { return value; }
    43       set {
     40      protected set {
    4441        if (value != this.value) {
    4542          DeregisterValueEvents();
     
    5249    object IPort.Value {
    5350      get { return Value; }
    54       set {
    55         T val = value as T;
    56         if ((value != null) && (val == null))
    57           throw new InvalidOperationException(
    58             string.Format("Type mismatch. Value is not a \"{0}\".",
    59                           typeof(T).GetPrettyName())
    60           );
    61         Value = val;
    62       }
    6351    }
    6452
     
    7058      RegisterValueEvents();
    7159    }
    72     public Port() : base("Anonymous") { }
    73     public Port(string name) : base(name) { }
    74     public Port(string name, string description) : base(name, description) { }
    75     public Port(string name, T value)
    76       : base(name) {
    77       this.value = value;
    78       RegisterValueEvents();
    79     }
    80     public Port(string name, string description, T value)
    81       : base(name, description) {
    82       this.value = value;
    83       RegisterValueEvents();
    84     }
     60    protected Port() : base("Port") { }
     61    protected Port(string name) : base(name) { }
     62    protected Port(string name, string description) : base(name, description) { }
    8563
    8664    [StorableHook(HookType.AfterDeserialization)]
    8765    private void AfterDeserialization() {
    8866      RegisterValueEvents();
    89     }
    90 
    91     public override IDeepCloneable Clone(Cloner cloner) {
    92       return new Port<T>(this, cloner);
    9367    }
    9468
     
    10175      EventHandler handler = ValueChanged;
    10276      if (handler != null) handler(this, EventArgs.Empty);
    103       OnItemImageChanged();
    10477      OnToStringChanged();
    10578    }
    10679
    107     private void RegisterValueEvents() {
     80    protected virtual void RegisterValueEvents() {
    10881      if (value != null) {
    109         value.ItemImageChanged += new EventHandler(Value_ItemImageChanged);
    11082        value.ToStringChanged += new EventHandler(Value_ToStringChanged);
    11183      }
    11284    }
    113     private void DeregisterValueEvents() {
     85    protected virtual void DeregisterValueEvents() {
    11486      if (value != null) {
    115         value.ItemImageChanged -= new EventHandler(Value_ItemImageChanged);
    11687        value.ToStringChanged -= new EventHandler(Value_ToStringChanged);
    11788      }
    118     }
    119     private void Value_ItemImageChanged(object sender, EventArgs e) {
    120       OnItemImageChanged();
    12189    }
    12290    private void Value_ToStringChanged(object sender, EventArgs e) {
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/PortCollection.cs

    r11177 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Properties/AssemblyInfo.cs.frame

    r11063 r11401  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232[assembly: AssemblyCompany("")]
    3333[assembly: AssemblyProduct("HeuristicLab")]
    34 [assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
     34[assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
    3535[assembly: AssemblyTrademark("")]
    3636[assembly: AssemblyCulture("")]
Note: See TracChangeset for help on using the changeset viewer.