From 05dec960ffea85c047d565bcf4e21694ce65d112 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 3 Feb 2013 23:46:03 +0000 Subject: [PATCH] Introduce the ITypedDecl interface. --- src/Bridge/Declaration.cs | 6 ++++++ src/Bridge/Field.cs | 2 +- src/Bridge/Function.cs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Bridge/Declaration.cs b/src/Bridge/Declaration.cs index a78b52d0..8469dba2 100644 --- a/src/Bridge/Declaration.cs +++ b/src/Bridge/Declaration.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Cxxi; namespace Cxxi { @@ -8,6 +9,11 @@ namespace Cxxi Declaration PreviousDecl { get; } } + public interface ITypedDecl + { + Type Type { get; } + } + /// /// Represents a C++ declaration. /// diff --git a/src/Bridge/Field.cs b/src/Bridge/Field.cs index 09a307de..493abbb6 100644 --- a/src/Bridge/Field.cs +++ b/src/Bridge/Field.cs @@ -3,7 +3,7 @@ namespace Cxxi /// /// Represents a a C/C++ record field Decl. /// - public class Field : Declaration + public class Field : Declaration, ITypedDecl { public Type Type { get; set; } public AccessSpecifier Access { get; set; } diff --git a/src/Bridge/Function.cs b/src/Bridge/Function.cs index b2dfcb3e..d9948214 100644 --- a/src/Bridge/Function.cs +++ b/src/Bridge/Function.cs @@ -21,7 +21,7 @@ namespace Cxxi Unknown } - public class Parameter : Declaration + public class Parameter : Declaration, ITypedDecl { public Parameter() {