|
|
@ -162,8 +162,7 @@ namespace CppSharp.Passes |
|
|
|
bool isAbstract = ((Class)method.Namespace).IsAbstract; |
|
|
|
bool isAbstract = ((Class)method.Namespace).IsAbstract; |
|
|
|
if (method.Access == AccessSpecifier.Protected || isAbstract) |
|
|
|
if (method.Access == AccessSpecifier.Protected || isAbstract) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Write($@"{{ ::new ({Helpers.InstanceField}) {
|
|
|
|
Write($@"{{ ::new ({Helpers.InstanceField}) {wrapper}{method.Namespace.Name}({@params}); }}"); |
|
|
|
wrapper}{method.Namespace.Name}({@params}); }}");
|
|
|
|
|
|
|
|
WriteLine(!isAbstract ? " };" : string.Empty); |
|
|
|
WriteLine(!isAbstract ? " };" : string.Empty); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
@ -210,12 +209,10 @@ namespace CppSharp.Passes |
|
|
|
{ |
|
|
|
{ |
|
|
|
string @class = wrapper + method.Namespace.Name; |
|
|
|
string @class = wrapper + method.Namespace.Name; |
|
|
|
WriteLine($"() {{ this->~{@class}(); }} }};"); |
|
|
|
WriteLine($"() {{ this->~{@class}(); }} }};"); |
|
|
|
Write($@"extern ""C"" {GetExporting()}void {wrapper}({
|
|
|
|
Write($@"extern ""C"" {GetExporting()}void {wrapper}({@class}* {instance}) {{ {instance}->{wrapper}Protected"); |
|
|
|
@class}* {instance}) {{ {instance}->{wrapper}Protected");
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
Write($@"({$"{@namespace}*{instance}"}) {{ {
|
|
|
|
Write($@"({$"{@namespace}*{instance}"}) {{ {instance}->~{method.Namespace.Name}"); |
|
|
|
instance}->~{method.Namespace.Name}");
|
|
|
|
|
|
|
|
WriteLine("(); }"); |
|
|
|
WriteLine("(); }"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -238,8 +235,7 @@ namespace CppSharp.Passes |
|
|
|
|
|
|
|
|
|
|
|
var method = function as Method; |
|
|
|
var method = function as Method; |
|
|
|
if (function.Namespace.Access == AccessSpecifier.Protected) |
|
|
|
if (function.Namespace.Access == AccessSpecifier.Protected) |
|
|
|
Write($@"class {wrapper}{function.Namespace.Name} : public {
|
|
|
|
Write($@"class {wrapper}{function.Namespace.Name} : public {function.Namespace.Namespace.Visit(cppTypePrinter)} {{ "); |
|
|
|
function.Namespace.Namespace.Visit(cppTypePrinter)} {{ ");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string variable = $@"({(method?.IsStatic == false ?
|
|
|
|
string variable = $@"({(method?.IsStatic == false ?
|
|
|
|
(@namespace + "::") : string.Empty)}*{wrapper}){signature}";
|
|
|
|
(@namespace + "::") : string.Empty)}*{wrapper}){signature}";
|
|
|
|