@@ -50,10 +50,6 @@ namespace Allocator
50
50
[ StructLayout ( LayoutKind . Explicit , Size = 0 ) ]
51
51
public unsafe partial struct __Internal
52
52
{
53
- [ SuppressUnmanagedCodeSecurity ]
54
- [ DllImport ( "Std-symbols" , CallingConvention = global ::System . Runtime . InteropServices . CallingConvention . Cdecl ,
55
- EntryPoint = "_ZNSt3__19allocatorIcEC2Ev" ) ]
56
- internal static extern void ctorc__N_std_N___1_S_allocator__C ( global ::System . IntPtr instance ) ;
57
53
}
58
54
}
59
55
@@ -98,20 +94,6 @@ protected Allocator(void* native, bool skipVTables = false)
98
94
__Instance = new global ::System . IntPtr ( native ) ;
99
95
}
100
96
101
- public Allocator ( )
102
- {
103
- var ___Tp = typeof ( _Tp ) ;
104
- if ( ___Tp . IsAssignableFrom ( typeof ( sbyte ) ) )
105
- {
106
- __Instance = Marshal . AllocHGlobal ( sizeof ( global ::Std . Allocator . __Internal ) ) ;
107
- __ownsNativeInstance = true ;
108
- NativeToManagedMap [ __Instance ] = this ;
109
- global ::Std . Allocator . __Internal . ctorc__N_std_N___1_S_allocator__C ( ( __Instance + __PointerAdjustment ) ) ;
110
- return ;
111
- }
112
- throw new ArgumentOutOfRangeException ( "_Tp" , string . Join ( ", " , new [ ] { typeof ( _Tp ) . FullName } ) , "global::Std.Allocator<_Tp> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte>." ) ;
113
- }
114
-
115
97
public void Dispose ( )
116
98
{
117
99
Dispose ( disposing : true ) ;
@@ -661,47 +643,6 @@ public unsafe partial struct __Internalc__N_std_N___1_S_map____N_std_N___1_S_bas
661
643
662
644
namespace Std
663
645
{
664
- public unsafe static partial class BasicStringExtensions
665
- {
666
- [ StructLayout ( LayoutKind . Explicit , Size = 0 ) ]
667
- public partial struct __Internal
668
- {
669
- [ SuppressUnmanagedCodeSecurity ]
670
- [ DllImport ( "Std-symbols" , CallingConvention = global ::System . Runtime . InteropServices . CallingConvention . Cdecl ,
671
- EntryPoint = "_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcRKS4_" ) ]
672
- internal static extern global ::System . IntPtr BasicString ( global ::System . IntPtr instance , [ MarshalAs ( UnmanagedType . LPStr ) ] string __s , global ::System . IntPtr __a ) ;
673
-
674
- [ SuppressUnmanagedCodeSecurity ]
675
- [ DllImport ( "Std-symbols" , CallingConvention = global ::System . Runtime . InteropServices . CallingConvention . Cdecl ,
676
- EntryPoint = "_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv" ) ]
677
- internal static extern global ::System . IntPtr CStr ( global ::System . IntPtr instance ) ;
678
- }
679
-
680
- public static global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > BasicString ( string __s , global ::Std . Allocator < sbyte > __a )
681
- {
682
- if ( ReferenceEquals ( __a , null ) )
683
- throw new global ::System . ArgumentNullException ( "__a" , "Cannot be null because it is a C++ reference (&)." ) ;
684
- var __arg1 = __a . __Instance ;
685
- if ( ReferenceEquals ( __s , null ) )
686
- throw new global ::System . ArgumentNullException ( __s , "The underlying std::string cannot take null." ) ;
687
- var __ret = Marshal . AllocHGlobal ( 12 ) ;
688
- __Internal . BasicString ( __ret , __s , __arg1 ) ;
689
- global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > __result0 ;
690
- if ( __ret == IntPtr . Zero ) __result0 = null ;
691
- else if ( global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > . NativeToManagedMap . ContainsKey ( __ret ) )
692
- __result0 = ( global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > ) global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > . NativeToManagedMap [ __ret ] ;
693
- else __result0 = global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > . __CreateInstance ( __ret ) ;
694
- return __result0 ;
695
- }
696
-
697
- public static string CStr ( this global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > @this )
698
- {
699
- var __arg0 = ReferenceEquals ( @this , null ) ? global ::System . IntPtr . Zero : @this . __Instance ;
700
- var __ret = __Internal . CStr ( __arg0 ) ;
701
- return Marshal . PtrToStringAnsi ( __ret ) ;
702
- }
703
- }
704
-
705
646
namespace BasicString
706
647
{
707
648
[ StructLayout ( LayoutKind . Explicit , Size = 12 ) ]
@@ -710,6 +651,11 @@ public unsafe partial struct __Internalc__N_std_N___1_S_basic_string__C___N_std_
710
651
[ FieldOffset ( 0 ) ]
711
652
internal global ::Std . CompressedPair . __Internal __r_ ;
712
653
654
+ [ SuppressUnmanagedCodeSecurity ]
655
+ [ DllImport ( "Std-symbols" , CallingConvention = global ::System . Runtime . InteropServices . CallingConvention . Cdecl ,
656
+ EntryPoint = "_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2Ev" ) ]
657
+ internal static extern void ctorc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C ( global ::System . IntPtr instance ) ;
658
+
713
659
[ SuppressUnmanagedCodeSecurity ]
714
660
[ DllImport ( "Std-symbols" , CallingConvention = global ::System . Runtime . InteropServices . CallingConvention . Cdecl ,
715
661
EntryPoint = "_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev" ) ]
@@ -847,6 +793,22 @@ protected BasicString(void* native, bool skipVTables = false)
847
793
__Instance = new global ::System . IntPtr ( native ) ;
848
794
}
849
795
796
+ public BasicString ( )
797
+ {
798
+ var ___CharT = typeof ( _CharT ) ;
799
+ var ___Traits = typeof ( _Traits ) ;
800
+ var ___Allocator = typeof ( _Allocator ) ;
801
+ if ( ___CharT . IsAssignableFrom ( typeof ( sbyte ) ) && ___Traits . IsAssignableFrom ( typeof ( global ::Std . CharTraits < sbyte > ) ) && ___Allocator . IsAssignableFrom ( typeof ( global ::Std . Allocator < sbyte > ) ) )
802
+ {
803
+ __Instance = Marshal . AllocHGlobal ( sizeof ( global ::Std . BasicString . __Internalc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C ) ) ;
804
+ __ownsNativeInstance = true ;
805
+ NativeToManagedMap [ __Instance ] = this ;
806
+ global ::Std . BasicString . __Internalc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C . ctorc__N_std_N___1_S_basic_string__C___N_std_N___1_S_char_traits__C___N_std_N___1_S_allocator__C ( ( __Instance + __PointerAdjustment ) ) ;
807
+ return ;
808
+ }
809
+ throw new ArgumentOutOfRangeException ( "_CharT, _Traits, _Allocator" , string . Join ( ", " , new [ ] { typeof ( _CharT ) . FullName , typeof ( _Traits ) . FullName , typeof ( _Allocator ) . FullName } ) , "global::Std.BasicString<_CharT, _Traits, _Allocator> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>." ) ;
810
+ }
811
+
850
812
public void Dispose ( )
851
813
{
852
814
Dispose ( disposing : true ) ;
@@ -874,6 +836,18 @@ public virtual void Dispose(bool disposing)
874
836
Marshal . FreeHGlobal ( __Instance ) ;
875
837
__Instance = IntPtr . Zero ;
876
838
}
839
+
840
+ public global ::Std . BasicString < _CharT , _Traits , _Allocator > Assign ( global ::Std . BasicString < _CharT , _Traits , _Allocator > str )
841
+ {
842
+ var ___CharT = typeof ( _CharT ) ;
843
+ var ___Traits = typeof ( _Traits ) ;
844
+ var ___Allocator = typeof ( _Allocator ) ;
845
+ if ( ___CharT . IsAssignableFrom ( typeof ( sbyte ) ) && ___Traits . IsAssignableFrom ( typeof ( global ::Std . CharTraits < sbyte > ) ) && ___Allocator . IsAssignableFrom ( typeof ( global ::Std . Allocator < sbyte > ) ) )
846
+ {
847
+ throw new MissingMethodException ( "Method Assign ignored in specialization global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>." ) ;
848
+ }
849
+ throw new ArgumentOutOfRangeException ( "_CharT, _Traits, _Allocator" , string . Join ( ", " , new [ ] { typeof ( _CharT ) . FullName , typeof ( _Traits ) . FullName , typeof ( _Allocator ) . FullName } ) , "global::Std.BasicString<_CharT, _Traits, _Allocator> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>." ) ;
850
+ }
877
851
}
878
852
879
853
namespace CharTraits
@@ -941,4 +915,40 @@ public virtual void Dispose(bool disposing)
941
915
__Instance = IntPtr . Zero ;
942
916
}
943
917
}
918
+
919
+ public unsafe static partial class BasicStringExtensions
920
+ {
921
+ [ StructLayout ( LayoutKind . Explicit , Size = 0 ) ]
922
+ public partial struct __Internal
923
+ {
924
+ [ SuppressUnmanagedCodeSecurity ]
925
+ [ DllImport ( "Std-symbols" , CallingConvention = global ::System . Runtime . InteropServices . CallingConvention . Cdecl ,
926
+ EntryPoint = "_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc" ) ]
927
+ internal static extern global ::System . IntPtr Assign ( global ::System . IntPtr instance , [ MarshalAs ( UnmanagedType . LPStr ) ] string __s ) ;
928
+
929
+ [ SuppressUnmanagedCodeSecurity ]
930
+ [ DllImport ( "Std-symbols" , CallingConvention = global ::System . Runtime . InteropServices . CallingConvention . Cdecl ,
931
+ EntryPoint = "_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv" ) ]
932
+ internal static extern global ::System . IntPtr CStr ( global ::System . IntPtr instance ) ;
933
+ }
934
+
935
+ public static global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > Assign ( this global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > @this , string __s )
936
+ {
937
+ var __arg0 = ReferenceEquals ( @this , null ) ? global ::System . IntPtr . Zero : @this . __Instance ;
938
+ var __ret = __Internal . Assign ( __arg0 , __s ) ;
939
+ global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > __result0 ;
940
+ if ( __ret == IntPtr . Zero ) __result0 = null ;
941
+ else if ( global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > . NativeToManagedMap . ContainsKey ( __ret ) )
942
+ __result0 = ( global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > ) global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > . NativeToManagedMap [ __ret ] ;
943
+ else __result0 = global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > . __CreateInstance ( __ret ) ;
944
+ return __result0 ;
945
+ }
946
+
947
+ public static string CStr ( this global ::Std . BasicString < sbyte , global ::Std . CharTraits < sbyte > , global ::Std . Allocator < sbyte > > @this )
948
+ {
949
+ var __arg0 = ReferenceEquals ( @this , null ) ? global ::System . IntPtr . Zero : @this . __Instance ;
950
+ var __ret = __Internal . CStr ( __arg0 ) ;
951
+ return Marshal . PtrToStringAnsi ( __ret ) ;
952
+ }
953
+ }
944
954
}
0 commit comments