Last change
on this file since 15287 was
15273,
checked in by pkimmesw, 7 years ago
|
#2665 Started Plush Encoding, Added Zero Error Individual Count Analyzer
|
File size:
1.7 KB
|
Rev | Line | |
---|
[14727] | 1 | using System;
|
---|
| 2 |
|
---|
| 3 | namespace HeuristicLab.Problems.ProgramSynthesis.Push.Attributes {
|
---|
| 4 | using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
|
---|
| 5 |
|
---|
| 6 | [AttributeUsage(AttributeTargets.Class)]
|
---|
| 7 | public class PushExpressionAttribute : Attribute {
|
---|
[14834] | 8 | public readonly StackTypes StackType;
|
---|
[14777] | 9 | public readonly StackTypes AdditionalStackDependencies;
|
---|
[15032] | 10 | public readonly string Name;
|
---|
| 11 | public readonly string Description;
|
---|
[15273] | 12 | public readonly int? InExpressionNr;
|
---|
[15032] | 13 |
|
---|
| 14 | /// <summary>
|
---|
| 15 | /// Determines if this expression manipulates the exec stack.
|
---|
| 16 | /// </summary>
|
---|
[14952] | 17 | public readonly bool ManipulatesExec;
|
---|
[15032] | 18 |
|
---|
| 19 | /// <summary>
|
---|
| 20 | /// Determines the amount of items fetched form the EXEC stack required for this expression. Used for mapping individuals.
|
---|
| 21 | /// </summary>
|
---|
[15017] | 22 | public readonly uint ExecIn;
|
---|
[14727] | 23 |
|
---|
[15017] | 24 | /// <summary>
|
---|
[15032] | 25 | /// Determines if the expression is visible to the user for configuration purposes.
|
---|
[15017] | 26 | /// </summary>
|
---|
| 27 | public readonly bool IsHidden;
|
---|
| 28 |
|
---|
| 29 | public PushExpressionAttribute(
|
---|
| 30 | StackTypes stackType,
|
---|
[15032] | 31 | string name,
|
---|
| 32 | string description,
|
---|
[15017] | 33 | StackTypes additionalStackDependencies = default(StackTypes),
|
---|
| 34 | uint execIn = 0,
|
---|
[15273] | 35 | bool isHidden = false,
|
---|
| 36 | int inExpressionNr = -1) {
|
---|
[15032] | 37 |
|
---|
[14908] | 38 | StackType = stackType;
|
---|
| 39 | AdditionalStackDependencies = additionalStackDependencies;
|
---|
[15032] | 40 | Name = name;
|
---|
| 41 | Description = description;
|
---|
[15017] | 42 | ExecIn = execIn;
|
---|
| 43 | IsHidden = isHidden;
|
---|
[15273] | 44 | InExpressionNr = inExpressionNr > 0 ? inExpressionNr : default(int?);
|
---|
[14952] | 45 | ManipulatesExec = stackType == StackTypes.Exec || AdditionalStackDependencies.HasFlag(StackTypes.Exec);
|
---|
[14727] | 46 | }
|
---|
[15273] | 47 |
|
---|
| 48 | public bool IsInExpression { get { return this.InExpressionNr.HasValue; } }
|
---|
[14727] | 49 | }
|
---|
| 50 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.