namespace HeuristicLab.Problems.ProgramSynthesis.Base.Erc { using System.Collections.Generic; using Boolean; using Char; using Common; using Core; using Data; using Float; using FloatVector; using Integer; using IntegerVector; using Parameters; using Persistence.Default.CompositeSerializers.Storable; using String; using StringVector; [StorableClass] public class ErcOptions : ParameterizedNamedItem, IReadOnlyErcOptions { public const string ProbabilityParameterName = "Probability"; public const string IntegerParameterName = "Integer"; public const string FloatParameterName = "Float"; public const string CharParameterName = "Char"; public const string BooleanParameterName = "Boolean"; public const string StringParameterName = "String"; public const string NameParameterName = "Name"; public const string IntegerVectorParameterName = "IntegerVector"; public const string FloatVectorParameterName = "FloatVector"; public const string StringVectorParameterName = "StringVector"; public ErcOptions() { Name = "ERC Options"; Parameters.Add(new FixedValueParameter(ProbabilityParameterName)); Parameters.Add(new ValueParameter(IntegerParameterName)); Parameters.Add(new ValueParameter(FloatParameterName)); Parameters.Add(new ValueParameter(BooleanParameterName)); Parameters.Add(new ValueParameter(StringParameterName)); Parameters.Add(new ValueParameter(CharParameterName)); Parameters.Add(new ValueParameter(NameParameterName)); Parameters.Add(new ValueParameter(IntegerVectorParameterName)); Parameters.Add(new ValueParameter(FloatVectorParameterName)); Parameters.Add(new ValueParameter(StringVectorParameterName)); } [StorableConstructor] public ErcOptions(bool deserializing) : base(deserializing) { } public ErcOptions(ErcOptions origin, Cloner cloner) : base(origin, cloner) { } public IValueParameter ErcProbabilityParameter { get { return (IValueParameter)Parameters[ProbabilityParameterName]; } } public double ErcProbability { get { return ErcProbabilityParameter.Value.Value; } set { ErcProbabilityParameter.Value.Value = value; } } IErcValueItem IReadOnlyErcOptions.IntegerErcOptions { get { return IntegerErcOptions; } } IErcValueItem IReadOnlyErcOptions.FloatErcOptions { get { return FloatErcOptions; } } IErcValueItem IReadOnlyErcOptions.BooleanErcOptions { get { return BooleanErcOptions; } } IErcValueItem IReadOnlyErcOptions.CharErcOptions { get { return CharErcOptions; } } IErcValueItem IReadOnlyErcOptions.StringErcOptions { get { return StringErcOptions; } } IErcValueItem IReadOnlyErcOptions.NameErcOptions { get { return NameErcOptions; } } IErcValueItem> IReadOnlyErcOptions.IntegerVectorErcOptions { get { return IntegerVectorErcOptions; } } IErcValueItem> IReadOnlyErcOptions.FloatVectorErcOptions { get { return FloatVectorErcOptions; } } IErcValueItem> IReadOnlyErcOptions.StringVectorErcOptions { get { return StringVectorErcOptions; } } public IValueParameter IntegerErcOptionsParameter { get { return (IValueParameter)Parameters[IntegerParameterName]; } } public IntegerErcOptions IntegerErcOptions { get { return this.IntegerErcOptionsParameter.Value; } set { this.IntegerErcOptionsParameter.Value = value; } } public IValueParameter FloatErcOptionsParameter { get { return (IValueParameter)Parameters[FloatParameterName]; } } public FloatErcOptions FloatErcOptions { get { return this.FloatErcOptionsParameter.Value; } set { this.FloatErcOptionsParameter.Value = value; } } /// /// Integer represents ASCII value /// public IValueParameter CharErcOptionsParameter { get { return (IValueParameter)Parameters[CharParameterName]; } } public CharErcOptions CharErcOptions { get { return CharErcOptionsParameter.Value; } set { CharErcOptionsParameter.Value = value; } } public IValueParameter BooleanErcOptionsParameter { get { return (IValueParameter)Parameters[BooleanParameterName]; } } public BooleanErcOptions BooleanErcOptions { get { return BooleanErcOptionsParameter.Value; } set { BooleanErcOptionsParameter.Value = value; } } public IValueParameter StringErcOptionsParameter { get { return (IValueParameter)Parameters[StringParameterName]; } } public StringErcOptions StringErcOptions { get { return StringErcOptionsParameter.Value; } set { StringErcOptionsParameter.Value = value; } } public IValueParameter NameParameter { get { return (IValueParameter)Parameters[NameParameterName]; } } public StringErcOptions NameErcOptions { get { return NameParameter.Value; } set { NameParameter.Value = value; } } public IValueParameter IntegerVectorParameter { get { return (IValueParameter)Parameters[IntegerVectorParameterName]; } } public IntegerVectorErcOptions IntegerVectorErcOptions { get { return IntegerVectorParameter.Value; } set { IntegerVectorParameter.Value = value; } } public IValueParameter StringVectorParameter { get { return (IValueParameter)Parameters[StringVectorParameterName]; } } public StringVectorErcOptions StringVectorErcOptions { get { return StringVectorParameter.Value; } set { StringVectorParameter.Value = value; } } public IValueParameter FloatVectorParameter { get { return (IValueParameter)Parameters[FloatVectorParameterName]; } } public FloatVectorErcOptions FloatVectorErcOptions { get { return FloatVectorParameter.Value; } set { FloatVectorParameter.Value = value; } } public override IDeepCloneable Clone(Cloner cloner) { return new ErcOptions(this, cloner); } } }