Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/13 13:05:24 (11 years ago)
Author:
ascheibe
Message:

#2069

  • fixed error handling for external program calls
  • added missing StorableClass attribute
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Robocode/HeuristicLab.Problems.Robocode/Symbols/Event Methods/Events/EmptyEvent.cs

    r9609 r9612  
    33using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    44
    5 namespace HeuristicLab.Problems.Robocode
    6 {
    7     class EmptyEvent: CodeNode
    8     {
    9         public override int MinimumArity { get { return 0; } }
    10         public override int MaximumArity { get { return 0; } }
     5namespace HeuristicLab.Problems.Robocode {
     6  [StorableClass]
     7  public class EmptyEvent : CodeNode {
     8    public override int MinimumArity { get { return 0; } }
     9    public override int MaximumArity { get { return 0; } }
    1110
    12         [Storable]
    13         public override string Prefix { get; set; }
     11    [Storable]
     12    public override string Prefix { get; set; }
    1413
    15         [Storable]
    16         public override string Suffix { get; set; }
     14    [Storable]
     15    public override string Suffix { get; set; }
    1716
    18         [StorableConstructor]
    19         private EmptyEvent(bool deserializing) : base(deserializing) { }
    20         private EmptyEvent(EmptyEvent original, Cloner cloner)
    21             : base(original, cloner)
    22         {
    23             this.Prefix = "";
    24             this.Suffix = "";
    25         }
     17    [StorableConstructor]
     18    private EmptyEvent(bool deserializing) : base(deserializing) { }
     19    private EmptyEvent(EmptyEvent original, Cloner cloner)
     20      : base(original, cloner) {
     21      this.Prefix = "";
     22      this.Suffix = "";
     23    }
    2624
    27         public EmptyEvent()
    28             : base("EmptyEvent", "This is a placeholder for an empty event.")
    29         {
    30             this.Prefix = "";
    31             this.Suffix = "";
    32         }
     25    public EmptyEvent()
     26      : base("EmptyEvent", "This is a placeholder for an empty event.") {
     27      this.Prefix = "";
     28      this.Suffix = "";
     29    }
    3330
    34         public override IDeepCloneable Clone(Cloner cloner)
    35         {
    36             return new EmptyEvent(this, cloner);
    37         }
     31    public override IDeepCloneable Clone(Cloner cloner) {
     32      return new EmptyEvent(this, cloner);
     33    }
    3834
    39         public override string Interpret(ISymbolicExpressionTreeNode node, System.Collections.Generic.IEnumerable<ISymbolicExpressionTreeNode> children)
    40         {
    41             return "";
    42         }
     35    public override string Interpret(ISymbolicExpressionTreeNode node, System.Collections.Generic.IEnumerable<ISymbolicExpressionTreeNode> children) {
     36      return "";
    4337    }
     38  }
    4439}
Note: See TracChangeset for help on using the changeset viewer.