|
|
|
@ -15,17 +15,18 @@ namespace CppSharp.Passes |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override bool VisitClassTemplateSpecializationDecl(ClassTemplateSpecialization specialization) |
|
|
|
public override bool VisitClassDecl(Class @class) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!specialization.IsDependent && |
|
|
|
if (!base.VisitClassDecl(@class) || !@class.IsDependent) |
|
|
|
(!specialization.TranslationUnit.IsSystemHeader || |
|
|
|
return false; |
|
|
|
!specialization.Ignore)) |
|
|
|
|
|
|
|
|
|
|
|
var cppTypePrinter = new CppTypePrinter |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
PrintScopeKind = CppTypePrintScopeKind.Qualified, |
|
|
|
|
|
|
|
PrintLogicalNames = true |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
foreach (var specialization in @class.Specializations.Where(s => !s.IsDependent && !s.Ignore)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var cppTypePrinter = new CppTypePrinter |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
PrintScopeKind = CppTypePrintScopeKind.Qualified, |
|
|
|
|
|
|
|
PrintLogicalNames = true |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
var cppCode = specialization.Visit(cppTypePrinter); |
|
|
|
var cppCode = specialization.Visit(cppTypePrinter); |
|
|
|
var module = specialization.TranslationUnit.Module; |
|
|
|
var module = specialization.TranslationUnit.Module; |
|
|
|
if (templateInstantiations.ContainsKey(module)) |
|
|
|
if (templateInstantiations.ContainsKey(module)) |
|
|
|
|