source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/Expression.cs @ 14908

Last change on this file since 14908 was 14908, checked in by pkimmesw, 3 years ago

#2665 Removed "this" qualifier

File size: 917 bytes
Line 
1namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
2  using System;
3  using System.Collections.Generic;
4  using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool;
5
6  using Interpreter;
7
8  [Serializable]
9  public abstract class Expression : IPooledObject {
10    public bool IsProgram { get { return GetType() == typeof(PushProgram); } }
11
12    public static readonly IReadOnlyCollection<Expression> EmptyContainer = new Expression[0];
13
14    public virtual string StringRepresentation
15    {
16      get
17      {
18        return ExpressionTable.TypeToAttributeTable[GetType()].ExpressionName;
19      }
20    }
21
22    //public abstract bool IsNoop(IInternalPushInterpreter interpreter);
23
24    public abstract bool Eval(IInternalPushInterpreter interpreter);
25
26    public override string ToString() {
27      return StringRepresentation;
28    }
29
30    void IPooledObject.Reset() { }
31  }
32}
Note: See TracBrowser for help on using the repository browser.