Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
CompileExpression.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;
4 using System.Collections;
5 using System.Collections.Generic;
6 
7 namespace SiliconStudio.Shaders.Ast.Hlsl
8 {
9  /// <summary>
10  /// A Compile expression.
11  /// </summary>
13  {
14  #region Constructors and Destructors
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref = "CompileExpression" /> class.
18  /// </summary>
20  {
21  }
22 
23  /// <summary>
24  /// Initializes a new instance of the <see cref="CompileExpression"/> class.
25  /// </summary>
26  /// <param name="profile">
27  /// The profile.
28  /// </param>
29  /// <param name="function">
30  /// The function.
31  /// </param>
32  public CompileExpression(string profile, MethodInvocationExpression function)
33  {
34  Profile = new Identifier(profile);
35  Function = function;
36  }
37 
38  #endregion
39 
40  #region Public Properties
41 
42  /// <summary>
43  /// Gets or sets the function.
44  /// </summary>
45  /// <value>
46  /// The function.
47  /// </value>
48  public Expression Function { get; set; }
49 
50  /// <summary>
51  /// Gets or sets the profile.
52  /// </summary>
53  /// <value>
54  /// The profile.
55  /// </value>
56  public Identifier Profile { get; set; }
57 
58  #endregion
59 
60  #region Public Methods
61 
62  /// <inheritdoc />
63  public override IEnumerable<Node> Childrens()
64  {
65  ChildrenList.Clear();
66  ChildrenList.Add(Profile);
67  ChildrenList.Add(Function);
68  return ChildrenList;
69  }
70 
71  /// <inheritdoc />
72  public override string ToString()
73  {
74  return string.Format("compile {0} {1}", Profile, Function);
75  }
76 
77  #endregion
78  }
79 }
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
CompileExpression()
Initializes a new instance of the CompileExpression class.
CompileExpression(string profile, MethodInvocationExpression function)
Initializes a new instance of the CompileExpression class.