Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
Technique.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  /// Technique description.
11  /// </summary>
13  {
14  #region Constructors and Destructors
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref = "Technique" /> class.
18  /// </summary>
19  public Technique()
20  {
21  Attributes = new List<AttributeBase>();
22  Passes = new List<Pass>();
23  }
24 
25  #endregion
26 
27  #region Public Properties
28 
29  /// <summary>
30  /// Gets or sets the type.
31  /// </summary>
32  /// <value>
33  /// The type.
34  /// </value>
35  public Identifier Type { get; set; }
36 
37  /// <summary>
38  /// Gets or sets the attributes.
39  /// </summary>
40  /// <value>
41  /// The attributes.
42  /// </value>
43  public List<AttributeBase> Attributes { get; set; }
44 
45  /// <summary>
46  /// Gets or sets the name.
47  /// </summary>
48  /// <value>
49  /// The name.
50  /// </value>
51  public Identifier Name { get; set; }
52 
53  /// <summary>
54  /// Gets or sets the passes.
55  /// </summary>
56  /// <value>
57  /// The passes.
58  /// </value>
59  public List<Pass> Passes { get; set; }
60 
61  #endregion
62 
63  #region Public Methods
64 
65  /// <inheritdoc />
66  public override IEnumerable<Node> Childrens()
67  {
68  ChildrenList.Clear();
69  ChildrenList.AddRange(Attributes);
70  ChildrenList.Add(Name);
71  ChildrenList.AddRange(Passes);
72  return ChildrenList;
73  }
74 
75  /// <inheritdoc />
76  public override string ToString()
77  {
78  return string.Format("technique {0}{{...}}", Name != null ? Name + " " : string.Empty);
79  }
80 
81  #endregion
82  }
83 }
Abstract node.
Definition: Node.cs:15
Toplevel interface for a declaration.
Definition: IDeclaration.cs:8
Technique()
Initializes a new instance of the Technique class.
Definition: Technique.cs:19
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
Definition: Technique.cs:66