From 36a377aa66d5cca6ff763569afe1ea315ddbf9b5 Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 7 Mar 2013 19:53:16 +0000 Subject: [PATCH] Improved marshaling of template specializations. --- src/Generator/Generators/CLI/CLIMarshal.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index 334c2e84..6376e74a 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -139,6 +139,14 @@ namespace Cxxi.Generators.CLI public bool VisitTemplateSpecializationType(TemplateSpecializationType template, TypeQualifiers quals) { + TypeMap typeMap; + if (TypeMapDatabase.FindTypeMap(template, out typeMap)) + { + typeMap.Type = template; + typeMap.CLIMarshalToManaged(Context); + return true; + } + return template.Template.Visit(this); } @@ -416,6 +424,14 @@ namespace Cxxi.Generators.CLI public bool VisitTemplateSpecializationType(TemplateSpecializationType template, TypeQualifiers quals) { + TypeMap typeMap = null; + if (TypeMapDatabase.FindTypeMap(template, out typeMap)) + { + typeMap.Type = template; + typeMap.CLIMarshalToNative(Context); + return true; + } + return template.Template.Visit(this); }