mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
317 lines
9.5 KiB
317 lines
9.5 KiB
//---------------------------------------------------------------------------- |
|
// <auto-generated> |
|
// This is autogenerated code by CppSharp. |
|
// Do not edit this file or all your changes will be lost after re-generation. |
|
// </auto-generated> |
|
//---------------------------------------------------------------------------- |
|
using System; |
|
using System.Runtime.InteropServices; |
|
using System.Security; |
|
|
|
namespace std |
|
{ |
|
public unsafe partial class allocator : IDisposable |
|
{ |
|
[StructLayout(LayoutKind.Explicit, Size = 0)] |
|
public unsafe partial struct Internal |
|
{ |
|
[SuppressUnmanagedCodeSecurity] |
|
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, |
|
EntryPoint="??0?$allocator@D@std@@QEAA@XZ")] |
|
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance); |
|
} |
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
protected int __PointerAdjustment; |
|
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, allocator> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, allocator>(); |
|
protected void*[] __OriginalVTables; |
|
|
|
protected bool __ownsNativeInstance; |
|
|
|
public static allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false) |
|
{ |
|
return new allocator(native.ToPointer(), skipVTables); |
|
} |
|
|
|
public static allocator __CreateInstance(allocator.Internal native, bool skipVTables = false) |
|
{ |
|
return new allocator(native, skipVTables); |
|
} |
|
|
|
private static void* __CopyValue(allocator.Internal native) |
|
{ |
|
var ret = Marshal.AllocHGlobal(0); |
|
*(allocator.Internal*) ret = native; |
|
return ret.ToPointer(); |
|
} |
|
|
|
private allocator(allocator.Internal native, bool skipVTables = false) |
|
: this(__CopyValue(native), skipVTables) |
|
{ |
|
__ownsNativeInstance = true; |
|
NativeToManagedMap[__Instance] = this; |
|
} |
|
|
|
protected allocator(void* native, bool skipVTables = false) |
|
{ |
|
if (native == null) |
|
return; |
|
__Instance = new global::System.IntPtr(native); |
|
} |
|
|
|
public allocator() |
|
{ |
|
__Instance = Marshal.AllocHGlobal(0); |
|
__ownsNativeInstance = true; |
|
NativeToManagedMap[__Instance] = this; |
|
Internal.ctor_0((__Instance + __PointerAdjustment)); |
|
} |
|
|
|
public void Dispose() |
|
{ |
|
Dispose(disposing: true); |
|
} |
|
|
|
protected virtual void Dispose(bool disposing) |
|
{ |
|
global::std.allocator __dummy; |
|
NativeToManagedMap.TryRemove(__Instance, out __dummy); |
|
if (__ownsNativeInstance) |
|
Marshal.FreeHGlobal(__Instance); |
|
} |
|
} |
|
|
|
public unsafe partial class _Alloc_allocate |
|
{ |
|
[StructLayout(LayoutKind.Explicit, Size = 0)] |
|
public partial struct Internal |
|
{ |
|
} |
|
} |
|
|
|
public unsafe partial class _Alloc_construct |
|
{ |
|
[StructLayout(LayoutKind.Explicit, Size = 0)] |
|
public partial struct Internal |
|
{ |
|
} |
|
} |
|
|
|
public unsafe partial class _Alloc_destroy |
|
{ |
|
[StructLayout(LayoutKind.Explicit, Size = 0)] |
|
public partial struct Internal |
|
{ |
|
} |
|
} |
|
|
|
public unsafe partial class _Alloc_max_size |
|
{ |
|
[StructLayout(LayoutKind.Explicit, Size = 0)] |
|
public partial struct Internal |
|
{ |
|
} |
|
} |
|
|
|
public unsafe partial class _Alloc_select |
|
{ |
|
[StructLayout(LayoutKind.Explicit, Size = 0)] |
|
public partial struct Internal |
|
{ |
|
} |
|
} |
|
} |
|
|
|
namespace std |
|
{ |
|
public unsafe partial class basic_string : IDisposable |
|
{ |
|
[StructLayout(LayoutKind.Explicit, Size = 32)] |
|
public unsafe partial struct Internal |
|
{ |
|
[FieldOffset(0)] |
|
public fixed sbyte _Buf[16]; |
|
|
|
[FieldOffset(1)] |
|
public sbyte __dummy__Buf_1; |
|
|
|
[FieldOffset(2)] |
|
public sbyte __dummy__Buf_2; |
|
|
|
[FieldOffset(3)] |
|
public sbyte __dummy__Buf_3; |
|
|
|
[FieldOffset(4)] |
|
public sbyte __dummy__Buf_4; |
|
|
|
[FieldOffset(5)] |
|
public sbyte __dummy__Buf_5; |
|
|
|
[FieldOffset(6)] |
|
public sbyte __dummy__Buf_6; |
|
|
|
[FieldOffset(7)] |
|
public sbyte __dummy__Buf_7; |
|
|
|
[FieldOffset(8)] |
|
public sbyte __dummy__Buf_8; |
|
|
|
[FieldOffset(9)] |
|
public sbyte __dummy__Buf_9; |
|
|
|
[FieldOffset(10)] |
|
public sbyte __dummy__Buf_10; |
|
|
|
[FieldOffset(11)] |
|
public sbyte __dummy__Buf_11; |
|
|
|
[FieldOffset(12)] |
|
public sbyte __dummy__Buf_12; |
|
|
|
[FieldOffset(13)] |
|
public sbyte __dummy__Buf_13; |
|
|
|
[FieldOffset(14)] |
|
public sbyte __dummy__Buf_14; |
|
|
|
[FieldOffset(15)] |
|
public sbyte __dummy__Buf_15; |
|
|
|
[FieldOffset(0)] |
|
public global::System.IntPtr _Ptr; |
|
|
|
[FieldOffset(0)] |
|
public fixed sbyte _Alias[16]; |
|
|
|
[FieldOffset(1)] |
|
public sbyte __dummy__Alias_1; |
|
|
|
[FieldOffset(2)] |
|
public sbyte __dummy__Alias_2; |
|
|
|
[FieldOffset(3)] |
|
public sbyte __dummy__Alias_3; |
|
|
|
[FieldOffset(4)] |
|
public sbyte __dummy__Alias_4; |
|
|
|
[FieldOffset(5)] |
|
public sbyte __dummy__Alias_5; |
|
|
|
[FieldOffset(6)] |
|
public sbyte __dummy__Alias_6; |
|
|
|
[FieldOffset(7)] |
|
public sbyte __dummy__Alias_7; |
|
|
|
[FieldOffset(8)] |
|
public sbyte __dummy__Alias_8; |
|
|
|
[FieldOffset(9)] |
|
public sbyte __dummy__Alias_9; |
|
|
|
[FieldOffset(10)] |
|
public sbyte __dummy__Alias_10; |
|
|
|
[FieldOffset(11)] |
|
public sbyte __dummy__Alias_11; |
|
|
|
[FieldOffset(12)] |
|
public sbyte __dummy__Alias_12; |
|
|
|
[FieldOffset(13)] |
|
public sbyte __dummy__Alias_13; |
|
|
|
[FieldOffset(14)] |
|
public sbyte __dummy__Alias_14; |
|
|
|
[FieldOffset(15)] |
|
public sbyte __dummy__Alias_15; |
|
|
|
[FieldOffset(16)] |
|
public ulong _Mysize; |
|
|
|
[FieldOffset(24)] |
|
public ulong _Myres; |
|
|
|
[SuppressUnmanagedCodeSecurity] |
|
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, |
|
EntryPoint="??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ")] |
|
internal static extern void dtor_0(global::System.IntPtr instance, int delete); |
|
|
|
[SuppressUnmanagedCodeSecurity] |
|
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, |
|
EntryPoint="?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ")] |
|
internal static extern global::System.IntPtr c_str_0(global::System.IntPtr instance); |
|
} |
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
protected int __PointerAdjustment; |
|
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, basic_string> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, basic_string>(); |
|
protected void*[] __OriginalVTables; |
|
|
|
protected bool __ownsNativeInstance; |
|
|
|
public static basic_string __CreateInstance(global::System.IntPtr native, bool skipVTables = false) |
|
{ |
|
return new basic_string(native.ToPointer(), skipVTables); |
|
} |
|
|
|
public static basic_string __CreateInstance(basic_string.Internal native, bool skipVTables = false) |
|
{ |
|
return new basic_string(native, skipVTables); |
|
} |
|
|
|
private static void* __CopyValue(basic_string.Internal native) |
|
{ |
|
var ret = Marshal.AllocHGlobal(32); |
|
*(basic_string.Internal*) ret = native; |
|
return ret.ToPointer(); |
|
} |
|
|
|
private basic_string(basic_string.Internal native, bool skipVTables = false) |
|
: this(__CopyValue(native), skipVTables) |
|
{ |
|
__ownsNativeInstance = true; |
|
NativeToManagedMap[__Instance] = this; |
|
} |
|
|
|
protected basic_string(void* native, bool skipVTables = false) |
|
{ |
|
if (native == null) |
|
return; |
|
__Instance = new global::System.IntPtr(native); |
|
} |
|
|
|
public void Dispose() |
|
{ |
|
Dispose(disposing: true); |
|
} |
|
|
|
protected virtual void Dispose(bool disposing) |
|
{ |
|
global::std.basic_string __dummy; |
|
NativeToManagedMap.TryRemove(__Instance, out __dummy); |
|
Internal.dtor_0((__Instance + __PointerAdjustment), 0); |
|
if (__ownsNativeInstance) |
|
Marshal.FreeHGlobal(__Instance); |
|
} |
|
|
|
public string c_str() |
|
{ |
|
var __ret = Internal.c_str_0((__Instance + __PointerAdjustment)); |
|
return Marshal.PtrToStringAnsi(__ret); |
|
} |
|
|
|
public static ulong npos |
|
{ |
|
get |
|
{ |
|
var __ptr = (ulong*)CppSharp.SymbolResolver.ResolveSymbol("Std-templates", "?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB"); |
|
return *__ptr; |
|
} |
|
} |
|
} |
|
}
|
|
|