Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
TypeReferenceExpression.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.Generic;
5 
6 namespace SiliconStudio.Shaders.Ast
7 {
8  /// <summary>
9  /// A reference to a variable.
10  /// </summary>
12  {
13  /// <summary>
14  /// Initializes a new instance of the <see cref="TypeReferenceExpression"/> class.
15  /// </summary>
17  {
18  }
19 
20  /// <summary>
21  /// Initializes a new instance of the <see cref="TypeReferenceExpression"/> class.
22  /// </summary>
23  /// <param name="type">The type.</param>
25  {
26  Type = type;
27  }
28 
29  /// <summary>
30  /// Gets or sets the type.
31  /// </summary>
32  /// <value>
33  /// The type.
34  /// </value>
35  public TypeBase Type { get; set; }
36 
37  /// <summary>
38  /// Gets or sets the declaration.
39  /// </summary>
40  /// <value>
41  /// The declaration.
42  /// </value>
43  public IDeclaration Declaration { get; set; }
44 
45  /// <inheritdoc/>
46  public override IEnumerable<Node> Childrens()
47  {
48  ChildrenList.Clear();
49  ChildrenList.Add(Type);
50  return ChildrenList;
51  }
52 
53  /// <inheritdoc/>
54  public override string ToString()
55  {
56  return Type.ToString();
57  }
58  }
59 }
TypeReferenceExpression()
Initializes a new instance of the TypeReferenceExpression class.
TypeReferenceExpression(TypeBase type)
Initializes a new instance of the TypeReferenceExpression class.
Base type for all types.
Definition: TypeBase.cs:11
Toplevel interface for a declaration.
Definition: IDeclaration.cs:8
override IEnumerable< Node > Childrens()
Gets the child nodes. An enumeration of child nodes