Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Dynamic;
|
---|
4 | using System.Linq;
|
---|
5 | using System.Text;
|
---|
6 | using System.Threading.Tasks;
|
---|
7 | using HeuristicLab.Common;
|
---|
8 | using HeuristicLab.Core;
|
---|
9 | using HeuristicLab.Data;
|
---|
10 |
|
---|
11 | namespace HeuristicLab.Problems.DataAnalysis {
|
---|
12 | [Item("ParsedConstraint", "Represents parsed constraints.")]
|
---|
13 | public class ParsedConstraint : Item {
|
---|
14 |
|
---|
15 | protected string input;
|
---|
16 | public string Input {
|
---|
17 | get => input;
|
---|
18 | set => input = value;
|
---|
19 | }
|
---|
20 |
|
---|
21 | protected IEnumerable<IntervalConstraint> constraints;
|
---|
22 |
|
---|
23 | public IEnumerable<IntervalConstraint> Constraints {
|
---|
24 | get => constraints;
|
---|
25 | set => constraints = value;
|
---|
26 | }
|
---|
27 |
|
---|
28 | protected ParsedConstraint(ParsedConstraint original, Cloner cloner)
|
---|
29 | : base(original, cloner) {
|
---|
30 | this.input = original.Input ?? string.Empty;
|
---|
31 | this.constraints = original.Constraints ?? new ItemList<IntervalConstraint>();
|
---|
32 | }
|
---|
33 |
|
---|
34 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
35 | return new ParsedConstraint(this, cloner);
|
---|
36 | }
|
---|
37 |
|
---|
38 | public ParsedConstraint() {
|
---|
39 | this.input = string.Empty;
|
---|
40 | this.constraints = new ItemList<IntervalConstraint>();
|
---|
41 | }
|
---|
42 |
|
---|
43 | public ParsedConstraint(string input) {
|
---|
44 | this.input = input;
|
---|
45 | this.constraints = new ItemList<IntervalConstraint>();
|
---|
46 | }
|
---|
47 |
|
---|
48 | public ParsedConstraint(string input, IEnumerable<IntervalConstraint> constraints) {
|
---|
49 | this.input = input;
|
---|
50 | this.constraints = constraints;
|
---|
51 | }
|
---|
52 | }
|
---|
53 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.