Free cookie consent management tool by TermsFeed Policy Generator

source: branches/sluengo/HeuristicLab.Problems.TradeRules/Symbols/BoolConstant.cs @ 15286

Last change on this file since 15286 was 9262, checked in by sluengo, 12 years ago
File size: 1.4 KB
RevLine 
[9262]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Common;
6using HeuristicLab.Core;
7using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
9
10namespace HeuristicLab.Problems.TradeRules
11{
12    [StorableClass]
13    [Item("BoolConstant", "Represents a BoolConstant value.")]
14    public sealed class BoolConstant : Symbol
15    {
16        private const int minimumArity = 0;
17        private const int maximumArity = 0;
18
19        public override int MinimumArity
20        {
21            get { return minimumArity; }
22        }
23        public override int MaximumArity
24        {
25            get { return maximumArity; }
26        }
27
28
29        [StorableConstructor]
30        private BoolConstant(bool deserializing) : base(deserializing) { }
31        private BoolConstant(BoolConstant original, Cloner cloner)
32            : base(original, cloner)
33        {
34        }
35        public BoolConstant()
36            : base("BoolConstant", "Represents a BoolConstant value.")
37        {
38        }
39
40        public override ISymbolicExpressionTreeNode CreateTreeNode()
41        {
42            return new BoolConstantTreeNode(this);
43        }
44
45        public override IDeepCloneable Clone(Cloner cloner)
46        {
47            return new BoolConstant(this, cloner);
48        }
49    }
50}
Note: See TracBrowser for help on using the repository browser.