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