Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
Expression.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 
5 using SiliconStudio.Shaders.Visitor;
6 
7 namespace SiliconStudio.Shaders.Ast
8 {
9  /// <summary>
10  /// An expression.
11  /// </summary>
13  {
14  /// <summary>
15  /// Initializes a new instance of the <see cref="Expression"/> class.
16  /// </summary>
17  public Expression()
18  {
20  }
21 
22  /// <summary>
23  /// Gets or sets the type reference.
24  /// </summary>
25  /// <value>
26  /// The type reference.
27  /// </value>
28  public TypeInference TypeInference { get; set; }
29 
30  /// <inheritdoc/>
31  public override string ToString()
32  {
33  return string.Empty;
34  }
35 
36  public bool Equals(Expression other)
37  {
38  return !ReferenceEquals(null, other);
39  }
40 
41  public override bool Equals(object obj)
42  {
43  if (ReferenceEquals(null, obj)) return false;
44  if (ReferenceEquals(this, obj)) return true;
45  if (obj.GetType() != typeof(Expression)) return false;
46  return Equals((Expression)obj);
47  }
48 
49  public override int GetHashCode()
50  {
51  return 0;
52  }
53 
54  public static bool operator ==(Expression left, Expression right)
55  {
56  return Equals(left, right);
57  }
58 
59  public static bool operator !=(Expression left, Expression right)
60  {
61  return !Equals(left, right);
62  }
63  }
64 }
bool Equals(Expression other)
Definition: Expression.cs:36
Expression()
Initializes a new instance of the Expression class.
Definition: Expression.cs:17
Abstract node.
Definition: Node.cs:15
A tag interface for an object referencing a type.
override bool Equals(object obj)
Definition: Expression.cs:41