From df58e2774f23ad61e0bae76550a09a625a002448 Mon Sep 17 00:00:00 2001 From: triton Date: Fri, 14 Mar 2014 18:48:35 +0000 Subject: [PATCH] Added an Std.Map wrapper to be able to use it in internal declarations. --- src/Generator/Types/Std/Stdlib.cs | 3 +++ src/Runtime/StdMap.cs | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/Runtime/StdMap.cs diff --git a/src/Generator/Types/Std/Stdlib.cs b/src/Generator/Types/Std/Stdlib.cs index 2fe99a20..19defcb3 100644 --- a/src/Generator/Types/Std/Stdlib.cs +++ b/src/Generator/Types/Std/Stdlib.cs @@ -231,6 +231,9 @@ namespace CppSharp.Types.Std public override string CSharpSignature(CSharpTypePrinterContext ctx) { + if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native) + return "Std.Map"; + var type = Type as TemplateSpecializationType; return string.Format("System.Collections.Generic.Dictionary<{0}, {1}>", type.Arguments[0].Type, type.Arguments[1].Type); diff --git a/src/Runtime/StdMap.cs b/src/Runtime/StdMap.cs new file mode 100644 index 00000000..53d22cb9 --- /dev/null +++ b/src/Runtime/StdMap.cs @@ -0,0 +1,11 @@ +using System; +using System.Runtime.InteropServices; + +namespace Std +{ + [StructLayout(LayoutKind.Sequential)] + public unsafe struct Map + { + + } +}