Browse Source

Introduce the ITypedDecl interface.

pull/1/head
triton 13 years ago
parent
commit
05dec960ff
  1. 6
      src/Bridge/Declaration.cs
  2. 2
      src/Bridge/Field.cs
  3. 2
      src/Bridge/Function.cs

6
src/Bridge/Declaration.cs

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Cxxi;
namespace Cxxi namespace Cxxi
{ {
@ -8,6 +9,11 @@ namespace Cxxi
Declaration PreviousDecl { get; } Declaration PreviousDecl { get; }
} }
public interface ITypedDecl
{
Type Type { get; }
}
/// <summary> /// <summary>
/// Represents a C++ declaration. /// Represents a C++ declaration.
/// </summary> /// </summary>

2
src/Bridge/Field.cs

@ -3,7 +3,7 @@ namespace Cxxi
/// <summary> /// <summary>
/// Represents a a C/C++ record field Decl. /// Represents a a C/C++ record field Decl.
/// </summary> /// </summary>
public class Field : Declaration public class Field : Declaration, ITypedDecl
{ {
public Type Type { get; set; } public Type Type { get; set; }
public AccessSpecifier Access { get; set; } public AccessSpecifier Access { get; set; }

2
src/Bridge/Function.cs

@ -21,7 +21,7 @@ namespace Cxxi
Unknown Unknown
} }
public class Parameter : Declaration public class Parameter : Declaration, ITypedDecl
{ {
public Parameter() public Parameter()
{ {

Loading…
Cancel
Save