From 2a08b6e05babcee302c837ecfd2de4f352db1651 Mon Sep 17 00:00:00 2001 From: triton Date: Wed, 17 Jul 2013 20:21:38 +0100 Subject: [PATCH] Ignore properties if their getter or setter methods are also ignored. --- src/Generator/Passes/CheckIgnoredDecls.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Generator/Passes/CheckIgnoredDecls.cs b/src/Generator/Passes/CheckIgnoredDecls.cs index ac96f861..32080c40 100644 --- a/src/Generator/Passes/CheckIgnoredDecls.cs +++ b/src/Generator/Passes/CheckIgnoredDecls.cs @@ -116,6 +116,22 @@ namespace CppSharp.Passes return false; } + if (property.GetMethod != null && !VisitFunctionDecl(property.GetMethod)) + { + property.ExplicityIgnored = true; + Console.WriteLine("Property '{0}' was ignored due to ignored getter", + property.Name, msg); + return false; + } + + if (property.SetMethod != null && !VisitFunctionDecl(property.SetMethod)) + { + property.ExplicityIgnored = true; + Console.WriteLine("Property '{0}' was ignored due to ignored setter", + property.Name, msg); + return false; + } + return true; }