1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 |
|
---|
4 | namespace HeuristicLab.Problems.ProgramSynthesis {
|
---|
5 | using HeuristicLab.Core;
|
---|
6 |
|
---|
7 | public class EnabledExpressionsChangedEventArgs : EventArgs {
|
---|
8 | public IEnumerable<string> AddedExpressions { get; private set; }
|
---|
9 | public IEnumerable<string> RemovedExpressions { get; private set; }
|
---|
10 |
|
---|
11 | public EnabledExpressionsChangedEventArgs(IEnumerable<string> addedExpressions, IEnumerable<string> removedExpressions) {
|
---|
12 | AddedExpressions = addedExpressions;
|
---|
13 | RemovedExpressions = removedExpressions;
|
---|
14 | }
|
---|
15 | }
|
---|
16 |
|
---|
17 | public interface IReadOnlyExpressionsConfiguration : INamedItem {
|
---|
18 | int InExpressionCount { get; }
|
---|
19 |
|
---|
20 |
|
---|
21 | IReadOnlyList<string> EnabledExpressions { get; }
|
---|
22 | IReadOnlyDictionary<StackTypes, int> ExpressionsPerStackCount { get; }
|
---|
23 | }
|
---|
24 |
|
---|
25 | public interface IExpressionsConfiguration : IReadOnlyExpressionsConfiguration {
|
---|
26 | event EventHandler<EnabledExpressionsChangedEventArgs> EnabledExpressionsChanged;
|
---|
27 |
|
---|
28 | void EnableStack(StackTypes types, bool enableDependencies = false);
|
---|
29 | void DisableStack(StackTypes type, bool enableDependencies = false);
|
---|
30 | void SetStack(StackTypes type, bool state, bool setDependencies = false);
|
---|
31 | void EnableExpressionOfStack(StackTypes types);
|
---|
32 | void DisableExpressionsOfStack(StackTypes types);
|
---|
33 | void EnableExpression(string name);
|
---|
34 | void DisableExpression(string name);
|
---|
35 | void SetExpression(string name, bool state);
|
---|
36 | void SetExpression<T>(bool state) where T : Expression;
|
---|
37 | void EnableExpression<T>() where T : Expression;
|
---|
38 | void DisableExpression<T>() where T : Expression;
|
---|
39 | }
|
---|
40 | }
|
---|