Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
AttributeDeclaration.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  /// Describes an attribute.
11  /// </summary>
13  {
14  #region Constructors and Destructors
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref = "AttributeDeclaration" /> class.
18  /// </summary>
20  {
21  Parameters = new List<Literal>();
22  }
23 
24  #endregion
25 
26  #region Public Properties
27 
28  /// <summary>
29  /// Gets or sets the name.
30  /// </summary>
31  /// <value>
32  /// The name.
33  /// </value>
34  public Identifier Name { get; set; }
35 
36  /// <summary>
37  /// Gets or sets the parameters.
38  /// </summary>
39  /// <value>
40  /// The parameters.
41  /// </value>
42  public List<Literal> Parameters { get; set; }
43 
44  #endregion
45 
46  #region Public Methods
47 
48  /// <inheritdoc />
49  public override IEnumerable<Node> Childrens()
50  {
51  return Parameters;
52  }
53 
54  /// <inheritdoc />
55  public override string ToString()
56  {
57  return string.Format("[{0}({1})]", Name, string.Join(",", Parameters));
58  }
59 
60  #endregion
61  }
62 }
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes
AttributeDeclaration()
Initializes a new instance of the AttributeDeclaration class.
An abstract class for attribute definition.