Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
IdentifierGeneric.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.Linq;
4 
5 namespace SiliconStudio.Shaders.Ast.Hlsl
6 {
7  /// <summary>
8  /// A generic identifier in the form Typename&lt;identifier1,..., identifiern&gt;
9  /// </summary>
11  {
12  /// <summary>
13  /// Initializes a new instance of the <see cref="IdentifierGeneric"/> class.
14  /// </summary>
16  {
17  IsSpecialReference = true;
18  }
19 
20  public IdentifierGeneric(string name, params Identifier[] composites)
21  : this()
22  {
23  Text = name;
24  Identifiers = composites.ToList();
25  }
26 
27  /// <inheritdoc/>
28  public override string Separator
29  {
30  get
31  {
32  return ",";
33  }
34  }
35 
36  /// <inheritdoc />
37  public override string ToString()
38  {
39  return string.Format("{0}{1}", Text, Identifiers.Count == 0 ? string.Empty : base.ToString());
40  }
41  }
42 }
IdentifierGeneric()
Initializes a new instance of the IdentifierGeneric class.
IdentifierGeneric(string name, params Identifier[] composites)
A generic identifier in the form Typename