Tools and libraries to glue C/C++ APIs to high-level languages
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.
 
 
 
 
 

1049 lines
43 KiB

//----------------------------------------------------------------------------
// This is autogenerated code by CppSharp.
// Do not edit this file or all your changes will be lost after re-generation.
//----------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
namespace CppSharp
{
namespace Parser
{
public enum LanguageVersion
{
/// <summary>The C programming language.</summary>
C = 0,
/// <summary>The C++ programming language year 1998; supports deprecated constructs.</summary>
CPlusPlus98 = 1,
/// <summary>The C++ programming language year 2011.</summary>
CPlusPlus11 = 2
}
public enum ParserDiagnosticLevel
{
Ignored = 0,
Note = 1,
Warning = 2,
Error = 3,
Fatal = 4
}
public enum ParserResultKind
{
Success = 0,
Error = 1,
FileNotFound = 2
}
public enum SourceLocationKind
{
Invalid = 0,
Builtin = 1,
CommandLine = 2,
System = 3,
User = 4
}
public unsafe partial class ParserOptions : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 116)]
public partial struct Internal
{
[FieldOffset(84)]
public global::System.IntPtr ASTContext;
[FieldOffset(88)]
public int ToolSetToUse;
[FieldOffset(104)]
public CppSharp.Parser.AST.CppAbi Abi;
[FieldOffset(108)]
public bool NoStandardIncludes;
[FieldOffset(109)]
public bool NoBuiltinIncludes;
[FieldOffset(110)]
public bool MicrosoftMode;
[FieldOffset(111)]
public bool Verbose;
[FieldOffset(112)]
public CppSharp.Parser.LanguageVersion LanguageVersion;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptionsC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptionsC2ERKS1_")]
internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptionsD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions12getArgumentsEj")]
internal static extern global::System.IntPtr getArguments_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions12addArgumentsEPKc")]
internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14clearArgumentsEv")]
internal static extern void clearArguments_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14getIncludeDirsEj")]
internal static extern global::System.IntPtr getIncludeDirs_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14addIncludeDirsEPKc")]
internal static extern void addIncludeDirs_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions16clearIncludeDirsEv")]
internal static extern void clearIncludeDirs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions20getSystemIncludeDirsEj")]
internal static extern global::System.IntPtr getSystemIncludeDirs_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions20addSystemIncludeDirsEPKc")]
internal static extern void addSystemIncludeDirs_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions22clearSystemIncludeDirsEv")]
internal static extern void clearSystemIncludeDirs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions10getDefinesEj")]
internal static extern global::System.IntPtr getDefines_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions10addDefinesEPKc")]
internal static extern void addDefines_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions12clearDefinesEv")]
internal static extern void clearDefines_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions12getUndefinesEj")]
internal static extern global::System.IntPtr getUndefines_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions12addUndefinesEPKc")]
internal static extern void addUndefines_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14clearUndefinesEv")]
internal static extern void clearUndefines_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14getLibraryDirsEj")]
internal static extern global::System.IntPtr getLibraryDirs_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14addLibraryDirsEPKc")]
internal static extern void addLibraryDirs_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions16clearLibraryDirsEv")]
internal static extern void clearLibraryDirs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions17getArgumentsCountEv")]
internal static extern uint getArgumentsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions11getFileNameEv")]
internal static extern global::System.IntPtr getFileName_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions11setFileNameEPKc")]
internal static extern void setFileName_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions19getIncludeDirsCountEv")]
internal static extern uint getIncludeDirsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions25getSystemIncludeDirsCountEv")]
internal static extern uint getSystemIncludeDirsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions15getDefinesCountEv")]
internal static extern uint getDefinesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions17getUndefinesCountEv")]
internal static extern uint getUndefinesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions19getLibraryDirsCountEv")]
internal static extern uint getLibraryDirsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions15getTargetTripleEv")]
internal static extern global::System.IntPtr getTargetTriple_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptions15setTargetTripleEPKc")]
internal static extern void setTargetTriple_0(global::System.IntPtr instance, global::System.IntPtr s);
}
public global::System.IntPtr __Instance { get; protected set; }
private readonly bool __ownsNativeInstance;
public static ParserOptions __CreateInstance(global::System.IntPtr native)
{
return new ParserOptions((ParserOptions.Internal*) native);
}
public static ParserOptions __CreateInstance(ParserOptions.Internal native)
{
return new ParserOptions(native);
}
private static ParserOptions.Internal* __CopyValue(ParserOptions.Internal native)
{
var ret = Marshal.AllocHGlobal(116);
CppSharp.Parser.ParserOptions.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return (ParserOptions.Internal*) ret;
}
private ParserOptions(ParserOptions.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
}
protected ParserOptions(ParserOptions.Internal* native, bool isInternalImpl = false)
{
__Instance = new global::System.IntPtr(native);
}
public ParserOptions()
{
__Instance = Marshal.AllocHGlobal(116);
__ownsNativeInstance = true;
Internal.ctor_0(__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
Internal.dtor_0(__Instance);
if (__ownsNativeInstance)
{
Marshal.FreeHGlobal(__Instance);
}
}
public string getArguments(uint i)
{
var __ret = Internal.getArguments_0(__Instance, i);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
public void addArguments(string s)
{
var arg0 = Marshal.StringToHGlobalAnsi(s);
Internal.addArguments_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
public void clearArguments()
{
Internal.clearArguments_0(__Instance);
}
public string getIncludeDirs(uint i)
{
var __ret = Internal.getIncludeDirs_0(__Instance, i);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
public void addIncludeDirs(string s)
{
var arg0 = Marshal.StringToHGlobalAnsi(s);
Internal.addIncludeDirs_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
public void clearIncludeDirs()
{
Internal.clearIncludeDirs_0(__Instance);
}
public string getSystemIncludeDirs(uint i)
{
var __ret = Internal.getSystemIncludeDirs_0(__Instance, i);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
public void addSystemIncludeDirs(string s)
{
var arg0 = Marshal.StringToHGlobalAnsi(s);
Internal.addSystemIncludeDirs_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
public void clearSystemIncludeDirs()
{
Internal.clearSystemIncludeDirs_0(__Instance);
}
public string getDefines(uint i)
{
var __ret = Internal.getDefines_0(__Instance, i);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
public void addDefines(string s)
{
var arg0 = Marshal.StringToHGlobalAnsi(s);
Internal.addDefines_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
public void clearDefines()
{
Internal.clearDefines_0(__Instance);
}
public string getUndefines(uint i)
{
var __ret = Internal.getUndefines_0(__Instance, i);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
public void addUndefines(string s)
{
var arg0 = Marshal.StringToHGlobalAnsi(s);
Internal.addUndefines_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
public void clearUndefines()
{
Internal.clearUndefines_0(__Instance);
}
public string getLibraryDirs(uint i)
{
var __ret = Internal.getLibraryDirs_0(__Instance, i);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
public void addLibraryDirs(string s)
{
var arg0 = Marshal.StringToHGlobalAnsi(s);
Internal.addLibraryDirs_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
public void clearLibraryDirs()
{
Internal.clearLibraryDirs_0(__Instance);
}
public uint ArgumentsCount
{
get
{
var __ret = Internal.getArgumentsCount_0(__Instance);
return __ret;
}
}
public string FileName
{
get
{
var __ret = Internal.getFileName_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setFileName_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
public uint IncludeDirsCount
{
get
{
var __ret = Internal.getIncludeDirsCount_0(__Instance);
return __ret;
}
}
public uint SystemIncludeDirsCount
{
get
{
var __ret = Internal.getSystemIncludeDirsCount_0(__Instance);
return __ret;
}
}
public uint DefinesCount
{
get
{
var __ret = Internal.getDefinesCount_0(__Instance);
return __ret;
}
}
public uint UndefinesCount
{
get
{
var __ret = Internal.getUndefinesCount_0(__Instance);
return __ret;
}
}
public uint LibraryDirsCount
{
get
{
var __ret = Internal.getLibraryDirsCount_0(__Instance);
return __ret;
}
}
public string TargetTriple
{
get
{
var __ret = Internal.getTargetTriple_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setTargetTriple_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
public CppSharp.Parser.AST.ASTContext ASTContext
{
get
{
return (((Internal*) __Instance)->ASTContext == IntPtr.Zero) ? null : CppSharp.Parser.AST.ASTContext.__CreateInstance(((Internal*) __Instance)->ASTContext);
}
set
{
((Internal*) __Instance)->ASTContext = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public int ToolSetToUse
{
get
{
return ((Internal*) __Instance)->ToolSetToUse;
}
set
{
((Internal*) __Instance)->ToolSetToUse = value;
}
}
public CppSharp.Parser.AST.CppAbi Abi
{
get
{
return ((Internal*) __Instance)->Abi;
}
set
{
((Internal*) __Instance)->Abi = value;
}
}
public bool NoStandardIncludes
{
get
{
return ((Internal*) __Instance)->NoStandardIncludes;
}
set
{
((Internal*) __Instance)->NoStandardIncludes = value;
}
}
public bool NoBuiltinIncludes
{
get
{
return ((Internal*) __Instance)->NoBuiltinIncludes;
}
set
{
((Internal*) __Instance)->NoBuiltinIncludes = value;
}
}
public bool MicrosoftMode
{
get
{
return ((Internal*) __Instance)->MicrosoftMode;
}
set
{
((Internal*) __Instance)->MicrosoftMode = value;
}
}
public bool Verbose
{
get
{
return ((Internal*) __Instance)->Verbose;
}
set
{
((Internal*) __Instance)->Verbose = value;
}
}
public CppSharp.Parser.LanguageVersion LanguageVersion
{
get
{
return ((Internal*) __Instance)->LanguageVersion;
}
set
{
((Internal*) __Instance)->LanguageVersion = value;
}
}
}
public unsafe partial class ParserDiagnostic : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 36)]
public partial struct Internal
{
[FieldOffset(24)]
public CppSharp.Parser.ParserDiagnosticLevel Level;
[FieldOffset(28)]
public int LineNumber;
[FieldOffset(32)]
public int ColumnNumber;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserDiagnosticC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserDiagnosticC2ERKS1_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserDiagnosticD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserDiagnostic11getFileNameEv")]
internal static extern global::System.IntPtr getFileName_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserDiagnostic11setFileNameEPKc")]
internal static extern void setFileName_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserDiagnostic10getMessageEv")]
internal static extern global::System.IntPtr getMessage_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserDiagnostic10setMessageEPKc")]
internal static extern void setMessage_0(global::System.IntPtr instance, global::System.IntPtr s);
}
public global::System.IntPtr __Instance { get; protected set; }
private readonly bool __ownsNativeInstance;
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native)
{
return new ParserDiagnostic((ParserDiagnostic.Internal*) native);
}
public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native)
{
return new ParserDiagnostic(native);
}
private static ParserDiagnostic.Internal* __CopyValue(ParserDiagnostic.Internal native)
{
var ret = Marshal.AllocHGlobal(36);
CppSharp.Parser.ParserDiagnostic.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (ParserDiagnostic.Internal*) ret;
}
private ParserDiagnostic(ParserDiagnostic.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
}
protected ParserDiagnostic(ParserDiagnostic.Internal* native, bool isInternalImpl = false)
{
__Instance = new global::System.IntPtr(native);
}
public ParserDiagnostic()
{
__Instance = Marshal.AllocHGlobal(36);
__ownsNativeInstance = true;
Internal.ctor_0(__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
Internal.dtor_0(__Instance);
if (__ownsNativeInstance)
{
Marshal.FreeHGlobal(__Instance);
}
}
public string FileName
{
get
{
var __ret = Internal.getFileName_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setFileName_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
public string Message
{
get
{
var __ret = Internal.getMessage_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setMessage_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
public CppSharp.Parser.ParserDiagnosticLevel Level
{
get
{
return ((Internal*) __Instance)->Level;
}
set
{
((Internal*) __Instance)->Level = value;
}
}
public int LineNumber
{
get
{
return ((Internal*) __Instance)->LineNumber;
}
set
{
((Internal*) __Instance)->LineNumber = value;
}
}
public int ColumnNumber
{
get
{
return ((Internal*) __Instance)->ColumnNumber;
}
set
{
((Internal*) __Instance)->ColumnNumber = value;
}
}
}
public unsafe partial class ParserResult : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 28)]
public partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.ParserResultKind Kind;
[FieldOffset(16)]
public global::System.IntPtr ASTContext;
[FieldOffset(20)]
public global::System.IntPtr Library;
[FieldOffset(24)]
public global::System.IntPtr CodeParser;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResultC2ERKS1_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResultD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResult14getDiagnosticsEj")]
internal static extern void getDiagnostics_0(global::System.IntPtr @return, global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResult14addDiagnosticsERNS0_16ParserDiagnosticE")]
internal static extern void addDiagnostics_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResult16clearDiagnosticsEv")]
internal static extern void clearDiagnostics_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser12ParserResult19getDiagnosticsCountEv")]
internal static extern uint getDiagnosticsCount_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
private readonly bool __ownsNativeInstance;
public static ParserResult __CreateInstance(global::System.IntPtr native)
{
return new ParserResult((ParserResult.Internal*) native);
}
public static ParserResult __CreateInstance(ParserResult.Internal native)
{
return new ParserResult(native);
}
private static ParserResult.Internal* __CopyValue(ParserResult.Internal native)
{
var ret = Marshal.AllocHGlobal(28);
CppSharp.Parser.ParserResult.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (ParserResult.Internal*) ret;
}
private ParserResult(ParserResult.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
}
protected ParserResult(ParserResult.Internal* native, bool isInternalImpl = false)
{
__Instance = new global::System.IntPtr(native);
}
public ParserResult()
{
__Instance = Marshal.AllocHGlobal(28);
__ownsNativeInstance = true;
Internal.ctor_0(__Instance);
}
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
Internal.dtor_0(__Instance);
if (__ownsNativeInstance)
{
Marshal.FreeHGlobal(__Instance);
}
}
public CppSharp.Parser.ParserDiagnostic getDiagnostics(uint i)
{
var __ret = new CppSharp.Parser.ParserDiagnostic.Internal();
Internal.getDiagnostics_0(new IntPtr(&__ret), __Instance, i);
return CppSharp.Parser.ParserDiagnostic.__CreateInstance(__ret);
}
public void addDiagnostics(CppSharp.Parser.ParserDiagnostic s)
{
var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance;
Internal.addDiagnostics_0(__Instance, arg0);
}
public void clearDiagnostics()
{
Internal.clearDiagnostics_0(__Instance);
}
public uint DiagnosticsCount
{
get
{
var __ret = Internal.getDiagnosticsCount_0(__Instance);
return __ret;
}
}
public CppSharp.Parser.ParserResultKind Kind
{
get
{
return ((Internal*) __Instance)->Kind;
}
set
{
((Internal*) __Instance)->Kind = value;
}
}
public CppSharp.Parser.AST.ASTContext ASTContext
{
get
{
return (((Internal*) __Instance)->ASTContext == IntPtr.Zero) ? null : CppSharp.Parser.AST.ASTContext.__CreateInstance(((Internal*) __Instance)->ASTContext);
}
set
{
((Internal*) __Instance)->ASTContext = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
public CppSharp.Parser.AST.NativeLibrary Library
{
get
{
return (((Internal*) __Instance)->Library == IntPtr.Zero) ? null : CppSharp.Parser.AST.NativeLibrary.__CreateInstance(((Internal*) __Instance)->Library);
}
set
{
((Internal*) __Instance)->Library = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ClangParser : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 1)]
public partial struct Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser11ClangParserC2ERKS1_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser11ClangParser11ParseHeaderEPNS0_13ParserOptionsE")]
internal static extern global::System.IntPtr ParseHeader_0(global::System.IntPtr Opts);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser11ClangParser12ParseLibraryEPNS0_13ParserOptionsE")]
internal static extern global::System.IntPtr ParseLibrary_0(global::System.IntPtr Opts);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser11ClangParser13GetTargetInfoEPNS0_13ParserOptionsE")]
internal static extern global::System.IntPtr GetTargetInfo_0(global::System.IntPtr Opts);
}
public global::System.IntPtr __Instance { get; protected set; }
private readonly bool __ownsNativeInstance;
public static ClangParser __CreateInstance(global::System.IntPtr native)
{
return new ClangParser((ClangParser.Internal*) native);
}
public static ClangParser __CreateInstance(ClangParser.Internal native)
{
return new ClangParser(native);
}
private static ClangParser.Internal* __CopyValue(ClangParser.Internal native)
{
var ret = (ClangParser.Internal*) Marshal.AllocHGlobal(1);
*ret = native;
return ret;
}
private ClangParser(ClangParser.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
}
protected ClangParser(ClangParser.Internal* native, bool isInternalImpl = false)
{
__Instance = new global::System.IntPtr(native);
}
public ClangParser()
{
__Instance = Marshal.AllocHGlobal(1);
__ownsNativeInstance = true;
}
public void Dispose()
{
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (__ownsNativeInstance)
{
Marshal.FreeHGlobal(__Instance);
}
}
public static CppSharp.Parser.ParserResult ParseHeader(CppSharp.Parser.ParserOptions Opts)
{
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance;
var __ret = Internal.ParseHeader_0(arg0);
if (__ret == global::System.IntPtr.Zero) return null;
return (__ret == IntPtr.Zero) ? null : CppSharp.Parser.ParserResult.__CreateInstance(__ret);
}
public static CppSharp.Parser.ParserResult ParseLibrary(CppSharp.Parser.ParserOptions Opts)
{
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance;
var __ret = Internal.ParseLibrary_0(arg0);
if (__ret == global::System.IntPtr.Zero) return null;
return (__ret == IntPtr.Zero) ? null : CppSharp.Parser.ParserResult.__CreateInstance(__ret);
}
public static CppSharp.Parser.ParserTargetInfo GetTargetInfo(CppSharp.Parser.ParserOptions Opts)
{
var arg0 = ReferenceEquals(Opts, null) ? global::System.IntPtr.Zero : Opts.__Instance;
var __ret = Internal.GetTargetInfo_0(arg0);
if (__ret == global::System.IntPtr.Zero) return null;
return (__ret == IntPtr.Zero) ? null : CppSharp.Parser.ParserTargetInfo.__CreateInstance(__ret);
}
}
}
}