Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ParadoxParsingInfo.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 System.Collections.Generic;
4 
5 using SiliconStudio.Paradox.Shaders.Parser.Mixins;
6 using SiliconStudio.Shaders.Ast;
7 using SiliconStudio.Shaders.Ast.Hlsl;
8 using SiliconStudio.Shaders.Parser;
9 
10 namespace SiliconStudio.Paradox.Shaders.Parser.Analysis
11 {
12  internal class ParadoxParsingInfo
13  {
14  #region Public properties
15 
16  /// <summary>
17  /// Variables that referenced the stage class ( "= stage" )
18  /// </summary>
19  public HashSet<Variable> StageInitializedVariables { get; private set; }
20 
21  /// <summary>
22  /// All typedefs
23  /// </summary>
24  public List<Typedef> Typedefs { get; private set; }
25 
26  /// <summary>
27  /// All structure definitions
28  /// </summary>
29  public List<StructType> StructureDefinitions { get; private set; }
30 
31  /// <summary>
32  /// All the base method calls (base.xxx)
33  /// </summary>
34  public HashSet<MethodInvocationExpression> BaseMethodCalls { get; private set; }
35 
36  /// <summary>
37  /// All the method calls that are not base
38  /// </summary>
39  public HashSet<MethodInvocationExpression> ThisMethodCalls { get; private set; }
40 
41  /// <summary>
42  /// All the method calls to stage methods
43  /// </summary>
44  public HashSet<MethodInvocationExpression> StageMethodCalls { get; private set; }
45 
46  /// <summary>
47  /// All foreach statements
48  /// </summary>
49  public HashSet<StatementNodeCouple> ForEachStatements { get; private set; }
50 
51  /// <summary>
52  /// References to members of the current shader
53  /// </summary>
54  public ReferencesPool ClassReferences { get; private set; }
55 
56  /// <summary>
57  /// Static references to class members
58  /// </summary>
59  public ReferencesPool StaticReferences { get; private set; }
60 
61  /// <summary>
62  /// References to extern members
63  /// </summary>
64  public ReferencesPool ExternReferences { get; private set; }
65 
66  /// <summary>
67  /// References to stage initialized variables and methods
68  /// </summary>
69  public ReferencesPool StageInitReferences { get; private set; }
70 
71  /// <summary>
72  /// List of the static classes
73  /// </summary>
74  public HashSet<ModuleMixin> StaticClasses { get; private set; }
75 
76  #endregion
77 
78  #region Public members
79 
80  /// <summary>
81  /// Error logger
82  /// </summary>
83  public ParsingResult ErrorsWarnings = null;
84 
85  #endregion
86 
87  #region Constructor
88 
89  public ParadoxParsingInfo()
90  {
91  StageInitializedVariables = new HashSet<Variable>();
92  Typedefs = new List<Typedef>();
93  StructureDefinitions = new List<StructType>();
94  BaseMethodCalls = new HashSet<MethodInvocationExpression>();
95  ThisMethodCalls = new HashSet<MethodInvocationExpression>();
96  StageMethodCalls = new HashSet<MethodInvocationExpression>();
97  ForEachStatements = new HashSet<StatementNodeCouple>();
98  ClassReferences = new ReferencesPool();
99  StaticReferences = new ReferencesPool();
100  ExternReferences = new ReferencesPool();
101  StageInitReferences = new ReferencesPool();
102  StaticClasses = new HashSet<ModuleMixin>();
103  }
104 
105  #endregion
106  }
107 }