@@ -12,12 +12,12 @@ namespace CppSharp.Types.Std
1212 [ TypeMap ( "const char*" , GeneratorKindID = GeneratorKind . CLI_ID ) ]
1313 public partial class ConstCharPointer : TypeMap
1414 {
15- public override Type CLISignatureType ( TypePrinterContext ctx )
15+ public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
1616 {
1717 return new CILType ( typeof ( string ) ) ;
1818 }
1919
20- public override void CLIMarshalToNative ( MarshalContext ctx )
20+ public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
2121 {
2222 ctx . Before . WriteLine (
2323 "auto _{0} = clix::marshalString<clix::E_UTF8>({1});" ,
@@ -26,7 +26,7 @@ public override void CLIMarshalToNative(MarshalContext ctx)
2626 ctx . Return . Write ( "_{0}.c_str()" , ctx . ArgName ) ;
2727 }
2828
29- public override void CLIMarshalToManaged ( MarshalContext ctx )
29+ public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
3030 {
3131 if ( ctx . Parameter != null && ! ctx . Parameter . IsOut &&
3232 ! ctx . Parameter . IsInOut )
@@ -85,18 +85,18 @@ public partial class ConstChar32TPointer : ConstCharPointer
8585 [ TypeMap ( "basic_string<char, char_traits<char>, allocator<char>>" , GeneratorKindID = GeneratorKind . CLI_ID ) ]
8686 public partial class String : TypeMap
8787 {
88- public override Type CLISignatureType ( TypePrinterContext ctx )
88+ public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
8989 {
9090 return new CILType ( typeof ( string ) ) ;
9191 }
9292
93- public override void CLIMarshalToNative ( MarshalContext ctx )
93+ public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
9494 {
9595 ctx . Return . Write ( "clix::marshalString<clix::E_UTF8>({0})" ,
9696 ctx . Parameter . Name ) ;
9797 }
9898
99- public override void CLIMarshalToManaged ( MarshalContext ctx )
99+ public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
100100 {
101101 ctx . Return . Write ( "clix::marshalString<clix::E_UTF8>({0})" ,
102102 ctx . ReturnVarName ) ;
@@ -106,18 +106,18 @@ public override void CLIMarshalToManaged(MarshalContext ctx)
106106 [ TypeMap ( "std::wstring" , GeneratorKindID = GeneratorKind . CLI_ID ) ]
107107 public partial class WString : TypeMap
108108 {
109- public override Type CLISignatureType ( TypePrinterContext ctx )
109+ public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
110110 {
111111 return new CILType ( typeof ( string ) ) ;
112112 }
113113
114- public override void CLIMarshalToNative ( MarshalContext ctx )
114+ public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
115115 {
116116 ctx . Return . Write ( "clix::marshalString<clix::E_UTF16>({0})" ,
117117 ctx . Parameter . Name ) ;
118118 }
119119
120- public override void CLIMarshalToManaged ( MarshalContext ctx )
120+ public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
121121 {
122122 ctx . Return . Write ( "clix::marshalString<clix::E_UTF16>({0})" ,
123123 ctx . ReturnVarName ) ;
@@ -145,13 +145,13 @@ public override bool IsIgnored
145145 }
146146 }
147147
148- public override Type CLISignatureType ( TypePrinterContext ctx )
148+ public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
149149 {
150150 return new CustomType (
151151 $ "::System::Collections::Generic::List<{ ctx . GetTemplateParameterList ( ) } >^") ;
152152 }
153153
154- public override void CLIMarshalToNative ( MarshalContext ctx )
154+ public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
155155 {
156156 var desugared = Type . Desugar ( ) ;
157157 var templateType = desugared as TemplateSpecializationType ;
@@ -209,7 +209,7 @@ public override void CLIMarshalToNative(MarshalContext ctx)
209209 ctx . Return . Write ( tmpVarName ) ;
210210 }
211211
212- public override void CLIMarshalToManaged ( MarshalContext ctx )
212+ public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
213213 {
214214 var desugared = Type . Desugar ( ) ;
215215 var templateType = desugared as TemplateSpecializationType ;
@@ -263,34 +263,23 @@ public partial class Map : TypeMap
263263 {
264264 public override bool IsIgnored { get { return true ; } }
265265
266- public override Type CLISignatureType ( TypePrinterContext ctx )
266+ public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
267267 {
268268 var type = Type as TemplateSpecializationType ;
269269 return new CustomType (
270270 $@ "::System::Collections::Generic::Dictionary<{
271271 type . Arguments [ 0 ] . Type } , { type . Arguments [ 1 ] . Type } >^" ) ;
272272 }
273273
274- public override void CLIMarshalToNative ( MarshalContext ctx )
274+ public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
275275 {
276276 throw new System . NotImplementedException ( ) ;
277277 }
278278
279- public override void CLIMarshalToManaged ( MarshalContext ctx )
279+ public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
280280 {
281281 throw new System . NotImplementedException ( ) ;
282282 }
283-
284- public override Type CSharpSignatureType ( TypePrinterContext ctx )
285- {
286- if ( ctx . Kind == TypePrinterContextKind . Native )
287- return new CustomType ( "Std.Map" ) ;
288-
289- var type = Type as TemplateSpecializationType ;
290- return new CustomType (
291- $@ "System.Collections.Generic.Dictionary<{
292- type . Arguments [ 0 ] . Type } , { type . Arguments [ 1 ] . Type } >" ) ;
293- }
294283 }
295284
296285 [ TypeMap ( "std::list" , GeneratorKindID = GeneratorKind . CLI_ID ) ]
@@ -308,12 +297,12 @@ public partial class SharedPtr : TypeMap
308297 [ TypeMap ( "basic_ostream<char, char_traits<char>>" , GeneratorKind . CLI_ID ) ]
309298 public partial class OStream : TypeMap
310299 {
311- public override Type CLISignatureType ( TypePrinterContext ctx )
300+ public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
312301 {
313302 return new CILType ( typeof ( System . IO . TextWriter ) ) ;
314303 }
315304
316- public override void CLIMarshalToNative ( MarshalContext ctx )
305+ public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
317306 {
318307 var marshal = ( CLIMarshalManagedToNativePrinter ) ctx . MarshalToNative ;
319308 if ( ! ctx . Parameter . Type . Desugar ( ) . IsPointer ( ) )
0 commit comments