Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ParametersBlock.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.Shaders.Ast;
6 
7 namespace SiliconStudio.Paradox.Shaders.Parser.Ast
8 {
9  /// <summary>
10  /// A params block.
11  /// </summary>
13  {
14  #region Constructors and Destructors
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref = "ParametersBlock" /> class.
18  /// </summary>
19  public ParametersBlock()
20  {
21  }
22 
23  /// <summary>
24  /// Initializes a new instance of the <see cref="ParametersBlock" /> class.
25  /// </summary>
26  /// <param name="name">The name.</param>
27  /// <param name="statements">The statements.</param>
28  public ParametersBlock(Identifier name, BlockStatement statements)
29  {
30  Name = name;
31  Body = statements;
32  }
33 
34  #endregion
35 
36  #region Public Properties
37 
38  public Identifier Name { get; set; }
39 
40  public BlockStatement Body { get; set; }
41 
42  #endregion
43 
44  #region Public Methods
45 
46  /// <inheritdoc />
47  public override IEnumerable<Node> Childrens()
48  {
49  ChildrenList.Clear();
50  ChildrenList.Add(Name);
51  ChildrenList.Add(Body);
52  return ChildrenList;
53  }
54 
55  /// <inheritdoc />
56  public override string ToString()
57  {
58  return string.Format("params {0} {{...}}", Name);
59  }
60 
61  #endregion
62  }
63 }
A tag interface to identify a container for scope declarations.
Abstract node.
Definition: Node.cs:15
ParametersBlock(Identifier name, BlockStatement statements)
Initializes a new instance of the ParametersBlock class.
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
ParametersBlock()
Initializes a new instance of the ParametersBlock class.