Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ParadoxStorageQualifier.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Shaders.Ast.Hlsl;
4 
5 namespace SiliconStudio.Paradox.Shaders.Parser.Ast
6 {
8  {
9  /// <summary>
10  /// Stream keyword (stream).
11  /// </summary>
13 
14  /// <summary>
15  /// Patch stream keyword (patchstream).
16  /// </summary>
17  public static readonly SiliconStudio.Shaders.Ast.StorageQualifier PatchStream = new ParadoxStorageQualifier("patchstream");
18 
19  /// <summary>
20  /// Stage keyword (stage).
21  /// </summary>
22  public static readonly SiliconStudio.Shaders.Ast.StorageQualifier Stage = new ParadoxStorageQualifier("stage");
23 
24  /// <summary>
25  /// Clone keyword (clone).
26  /// </summary>
28 
29  /// <summary>
30  /// Override keyword (override).
31  /// </summary>
32  public static readonly SiliconStudio.Shaders.Ast.StorageQualifier Override = new ParadoxStorageQualifier("override");
33 
34  /// <summary>
35  /// Override keyword (override).
36  /// </summary>
37  public static readonly SiliconStudio.Shaders.Ast.StorageQualifier Abstract = new ParadoxStorageQualifier("abstract");
38 
39  /// <summary>
40  /// Compose keyword (compose).
41  /// </summary>
43 
44  /// <summary>
45  /// Internal map used for parsing.
46  /// </summary>
47  private static readonly StringEnumMap Map = PrepareParsing<ParadoxStorageQualifier>();
48 
49  /// <summary>
50  /// Initializes a new instance of the <see cref="ParadoxStorageQualifier"/> class.
51  /// </summary>
53  {
54  }
55 
56  /// <summary>
57  /// Initializes a new instance of the <see cref="ParadoxStorageQualifier"/> class.
58  /// </summary>
59  /// <param name="key">
60  /// The key.
61  /// </param>
62  public ParadoxStorageQualifier(string key)
63  : base(key)
64  {
65  }
66 
67  /// <summary>
68  /// Parses the specified enum name.
69  /// </summary>
70  /// <param name="enumName">
71  /// Name of the enum.
72  /// </param>
73  /// <returns>
74  /// A qualifier
75  /// </returns>
76  public static new SiliconStudio.Shaders.Ast.StorageQualifier Parse(string enumName)
77  {
78  return Map.ParseEnumFromName<SiliconStudio.Shaders.Ast.StorageQualifier>(enumName);
79  }
80 
81  #region Operators
82 
83  /// <summary>
84  /// Implements the operator ==.
85  /// </summary>
86  /// <param name = "left">The left.</param>
87  /// <param name = "right">The right.</param>
88  /// <returns>
89  /// The result of the operator.
90  /// </returns>
92  {
93  return OperatorAnd(left, right);
94  }
95 
96  /// <summary>
97  /// Implements the operator |.
98  /// </summary>
99  /// <param name = "left">The left.</param>
100  /// <param name = "right">The right.</param>
101  /// <returns>
102  /// The result of the operator.
103  /// </returns>
105  {
106  return OperatorOr(left, right);
107  }
108 
109  /// <summary>
110  /// Implements the operator ^.
111  /// </summary>
112  /// <param name = "left">The left.</param>
113  /// <param name = "right">The right.</param>
114  /// <returns>
115  /// The result of the operator.
116  /// </returns>
118  {
119  return OperatorXor(left, right);
120  }
121 
122  #endregion
123  }
124 }
static new SiliconStudio.Shaders.Ast.StorageQualifier Parse(string enumName)
Parses the specified enum name.
The clone mixin to clone the current mixins where the clone is emitted.
Internal dictionary that provides conversion helper methods.
ParadoxStorageQualifier(string key)
Initializes a new instance of the ParadoxStorageQualifier class.
The compose mixin used to specifiy a composition.
ParadoxStorageQualifier()
Initializes a new instance of the ParadoxStorageQualifier class.