1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
6 | using HeuristicLab.Core;
|
---|
7 | using HeuristicLab.Common;
|
---|
8 |
|
---|
9 | namespace HeuristicLab.Problems.MetaOptimization {
|
---|
10 | /// <summary>
|
---|
11 | /// This class does not have a ParameterName, because its the root element of the ParameterConfiguration-Tree
|
---|
12 | /// It only deals with child-ParameterConfigurations
|
---|
13 | /// </summary>
|
---|
14 | [StorableClass]
|
---|
15 | public class RootParameterConfiguration : ParameterConfiguration {
|
---|
16 |
|
---|
17 | public new IParameterizedNamedItem Value {
|
---|
18 | get { return (IParameterizedNamedItem)base.Value; }
|
---|
19 | set { base.Value = value; }
|
---|
20 | }
|
---|
21 |
|
---|
22 | public RootParameterConfiguration(IParameterizedNamedItem rootItem) {
|
---|
23 | this.OptimizationEnabled = true;
|
---|
24 | this.Value = rootItem;
|
---|
25 | }
|
---|
26 |
|
---|
27 | public RootParameterConfiguration() { }
|
---|
28 | [StorableConstructor]
|
---|
29 | protected RootParameterConfiguration(bool deserializing) { }
|
---|
30 | protected RootParameterConfiguration(RootParameterConfiguration original, Cloner cloner) : base(original, cloner) {
|
---|
31 | }
|
---|
32 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
33 | return new RootParameterConfiguration(this, cloner);
|
---|
34 | }
|
---|
35 |
|
---|
36 | public override IParameter Parameter {
|
---|
37 | get { return null; }
|
---|
38 | }
|
---|
39 |
|
---|
40 | #region INamedItem Properties
|
---|
41 | public override string Name {
|
---|
42 | get { return Value.Name; }
|
---|
43 | set { throw new NotSupportedException(); }
|
---|
44 | }
|
---|
45 | public override string Description {
|
---|
46 | get { return Value.Description; }
|
---|
47 | set { throw new NotSupportedException(); }
|
---|
48 | }
|
---|
49 | public override bool CanChangeDescription {
|
---|
50 | get { return false; }
|
---|
51 | }
|
---|
52 | public override bool CanChangeName {
|
---|
53 | get { return false; }
|
---|
54 | }
|
---|
55 | public override string ItemDescription {
|
---|
56 | get { return Value.ItemDescription; }
|
---|
57 | }
|
---|
58 | public override System.Drawing.Image ItemImage {
|
---|
59 | get { return Value.ItemImage; }
|
---|
60 | }
|
---|
61 | public override string ItemName {
|
---|
62 | get { return Value.ItemName; }
|
---|
63 | }
|
---|
64 | public override Version ItemVersion {
|
---|
65 | get { return Value.ItemVersion; }
|
---|
66 | }
|
---|
67 | #endregion
|
---|
68 | }
|
---|
69 | }
|
---|