Browse Source

Added a ParserTargetInfo option to the parser options.

We'll this to be able to override target details on Clang.
pull/553/head
triton 10 years ago
parent
commit
15db2c04ad
  1. 10
      src/CppParser/Bindings/CLI/CppParser.cpp
  2. 6
      src/CppParser/Bindings/CLI/CppParser.h
  3. 12
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
  4. 29
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs
  5. 4
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs
  6. 12
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
  7. 29
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs
  8. 4
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs
  9. 12
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
  10. 29
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs
  11. 4
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs
  12. 29
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs
  13. 20
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs
  14. 1
      src/CppParser/CppParser.cpp
  15. 2
      src/CppParser/CppParser.h

10
src/CppParser/Bindings/CLI/CppParser.cpp

@ -310,6 +310,16 @@ void CppSharp::Parser::ParserOptions::LanguageVersion::set(CppSharp::Parser::Lan @@ -310,6 +310,16 @@ void CppSharp::Parser::ParserOptions::LanguageVersion::set(CppSharp::Parser::Lan
((::CppSharp::CppParser::ParserOptions*)NativePtr)->LanguageVersion = (::CppSharp::CppParser::LanguageVersion)value;
}
CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserOptions::TargetInfo::get()
{
return (((::CppSharp::CppParser::ParserOptions*)NativePtr)->TargetInfo == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*)((::CppSharp::CppParser::ParserOptions*)NativePtr)->TargetInfo);
}
void CppSharp::Parser::ParserOptions::TargetInfo::set(CppSharp::Parser::ParserTargetInfo^ value)
{
((::CppSharp::CppParser::ParserOptions*)NativePtr)->TargetInfo = (::CppSharp::CppParser::ParserTargetInfo*)value->NativePtr;
}
CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(::CppSharp::CppParser::ParserDiagnostic* native)
: __ownsNativeInstance(false)
{

6
src/CppParser/Bindings/CLI/CppParser.h

@ -175,6 +175,12 @@ namespace CppSharp @@ -175,6 +175,12 @@ namespace CppSharp
void set(CppSharp::Parser::LanguageVersion);
}
property CppSharp::Parser::ParserTargetInfo^ TargetInfo
{
CppSharp::Parser::ParserTargetInfo^ get();
void set(CppSharp::Parser::ParserTargetInfo^);
}
System::String^ getArguments(unsigned int i);
void addArguments(System::String^ s);

12
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs

@ -4923,7 +4923,7 @@ namespace CppSharp @@ -4923,7 +4923,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9ParameterC2ERKS2_")]
internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
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,
@ -4944,7 +4944,7 @@ namespace CppSharp @@ -4944,7 +4944,7 @@ namespace CppSharp
private static Parameter.Internal* __CopyValue(Parameter.Internal native)
{
var ret = Marshal.AllocHGlobal(112);
CppSharp.Parser.AST.Parameter.Internal.cctor_2(ret, new global::System.IntPtr(&native));
CppSharp.Parser.AST.Parameter.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Parameter.Internal*) ret;
}
@ -4975,7 +4975,7 @@ namespace CppSharp @@ -4975,7 +4975,7 @@ namespace CppSharp
__Instance = Marshal.AllocHGlobal(112);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
Internal.cctor_1(__Instance, arg0);
NativeToManagedMap[__Instance] = this;
}
@ -6805,7 +6805,7 @@ namespace CppSharp @@ -6805,7 +6805,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST5ClassC2ERKS2_")]
internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
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,
@ -6906,7 +6906,7 @@ namespace CppSharp @@ -6906,7 +6906,7 @@ namespace CppSharp
private static Class.Internal* __CopyValue(Class.Internal native)
{
var ret = Marshal.AllocHGlobal(268);
CppSharp.Parser.AST.Class.Internal.cctor_2(ret, new global::System.IntPtr(&native));
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Class.Internal*) ret;
}
@ -6937,7 +6937,7 @@ namespace CppSharp @@ -6937,7 +6937,7 @@ namespace CppSharp
__Instance = Marshal.AllocHGlobal(268);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
Internal.cctor_1(__Instance, arg0);
NativeToManagedMap[__Instance] = this;
}

29
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs

@ -47,7 +47,7 @@ namespace CppSharp @@ -47,7 +47,7 @@ namespace CppSharp
public unsafe partial class ParserOptions : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 116)]
[StructLayout(LayoutKind.Explicit, Size = 120)]
public partial struct Internal
{
[FieldOffset(84)]
@ -74,6 +74,9 @@ namespace CppSharp @@ -74,6 +74,9 @@ namespace CppSharp
[FieldOffset(112)]
public CppSharp.Parser.LanguageVersion LanguageVersion;
[FieldOffset(116)]
public global::System.IntPtr TargetInfo;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptionsC2Ev")]
@ -248,7 +251,7 @@ namespace CppSharp @@ -248,7 +251,7 @@ namespace CppSharp
private static ParserOptions.Internal* __CopyValue(ParserOptions.Internal native)
{
var ret = Marshal.AllocHGlobal(116);
var ret = Marshal.AllocHGlobal(120);
CppSharp.Parser.ParserOptions.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return (ParserOptions.Internal*) ret;
}
@ -267,7 +270,7 @@ namespace CppSharp @@ -267,7 +270,7 @@ namespace CppSharp
public ParserOptions()
{
__Instance = Marshal.AllocHGlobal(116);
__Instance = Marshal.AllocHGlobal(120);
__ownsNativeInstance = true;
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
@ -275,7 +278,7 @@ namespace CppSharp @@ -275,7 +278,7 @@ namespace CppSharp
public ParserOptions(CppSharp.Parser.ParserOptions _0)
{
__Instance = Marshal.AllocHGlobal(116);
__Instance = Marshal.AllocHGlobal(120);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
@ -599,6 +602,24 @@ namespace CppSharp @@ -599,6 +602,24 @@ namespace CppSharp
((Internal*) __Instance)->LanguageVersion = value;
}
}
public CppSharp.Parser.ParserTargetInfo TargetInfo
{
get
{
CppSharp.Parser.ParserTargetInfo __result0;
if (((Internal*) __Instance)->TargetInfo == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.ParserTargetInfo.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TargetInfo))
__result0 = (CppSharp.Parser.ParserTargetInfo) CppSharp.Parser.ParserTargetInfo.NativeToManagedMap[((Internal*) __Instance)->TargetInfo];
else __result0 = CppSharp.Parser.ParserTargetInfo.__CreateInstance(((Internal*) __Instance)->TargetInfo);
return __result0;
}
set
{
((Internal*) __Instance)->TargetInfo = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ParserDiagnostic : IDisposable

4
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs

@ -147,7 +147,7 @@ namespace CppSharp @@ -147,7 +147,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserTargetInfoC2Ev")]
internal static extern void ctor_1(global::System.IntPtr instance);
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
@ -209,7 +209,7 @@ namespace CppSharp @@ -209,7 +209,7 @@ namespace CppSharp
{
__Instance = Marshal.AllocHGlobal(164);
__ownsNativeInstance = true;
Internal.ctor_1(__Instance);
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
}

12
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs

@ -4923,7 +4923,7 @@ namespace CppSharp @@ -4923,7 +4923,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0Parameter@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
@ -4944,7 +4944,7 @@ namespace CppSharp @@ -4944,7 +4944,7 @@ namespace CppSharp
private static Parameter.Internal* __CopyValue(Parameter.Internal native)
{
var ret = Marshal.AllocHGlobal(148);
CppSharp.Parser.AST.Parameter.Internal.cctor_2(ret, new global::System.IntPtr(&native));
CppSharp.Parser.AST.Parameter.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Parameter.Internal*) ret;
}
@ -4975,7 +4975,7 @@ namespace CppSharp @@ -4975,7 +4975,7 @@ namespace CppSharp
__Instance = Marshal.AllocHGlobal(148);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
Internal.cctor_1(__Instance, arg0);
NativeToManagedMap[__Instance] = this;
}
@ -6805,7 +6805,7 @@ namespace CppSharp @@ -6805,7 +6805,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0Class@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
@ -6906,7 +6906,7 @@ namespace CppSharp @@ -6906,7 +6906,7 @@ namespace CppSharp
private static Class.Internal* __CopyValue(Class.Internal native)
{
var ret = Marshal.AllocHGlobal(300);
CppSharp.Parser.AST.Class.Internal.cctor_2(ret, new global::System.IntPtr(&native));
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Class.Internal*) ret;
}
@ -6937,7 +6937,7 @@ namespace CppSharp @@ -6937,7 +6937,7 @@ namespace CppSharp
__Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
Internal.cctor_1(__Instance, arg0);
NativeToManagedMap[__Instance] = this;
}

29
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs

@ -47,7 +47,7 @@ namespace CppSharp @@ -47,7 +47,7 @@ namespace CppSharp
public unsafe partial class ParserOptions : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 140)]
[StructLayout(LayoutKind.Explicit, Size = 144)]
public partial struct Internal
{
[FieldOffset(96)]
@ -74,6 +74,9 @@ namespace CppSharp @@ -74,6 +74,9 @@ namespace CppSharp
[FieldOffset(136)]
public CppSharp.Parser.LanguageVersion LanguageVersion;
[FieldOffset(140)]
public global::System.IntPtr TargetInfo;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserOptions@CppParser@CppSharp@@QAE@XZ")]
@ -248,7 +251,7 @@ namespace CppSharp @@ -248,7 +251,7 @@ namespace CppSharp
private static ParserOptions.Internal* __CopyValue(ParserOptions.Internal native)
{
var ret = Marshal.AllocHGlobal(140);
var ret = Marshal.AllocHGlobal(144);
CppSharp.Parser.ParserOptions.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return (ParserOptions.Internal*) ret;
}
@ -267,7 +270,7 @@ namespace CppSharp @@ -267,7 +270,7 @@ namespace CppSharp
public ParserOptions()
{
__Instance = Marshal.AllocHGlobal(140);
__Instance = Marshal.AllocHGlobal(144);
__ownsNativeInstance = true;
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
@ -275,7 +278,7 @@ namespace CppSharp @@ -275,7 +278,7 @@ namespace CppSharp
public ParserOptions(CppSharp.Parser.ParserOptions _0)
{
__Instance = Marshal.AllocHGlobal(140);
__Instance = Marshal.AllocHGlobal(144);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
@ -599,6 +602,24 @@ namespace CppSharp @@ -599,6 +602,24 @@ namespace CppSharp
((Internal*) __Instance)->LanguageVersion = value;
}
}
public CppSharp.Parser.ParserTargetInfo TargetInfo
{
get
{
CppSharp.Parser.ParserTargetInfo __result0;
if (((Internal*) __Instance)->TargetInfo == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.ParserTargetInfo.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TargetInfo))
__result0 = (CppSharp.Parser.ParserTargetInfo) CppSharp.Parser.ParserTargetInfo.NativeToManagedMap[((Internal*) __Instance)->TargetInfo];
else __result0 = CppSharp.Parser.ParserTargetInfo.__CreateInstance(((Internal*) __Instance)->TargetInfo);
return __result0;
}
set
{
((Internal*) __Instance)->TargetInfo = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ParserDiagnostic : IDisposable

4
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs

@ -147,7 +147,7 @@ namespace CppSharp @@ -147,7 +147,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserTargetInfo@CppParser@CppSharp@@QAE@XZ")]
internal static extern global::System.IntPtr ctor_1(global::System.IntPtr instance);
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
@ -209,7 +209,7 @@ namespace CppSharp @@ -209,7 +209,7 @@ namespace CppSharp
{
__Instance = Marshal.AllocHGlobal(176);
__ownsNativeInstance = true;
Internal.ctor_1(__Instance);
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
}

12
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs

@ -4922,7 +4922,7 @@ namespace CppSharp @@ -4922,7 +4922,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9ParameterC2ERKS2_")]
internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
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,
@ -4943,7 +4943,7 @@ namespace CppSharp @@ -4943,7 +4943,7 @@ namespace CppSharp
private static Parameter.Internal* __CopyValue(Parameter.Internal native)
{
var ret = Marshal.AllocHGlobal(200);
CppSharp.Parser.AST.Parameter.Internal.cctor_2(ret, new global::System.IntPtr(&native));
CppSharp.Parser.AST.Parameter.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Parameter.Internal*) ret;
}
@ -4974,7 +4974,7 @@ namespace CppSharp @@ -4974,7 +4974,7 @@ namespace CppSharp
__Instance = Marshal.AllocHGlobal(200);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
Internal.cctor_1(__Instance, arg0);
NativeToManagedMap[__Instance] = this;
}
@ -6804,7 +6804,7 @@ namespace CppSharp @@ -6804,7 +6804,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST5ClassC2ERKS2_")]
internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
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,
@ -6905,7 +6905,7 @@ namespace CppSharp @@ -6905,7 +6905,7 @@ namespace CppSharp
private static Class.Internal* __CopyValue(Class.Internal native)
{
var ret = Marshal.AllocHGlobal(512);
CppSharp.Parser.AST.Class.Internal.cctor_2(ret, new global::System.IntPtr(&native));
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (Class.Internal*) ret;
}
@ -6936,7 +6936,7 @@ namespace CppSharp @@ -6936,7 +6936,7 @@ namespace CppSharp
__Instance = Marshal.AllocHGlobal(512);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
Internal.cctor_1(__Instance, arg0);
NativeToManagedMap[__Instance] = this;
}

29
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs

@ -47,7 +47,7 @@ namespace CppSharp @@ -47,7 +47,7 @@ namespace CppSharp
public unsafe partial class ParserOptions : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 224)]
[StructLayout(LayoutKind.Explicit, Size = 232)]
public partial struct Internal
{
[FieldOffset(168)]
@ -74,6 +74,9 @@ namespace CppSharp @@ -74,6 +74,9 @@ namespace CppSharp
[FieldOffset(216)]
public CppSharp.Parser.LanguageVersion LanguageVersion;
[FieldOffset(224)]
public global::System.IntPtr TargetInfo;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptionsC2Ev")]
@ -248,7 +251,7 @@ namespace CppSharp @@ -248,7 +251,7 @@ namespace CppSharp
private static ParserOptions.Internal* __CopyValue(ParserOptions.Internal native)
{
var ret = Marshal.AllocHGlobal(224);
var ret = Marshal.AllocHGlobal(232);
CppSharp.Parser.ParserOptions.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return (ParserOptions.Internal*) ret;
}
@ -267,7 +270,7 @@ namespace CppSharp @@ -267,7 +270,7 @@ namespace CppSharp
public ParserOptions()
{
__Instance = Marshal.AllocHGlobal(224);
__Instance = Marshal.AllocHGlobal(232);
__ownsNativeInstance = true;
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
@ -275,7 +278,7 @@ namespace CppSharp @@ -275,7 +278,7 @@ namespace CppSharp
public ParserOptions(CppSharp.Parser.ParserOptions _0)
{
__Instance = Marshal.AllocHGlobal(224);
__Instance = Marshal.AllocHGlobal(232);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_2(__Instance, arg0);
@ -599,6 +602,24 @@ namespace CppSharp @@ -599,6 +602,24 @@ namespace CppSharp
((Internal*) __Instance)->LanguageVersion = value;
}
}
public CppSharp.Parser.ParserTargetInfo TargetInfo
{
get
{
CppSharp.Parser.ParserTargetInfo __result0;
if (((Internal*) __Instance)->TargetInfo == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.ParserTargetInfo.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TargetInfo))
__result0 = (CppSharp.Parser.ParserTargetInfo) CppSharp.Parser.ParserTargetInfo.NativeToManagedMap[((Internal*) __Instance)->TargetInfo];
else __result0 = CppSharp.Parser.ParserTargetInfo.__CreateInstance(((Internal*) __Instance)->TargetInfo);
return __result0;
}
set
{
((Internal*) __Instance)->TargetInfo = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ParserDiagnostic : IDisposable

4
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs

@ -147,7 +147,7 @@ namespace CppSharp @@ -147,7 +147,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserTargetInfoC2Ev")]
internal static extern void ctor_1(global::System.IntPtr instance);
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
@ -209,7 +209,7 @@ namespace CppSharp @@ -209,7 +209,7 @@ namespace CppSharp
{
__Instance = Marshal.AllocHGlobal(176);
__ownsNativeInstance = true;
Internal.ctor_1(__Instance);
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
}

29
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs

@ -47,7 +47,7 @@ namespace CppSharp @@ -47,7 +47,7 @@ namespace CppSharp
public unsafe partial class ParserOptions : IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 192)]
[StructLayout(LayoutKind.Explicit, Size = 200)]
public partial struct Internal
{
[FieldOffset(152)]
@ -74,6 +74,9 @@ namespace CppSharp @@ -74,6 +74,9 @@ namespace CppSharp
[FieldOffset(184)]
public CppSharp.Parser.LanguageVersion LanguageVersion;
[FieldOffset(192)]
public global::System.IntPtr TargetInfo;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser13ParserOptionsC2Ev")]
@ -248,7 +251,7 @@ namespace CppSharp @@ -248,7 +251,7 @@ namespace CppSharp
private static ParserOptions.Internal* __CopyValue(ParserOptions.Internal native)
{
var ret = Marshal.AllocHGlobal(192);
var ret = Marshal.AllocHGlobal(200);
CppSharp.Parser.ParserOptions.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (ParserOptions.Internal*) ret;
}
@ -267,7 +270,7 @@ namespace CppSharp @@ -267,7 +270,7 @@ namespace CppSharp
public ParserOptions()
{
__Instance = Marshal.AllocHGlobal(192);
__Instance = Marshal.AllocHGlobal(200);
__ownsNativeInstance = true;
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
@ -275,7 +278,7 @@ namespace CppSharp @@ -275,7 +278,7 @@ namespace CppSharp
public ParserOptions(CppSharp.Parser.ParserOptions _0)
{
__Instance = Marshal.AllocHGlobal(192);
__Instance = Marshal.AllocHGlobal(200);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_1(__Instance, arg0);
@ -599,6 +602,24 @@ namespace CppSharp @@ -599,6 +602,24 @@ namespace CppSharp
((Internal*) __Instance)->LanguageVersion = value;
}
}
public CppSharp.Parser.ParserTargetInfo TargetInfo
{
get
{
CppSharp.Parser.ParserTargetInfo __result0;
if (((Internal*) __Instance)->TargetInfo == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.ParserTargetInfo.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->TargetInfo))
__result0 = (CppSharp.Parser.ParserTargetInfo) CppSharp.Parser.ParserTargetInfo.NativeToManagedMap[((Internal*) __Instance)->TargetInfo];
else __result0 = CppSharp.Parser.ParserTargetInfo.__CreateInstance(((Internal*) __Instance)->TargetInfo);
return __result0;
}
set
{
((Internal*) __Instance)->TargetInfo = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ParserDiagnostic : IDisposable

20
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs

@ -146,13 +146,13 @@ namespace CppSharp @@ -146,13 +146,13 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserTargetInfoC2ERKS1_")]
internal static extern void cctor_0(global::System.IntPtr instance, global::System.IntPtr _0);
EntryPoint="_ZN8CppSharp9CppParser16ParserTargetInfoC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser16ParserTargetInfoC2Ev")]
internal static extern void ctor_2(global::System.IntPtr instance);
EntryPoint="_ZN8CppSharp9CppParser16ParserTargetInfoC2ERKS1_")]
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,
@ -189,7 +189,7 @@ namespace CppSharp @@ -189,7 +189,7 @@ namespace CppSharp
private static ParserTargetInfo.Internal* __CopyValue(ParserTargetInfo.Internal native)
{
var ret = Marshal.AllocHGlobal(160);
CppSharp.Parser.ParserTargetInfo.Internal.cctor_0(ret, new global::System.IntPtr(&native));
CppSharp.Parser.ParserTargetInfo.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return (ParserTargetInfo.Internal*) ret;
}
@ -205,20 +205,20 @@ namespace CppSharp @@ -205,20 +205,20 @@ namespace CppSharp
__Instance = new global::System.IntPtr(native);
}
public ParserTargetInfo(CppSharp.Parser.ParserTargetInfo _0)
public ParserTargetInfo()
{
__Instance = Marshal.AllocHGlobal(160);
__ownsNativeInstance = true;
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_0(__Instance, arg0);
Internal.ctor_0(__Instance);
NativeToManagedMap[__Instance] = this;
}
public ParserTargetInfo()
public ParserTargetInfo(CppSharp.Parser.ParserTargetInfo _0)
{
__Instance = Marshal.AllocHGlobal(160);
__ownsNativeInstance = true;
Internal.ctor_2(__Instance);
var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance;
Internal.cctor_1(__Instance, arg0);
NativeToManagedMap[__Instance] = this;
}

1
src/CppParser/CppParser.cpp

@ -19,6 +19,7 @@ ParserOptions::ParserOptions() @@ -19,6 +19,7 @@ ParserOptions::ParserOptions()
, MicrosoftMode(false)
, Verbose(false)
, LanguageVersion(CppParser::LanguageVersion::CPlusPlus11)
, TargetInfo(0)
{
}

2
src/CppParser/CppParser.h

@ -58,6 +58,8 @@ struct CS_API ParserOptions @@ -58,6 +58,8 @@ struct CS_API ParserOptions
bool MicrosoftMode;
bool Verbose;
LanguageVersion LanguageVersion;
ParserTargetInfo* TargetInfo;
};
enum class ParserDiagnosticLevel

Loading…
Cancel
Save