From d9801eb00b7ea956742b81c01a346fbcff9bf15d Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 10 Mar 2013 00:51:35 +0000 Subject: [PATCH] Added an INamedDecl interface for named declarations. --- src/Bridge/Declaration.cs | 7 ++++++- src/Bridge/Enumeration.cs | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Bridge/Declaration.cs b/src/Bridge/Declaration.cs index 80a741c2..b88aebdb 100644 --- a/src/Bridge/Declaration.cs +++ b/src/Bridge/Declaration.cs @@ -15,6 +15,11 @@ namespace Cxxi QualifiedType QualifiedType { get; } } + public interface INamedDecl + { + string Name { get; set; } + } + [Flags] public enum IgnoreFlags { @@ -27,7 +32,7 @@ namespace Cxxi /// /// Represents a C++ declaration. /// - public abstract class Declaration + public abstract class Declaration : INamedDecl { // Namespace the declaration is contained in. public Namespace Namespace; diff --git a/src/Bridge/Enumeration.cs b/src/Bridge/Enumeration.cs index 4dcf70f2..a67ac8cb 100644 --- a/src/Bridge/Enumeration.cs +++ b/src/Bridge/Enumeration.cs @@ -19,9 +19,9 @@ namespace Cxxi /// /// Represents a C/C++ enumeration item. /// - public class Item + public class Item : INamedDecl { - public string Name; + public string Name { get; set; } public long Value; public string Expression; public string Comment;