Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ShaderBlock.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 Shader block.
11  /// </summary>
13  {
14  #region Public Properties
15 
16  /// <summary>
17  /// Gets or sets a value indicating whether this instance is partial.
18  /// </summary>
19  /// <value><c>true</c> if this instance is partial; otherwise, <c>false</c>.</value>
20  public bool IsPartial { get; set; }
21 
22  /// <summary>
23  /// Gets or sets the body.
24  /// </summary>
25  /// <value>The body.</value>
26  public BlockStatement Body { get; set; }
27 
28  #endregion
29 
30  #region Public Methods
31 
32  /// <inheritdoc />
33  public override IEnumerable<Node> Childrens()
34  {
35  ChildrenList.Clear();
36  ChildrenList.Add(Name);
37  ChildrenList.Add(Body);
38  return ChildrenList;
39  }
40 
41  /// <inheritdoc />
42  public override string ToString()
43  {
44  return string.Format("{0}shader {1} {{...}}", IsPartial ? "partial " : string.Empty, Name);
45  }
46 
47  #endregion
48  }
49 }
A tag interface to identify a container for scope declarations.
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
Definition: ShaderBlock.cs:33
Base type for all types.
Definition: TypeBase.cs:11