@@ -50,6 +50,57 @@ public class TypeMap
50
50
/// </summary>
51
51
public virtual bool DoesMarshalling => true ;
52
52
53
+ public virtual Type SignatureType ( GeneratorKind kind , TypePrinterContext ctx )
54
+ {
55
+ switch ( kind )
56
+ {
57
+ case GeneratorKind . CPlusPlus :
58
+ return CppSignatureType ( ctx ) ;
59
+ case GeneratorKind . CLI :
60
+ return CLISignatureType ( ctx ) ;
61
+ case GeneratorKind . CSharp :
62
+ return CSharpSignatureType ( ctx ) ;
63
+ default :
64
+ throw new System . NotImplementedException ( ) ;
65
+ }
66
+ }
67
+
68
+ public virtual void MarshalToNative ( GeneratorKind kind , MarshalContext ctx )
69
+ {
70
+ switch ( kind )
71
+ {
72
+ case GeneratorKind . CPlusPlus :
73
+ CppMarshalToNative ( ctx ) ;
74
+ return ;
75
+ case GeneratorKind . CLI :
76
+ CLIMarshalToNative ( ctx ) ;
77
+ return ;
78
+ case GeneratorKind . CSharp :
79
+ CSharpMarshalToNative ( ctx as CSharpMarshalContext ) ;
80
+ return ;
81
+ default :
82
+ throw new System . NotImplementedException ( ) ;
83
+ }
84
+ }
85
+
86
+ public virtual void MarshalToManaged ( GeneratorKind kind , MarshalContext ctx )
87
+ {
88
+ switch ( kind )
89
+ {
90
+ case GeneratorKind . CPlusPlus :
91
+ CppMarshalToManaged ( ctx ) ;
92
+ return ;
93
+ case GeneratorKind . CLI :
94
+ CLIMarshalToManaged ( ctx ) ;
95
+ return ;
96
+ case GeneratorKind . CSharp :
97
+ CSharpMarshalToManaged ( ctx as CSharpMarshalContext ) ;
98
+ return ;
99
+ default :
100
+ throw new System . NotImplementedException ( ) ;
101
+ }
102
+ }
103
+
53
104
#region C# backend
54
105
55
106
public virtual Type CSharpSignatureType ( TypePrinterContext ctx )
0 commit comments