From e89d6696d8db8157dcfb17bbc4fd491ef8033089 Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 15 Aug 2013 23:55:33 +0100 Subject: [PATCH] Added access specifier checking for methods to CheckIgnoredDecls pass. --- src/Generator/Passes/CheckIgnoredDecls.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Generator/Passes/CheckIgnoredDecls.cs b/src/Generator/Passes/CheckIgnoredDecls.cs index 8577857f..b693fe6b 100644 --- a/src/Generator/Passes/CheckIgnoredDecls.cs +++ b/src/Generator/Passes/CheckIgnoredDecls.cs @@ -81,6 +81,20 @@ namespace CppSharp.Passes return true; } + public override bool VisitMethodDecl(Method method) + { + if (!VisitDeclaration(method)) + return false; + + if (method.Access != AccessSpecifier.Public) + { + method.ExplicityIgnored = true; + return false; + } + + return base.VisitMethodDecl(method); + } + public override bool VisitTypedefDecl(TypedefDecl typedef) { if (!VisitDeclaration(typedef))