|
|
@ -5,6 +5,7 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
using System.Security; |
|
|
|
using System.Security; |
|
|
|
|
|
|
|
using CppSharp.Parser.AST; |
|
|
|
|
|
|
|
|
|
|
|
namespace CppSharp |
|
|
|
namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
@ -231,6 +232,7 @@ namespace CppSharp |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
|
|
|
|
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions>(); |
|
|
|
|
|
|
|
|
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
|
|
|
|
|
|
|
@ -255,6 +257,7 @@ namespace CppSharp |
|
|
|
: this(__CopyValue(native)) |
|
|
|
: this(__CopyValue(native)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected ParserOptions(ParserOptions.Internal* native, bool isInternalImpl = false) |
|
|
|
protected ParserOptions(ParserOptions.Internal* native, bool isInternalImpl = false) |
|
|
@ -266,28 +269,38 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
__Instance = Marshal.AllocHGlobal(140); |
|
|
|
__Instance = Marshal.AllocHGlobal(140); |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
Internal.ctor_0(__Instance); |
|
|
|
Internal.ctor_0(__Instance); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Dispose(disposing: true); |
|
|
|
Dispose(disposing: true); |
|
|
|
GC.SuppressFinalize(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Internal.dtor_0(__Instance); |
|
|
|
DestroyNativeInstance(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public virtual void DestroyNativeInstance() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DestroyNativeInstance(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void DestroyNativeInstance(bool force) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CppSharp.Parser.ParserOptions __dummy; |
|
|
|
|
|
|
|
NativeToManagedMap.TryRemove(__Instance, out __dummy); |
|
|
|
|
|
|
|
if (__ownsNativeInstance || force) |
|
|
|
|
|
|
|
Internal.dtor_0(__Instance); |
|
|
|
if (__ownsNativeInstance) |
|
|
|
if (__ownsNativeInstance) |
|
|
|
{ |
|
|
|
|
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public string getArguments(uint i) |
|
|
|
public string getArguments(uint i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getArguments_0(__Instance, i); |
|
|
|
var __ret = Internal.getArguments_0(__Instance, i); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -306,7 +319,6 @@ namespace CppSharp |
|
|
|
public string getIncludeDirs(uint i) |
|
|
|
public string getIncludeDirs(uint i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getIncludeDirs_0(__Instance, i); |
|
|
|
var __ret = Internal.getIncludeDirs_0(__Instance, i); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -325,7 +337,6 @@ namespace CppSharp |
|
|
|
public string getSystemIncludeDirs(uint i) |
|
|
|
public string getSystemIncludeDirs(uint i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getSystemIncludeDirs_0(__Instance, i); |
|
|
|
var __ret = Internal.getSystemIncludeDirs_0(__Instance, i); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -344,7 +355,6 @@ namespace CppSharp |
|
|
|
public string getDefines(uint i) |
|
|
|
public string getDefines(uint i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getDefines_0(__Instance, i); |
|
|
|
var __ret = Internal.getDefines_0(__Instance, i); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -363,7 +373,6 @@ namespace CppSharp |
|
|
|
public string getUndefines(uint i) |
|
|
|
public string getUndefines(uint i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getUndefines_0(__Instance, i); |
|
|
|
var __ret = Internal.getUndefines_0(__Instance, i); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -382,7 +391,6 @@ namespace CppSharp |
|
|
|
public string getLibraryDirs(uint i) |
|
|
|
public string getLibraryDirs(uint i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getLibraryDirs_0(__Instance, i); |
|
|
|
var __ret = Internal.getLibraryDirs_0(__Instance, i); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -412,7 +420,6 @@ namespace CppSharp |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getFileName_0(__Instance); |
|
|
|
var __ret = Internal.getFileName_0(__Instance); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -474,7 +481,6 @@ namespace CppSharp |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getTargetTriple_0(__Instance); |
|
|
|
var __ret = Internal.getTargetTriple_0(__Instance); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -490,7 +496,12 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
return (((Internal*) __Instance)->ASTContext == IntPtr.Zero) ? null : CppSharp.Parser.AST.ASTContext.__CreateInstance(((Internal*) __Instance)->ASTContext); |
|
|
|
ASTContext __result0; |
|
|
|
|
|
|
|
if (((Internal*) __Instance)->ASTContext == IntPtr.Zero) __result0 = null; |
|
|
|
|
|
|
|
else if (CppSharp.Parser.AST.ASTContext.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->ASTContext)) |
|
|
|
|
|
|
|
__result0 = (ASTContext) CppSharp.Parser.AST.ASTContext.NativeToManagedMap[((Internal*) __Instance)->ASTContext]; |
|
|
|
|
|
|
|
else __result0 = CppSharp.Parser.AST.ASTContext.__CreateInstance(((Internal*) __Instance)->ASTContext); |
|
|
|
|
|
|
|
return __result0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
set |
|
|
|
set |
|
|
@ -642,6 +653,7 @@ namespace CppSharp |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
|
|
|
|
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic>(); |
|
|
|
|
|
|
|
|
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
|
|
|
|
|
|
|
@ -666,6 +678,7 @@ namespace CppSharp |
|
|
|
: this(__CopyValue(native)) |
|
|
|
: this(__CopyValue(native)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected ParserDiagnostic(ParserDiagnostic.Internal* native, bool isInternalImpl = false) |
|
|
|
protected ParserDiagnostic(ParserDiagnostic.Internal* native, bool isInternalImpl = false) |
|
|
@ -677,22 +690,33 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
__Instance = Marshal.AllocHGlobal(60); |
|
|
|
__Instance = Marshal.AllocHGlobal(60); |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
Internal.ctor_0(__Instance); |
|
|
|
Internal.ctor_0(__Instance); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Dispose(disposing: true); |
|
|
|
Dispose(disposing: true); |
|
|
|
GC.SuppressFinalize(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Internal.dtor_0(__Instance); |
|
|
|
DestroyNativeInstance(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public virtual void DestroyNativeInstance() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DestroyNativeInstance(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void DestroyNativeInstance(bool force) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CppSharp.Parser.ParserDiagnostic __dummy; |
|
|
|
|
|
|
|
NativeToManagedMap.TryRemove(__Instance, out __dummy); |
|
|
|
|
|
|
|
if (__ownsNativeInstance || force) |
|
|
|
|
|
|
|
Internal.dtor_0(__Instance); |
|
|
|
if (__ownsNativeInstance) |
|
|
|
if (__ownsNativeInstance) |
|
|
|
{ |
|
|
|
|
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public string FileName |
|
|
|
public string FileName |
|
|
@ -700,7 +724,6 @@ namespace CppSharp |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getFileName_0(__Instance); |
|
|
|
var __ret = Internal.getFileName_0(__Instance); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -717,7 +740,6 @@ namespace CppSharp |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
var __ret = Internal.getMessage_0(__Instance); |
|
|
|
var __ret = Internal.getMessage_0(__Instance); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
return Marshal.PtrToStringAnsi(__ret); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -823,6 +845,7 @@ namespace CppSharp |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
|
|
|
|
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult>(); |
|
|
|
|
|
|
|
|
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
|
|
|
|
|
|
|
@ -847,6 +870,7 @@ namespace CppSharp |
|
|
|
: this(__CopyValue(native)) |
|
|
|
: this(__CopyValue(native)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected ParserResult(ParserResult.Internal* native, bool isInternalImpl = false) |
|
|
|
protected ParserResult(ParserResult.Internal* native, bool isInternalImpl = false) |
|
|
@ -858,22 +882,33 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
__Instance = Marshal.AllocHGlobal(28); |
|
|
|
__Instance = Marshal.AllocHGlobal(28); |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
Internal.ctor_0(__Instance); |
|
|
|
Internal.ctor_0(__Instance); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Dispose(disposing: true); |
|
|
|
Dispose(disposing: true); |
|
|
|
GC.SuppressFinalize(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Internal.dtor_0(__Instance); |
|
|
|
DestroyNativeInstance(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public virtual void DestroyNativeInstance() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DestroyNativeInstance(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void DestroyNativeInstance(bool force) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CppSharp.Parser.ParserResult __dummy; |
|
|
|
|
|
|
|
NativeToManagedMap.TryRemove(__Instance, out __dummy); |
|
|
|
|
|
|
|
if (__ownsNativeInstance || force) |
|
|
|
|
|
|
|
Internal.dtor_0(__Instance); |
|
|
|
if (__ownsNativeInstance) |
|
|
|
if (__ownsNativeInstance) |
|
|
|
{ |
|
|
|
|
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public CppSharp.Parser.ParserDiagnostic getDiagnostics(uint i) |
|
|
|
public CppSharp.Parser.ParserDiagnostic getDiagnostics(uint i) |
|
|
@ -920,7 +955,12 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
return (((Internal*) __Instance)->ASTContext == IntPtr.Zero) ? null : CppSharp.Parser.AST.ASTContext.__CreateInstance(((Internal*) __Instance)->ASTContext); |
|
|
|
ASTContext __result0; |
|
|
|
|
|
|
|
if (((Internal*) __Instance)->ASTContext == IntPtr.Zero) __result0 = null; |
|
|
|
|
|
|
|
else if (CppSharp.Parser.AST.ASTContext.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->ASTContext)) |
|
|
|
|
|
|
|
__result0 = (ASTContext) CppSharp.Parser.AST.ASTContext.NativeToManagedMap[((Internal*) __Instance)->ASTContext]; |
|
|
|
|
|
|
|
else __result0 = CppSharp.Parser.AST.ASTContext.__CreateInstance(((Internal*) __Instance)->ASTContext); |
|
|
|
|
|
|
|
return __result0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
set |
|
|
|
set |
|
|
@ -933,7 +973,12 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
get |
|
|
|
get |
|
|
|
{ |
|
|
|
{ |
|
|
|
return (((Internal*) __Instance)->Library == IntPtr.Zero) ? null : CppSharp.Parser.AST.NativeLibrary.__CreateInstance(((Internal*) __Instance)->Library); |
|
|
|
NativeLibrary __result0; |
|
|
|
|
|
|
|
if (((Internal*) __Instance)->Library == IntPtr.Zero) __result0 = null; |
|
|
|
|
|
|
|
else if (CppSharp.Parser.AST.NativeLibrary.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Library)) |
|
|
|
|
|
|
|
__result0 = (NativeLibrary) CppSharp.Parser.AST.NativeLibrary.NativeToManagedMap[((Internal*) __Instance)->Library]; |
|
|
|
|
|
|
|
else __result0 = CppSharp.Parser.AST.NativeLibrary.__CreateInstance(((Internal*) __Instance)->Library); |
|
|
|
|
|
|
|
return __result0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
set |
|
|
|
set |
|
|
@ -970,6 +1015,7 @@ namespace CppSharp |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
public global::System.IntPtr __Instance { get; protected set; } |
|
|
|
|
|
|
|
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser>(); |
|
|
|
|
|
|
|
|
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
private readonly bool __ownsNativeInstance; |
|
|
|
|
|
|
|
|
|
|
@ -994,6 +1040,7 @@ namespace CppSharp |
|
|
|
: this(__CopyValue(native)) |
|
|
|
: this(__CopyValue(native)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected ClangParser(ClangParser.Internal* native, bool isInternalImpl = false) |
|
|
|
protected ClangParser(ClangParser.Internal* native, bool isInternalImpl = false) |
|
|
@ -1005,44 +1052,66 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
__Instance = Marshal.AllocHGlobal(1); |
|
|
|
__Instance = Marshal.AllocHGlobal(1); |
|
|
|
__ownsNativeInstance = true; |
|
|
|
__ownsNativeInstance = true; |
|
|
|
|
|
|
|
NativeToManagedMap[__Instance] = this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
public void Dispose() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Dispose(disposing: true); |
|
|
|
Dispose(disposing: true); |
|
|
|
GC.SuppressFinalize(this); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
DestroyNativeInstance(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public virtual void DestroyNativeInstance() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DestroyNativeInstance(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void DestroyNativeInstance(bool force) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CppSharp.Parser.ClangParser __dummy; |
|
|
|
|
|
|
|
NativeToManagedMap.TryRemove(__Instance, out __dummy); |
|
|
|
if (__ownsNativeInstance) |
|
|
|
if (__ownsNativeInstance) |
|
|
|
{ |
|
|
|
|
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
Marshal.FreeHGlobal(__Instance); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static CppSharp.Parser.ParserResult ParseHeader(CppSharp.Parser.ParserOptions Opts) |
|
|
|
public static CppSharp.Parser.ParserResult ParseHeader(CppSharp.Parser.ParserOptions Opts) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance; |
|
|
|
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance; |
|
|
|
var __ret = Internal.ParseHeader_0(arg0); |
|
|
|
var __ret = Internal.ParseHeader_0(arg0); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
ParserResult __result0; |
|
|
|
return (__ret == IntPtr.Zero) ? null : CppSharp.Parser.ParserResult.__CreateInstance(__ret); |
|
|
|
if (__ret == IntPtr.Zero) __result0 = null; |
|
|
|
|
|
|
|
else if (CppSharp.Parser.ParserResult.NativeToManagedMap.ContainsKey(__ret)) |
|
|
|
|
|
|
|
__result0 = (ParserResult) CppSharp.Parser.ParserResult.NativeToManagedMap[__ret]; |
|
|
|
|
|
|
|
else __result0 = CppSharp.Parser.ParserResult.__CreateInstance(__ret); |
|
|
|
|
|
|
|
return __result0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static CppSharp.Parser.ParserResult ParseLibrary(CppSharp.Parser.ParserOptions Opts) |
|
|
|
public static CppSharp.Parser.ParserResult ParseLibrary(CppSharp.Parser.ParserOptions Opts) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance; |
|
|
|
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance; |
|
|
|
var __ret = Internal.ParseLibrary_0(arg0); |
|
|
|
var __ret = Internal.ParseLibrary_0(arg0); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
ParserResult __result0; |
|
|
|
return (__ret == IntPtr.Zero) ? null : CppSharp.Parser.ParserResult.__CreateInstance(__ret); |
|
|
|
if (__ret == IntPtr.Zero) __result0 = null; |
|
|
|
|
|
|
|
else if (CppSharp.Parser.ParserResult.NativeToManagedMap.ContainsKey(__ret)) |
|
|
|
|
|
|
|
__result0 = (ParserResult) CppSharp.Parser.ParserResult.NativeToManagedMap[__ret]; |
|
|
|
|
|
|
|
else __result0 = CppSharp.Parser.ParserResult.__CreateInstance(__ret); |
|
|
|
|
|
|
|
return __result0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static CppSharp.Parser.ParserTargetInfo GetTargetInfo(CppSharp.Parser.ParserOptions Opts) |
|
|
|
public static CppSharp.Parser.ParserTargetInfo GetTargetInfo(CppSharp.Parser.ParserOptions Opts) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance; |
|
|
|
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance; |
|
|
|
var __ret = Internal.GetTargetInfo_0(arg0); |
|
|
|
var __ret = Internal.GetTargetInfo_0(arg0); |
|
|
|
if (__ret == global::System.IntPtr.Zero) return null; |
|
|
|
ParserTargetInfo __result0; |
|
|
|
return (__ret == IntPtr.Zero) ? null : CppSharp.Parser.ParserTargetInfo.__CreateInstance(__ret); |
|
|
|
if (__ret == IntPtr.Zero) __result0 = null; |
|
|
|
|
|
|
|
else if (CppSharp.Parser.ParserTargetInfo.NativeToManagedMap.ContainsKey(__ret)) |
|
|
|
|
|
|
|
__result0 = (ParserTargetInfo) CppSharp.Parser.ParserTargetInfo.NativeToManagedMap[__ret]; |
|
|
|
|
|
|
|
else __result0 = CppSharp.Parser.ParserTargetInfo.__CreateInstance(__ret); |
|
|
|
|
|
|
|
return __result0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|