Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/ErcOption.cs @ 14875

Last change on this file since 14875 was 14875, checked in by pkimmesw, 7 years ago

#2665 BenchmarkSuite, all examples, partially tested, VectorExpressions added

File size: 1017 bytes
Line 
1namespace HeuristicLab.Problems.ProgramSynthesis.Base.Erc {
2  using Base.Erc.Interfaces;
3  using Common;
4  using Core;
5  using Data;
6  using Parameters;
7  using Persistence.Default.CompositeSerializers.Storable;
8
9  [StorableClass]
10  public abstract class ErcOption : ParameterizedNamedItem, IReadOnlyErcOption {
11    private const string IsEnabledParameterName = "IsEnabled";
12
13    protected ErcOption() {
14      Parameters.Add(new FixedValueParameter<BoolValue>(IsEnabledParameterName));
15    }
16
17    [StorableConstructor]
18    protected ErcOption(bool deserializing) : base(deserializing) { }
19
20    protected ErcOption(ErcOption origin, Cloner cloner) : base(origin, cloner) { }
21
22    public IValueParameter<BoolValue> IsEnabledParameter
23    {
24      get { return (IValueParameter<BoolValue>)Parameters[IsEnabledParameterName]; }
25    }
26
27    public bool IsEnabled
28    {
29      get { return IsEnabledParameter.Value.Value; }
30      set { IsEnabledParameter.Value.Value = value; }
31    }
32  }
33}
Note: See TracBrowser for help on using the repository browser.