Fix smart pointer wrappers. The virtual/override/new keyword is not generated for each method as the smart pointer class does not mirror the underlying pointer class inheritance hierarchy. SF #1496535

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-10-24 20:29:27 +00:00
commit 016db92c82

View file

@ -1921,6 +1921,8 @@ class CSHARP : public Language {
} else { } else {
methodmods = (!is_public(n) ? protected_string : public_string); methodmods = (!is_public(n) ? protected_string : public_string);
Printf(function_code, " %s ", methodmods); Printf(function_code, " %s ", methodmods);
if (!is_smart_pointer()) {
// Smart pointer classes do not mirror the inheritance hierarchy of the underlying pointer type, so no virtual/override/new required.
if (Getattr(n,"override")) if (Getattr(n,"override"))
Printf(function_code, "override "); Printf(function_code, "override ");
else if (checkAttribute(n, "storage", "virtual")) else if (checkAttribute(n, "storage", "virtual"))
@ -1928,6 +1930,7 @@ class CSHARP : public Language {
if (Getattr(n, "hides")) if (Getattr(n, "hides"))
Printf(function_code, "new "); Printf(function_code, "new ");
} }
}
if (static_flag) if (static_flag)
Printf(function_code, "static "); Printf(function_code, "static ");
Printf(function_code, "%s %s(", return_type, proxy_function_name); Printf(function_code, "%s %s(", return_type, proxy_function_name);