Browse Source

Re-generated CppParser bindings CLI and C#.

pull/86/head
triton 12 years ago
parent
commit
480d35dd27
  1. 58
      src/CppParser/Bindings/CLI/AST.cpp
  2. 21
      src/CppParser/Bindings/CLI/AST.h
  3. 38
      src/CppParser/Bindings/CLI/CppParser.cpp
  4. 26
      src/CppParser/Bindings/CLI/CppParser.h
  5. 491
      src/CppParser/Bindings/CSharp/AST.cs
  6. 167
      src/CppParser/Bindings/CSharp/CppParser.cs

58
src/CppParser/Bindings/CLI/AST.cpp

@ -2623,52 +2623,44 @@ void CppSharp::Parser::AST::NativeLibrary::Symbols::set(System::Collections::Gen
((::CppSharp::CppParser::AST::NativeLibrary*)NativePtr)->Symbols = _tmpvalue; ((::CppSharp::CppParser::AST::NativeLibrary*)NativePtr)->Symbols = _tmpvalue;
} }
CppSharp::Parser::AST::Library::Library(::CppSharp::CppParser::AST::Library* native) CppSharp::Parser::AST::ASTContext::ASTContext(::CppSharp::CppParser::AST::ASTContext* native)
{ {
NativePtr = native; NativePtr = native;
} }
CppSharp::Parser::AST::Library::Library(System::IntPtr native) CppSharp::Parser::AST::ASTContext::ASTContext(System::IntPtr native)
{ {
auto __native = (::CppSharp::CppParser::AST::Library*)native.ToPointer(); auto __native = (::CppSharp::CppParser::AST::ASTContext*)native.ToPointer();
NativePtr = __native; NativePtr = __native;
} }
CppSharp::Parser::AST::TranslationUnit^ CppSharp::Parser::AST::Library::FindOrCreateModule(System::String^ File) CppSharp::Parser::AST::TranslationUnit^ CppSharp::Parser::AST::ASTContext::FindOrCreateModule(System::String^ File)
{ {
auto arg0 = clix::marshalString<clix::E_UTF8>(File); auto arg0 = clix::marshalString<clix::E_UTF8>(File);
auto __ret = ((::CppSharp::CppParser::AST::Library*)NativePtr)->FindOrCreateModule(arg0); auto __ret = ((::CppSharp::CppParser::AST::ASTContext*)NativePtr)->FindOrCreateModule(arg0);
if (__ret == nullptr) return nullptr; if (__ret == nullptr) return nullptr;
return gcnew CppSharp::Parser::AST::TranslationUnit((::CppSharp::CppParser::AST::TranslationUnit*)__ret); return gcnew CppSharp::Parser::AST::TranslationUnit((::CppSharp::CppParser::AST::TranslationUnit*)__ret);
} }
CppSharp::Parser::AST::NativeLibrary^ CppSharp::Parser::AST::Library::FindOrCreateLibrary(System::String^ File) CppSharp::Parser::AST::ASTContext::ASTContext()
{ {
auto arg0 = clix::marshalString<clix::E_UTF8>(File); NativePtr = new ::CppSharp::CppParser::AST::ASTContext();
auto __ret = ((::CppSharp::CppParser::AST::Library*)NativePtr)->FindOrCreateLibrary(arg0);
if (__ret == nullptr) return nullptr;
return gcnew CppSharp::Parser::AST::NativeLibrary((::CppSharp::CppParser::AST::NativeLibrary*)__ret);
}
CppSharp::Parser::AST::Library::Library()
{
NativePtr = new ::CppSharp::CppParser::AST::Library();
} }
System::IntPtr CppSharp::Parser::AST::Library::Instance::get() System::IntPtr CppSharp::Parser::AST::ASTContext::Instance::get()
{ {
return System::IntPtr(NativePtr); return System::IntPtr(NativePtr);
} }
void CppSharp::Parser::AST::Library::Instance::set(System::IntPtr object) void CppSharp::Parser::AST::ASTContext::Instance::set(System::IntPtr object)
{ {
NativePtr = (::CppSharp::CppParser::AST::Library*)object.ToPointer(); NativePtr = (::CppSharp::CppParser::AST::ASTContext*)object.ToPointer();
} }
System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ CppSharp::Parser::AST::Library::TranslationUnits::get() System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ CppSharp::Parser::AST::ASTContext::TranslationUnits::get()
{ {
auto _tmpTranslationUnits = gcnew System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>(); auto _tmpTranslationUnits = gcnew System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>();
for(auto _element : ((::CppSharp::CppParser::AST::Library*)NativePtr)->TranslationUnits) for(auto _element : ((::CppSharp::CppParser::AST::ASTContext*)NativePtr)->TranslationUnits)
{ {
auto _marshalElement = gcnew CppSharp::Parser::AST::TranslationUnit((::CppSharp::CppParser::AST::TranslationUnit*)_element); auto _marshalElement = gcnew CppSharp::Parser::AST::TranslationUnit((::CppSharp::CppParser::AST::TranslationUnit*)_element);
_tmpTranslationUnits->Add(_marshalElement); _tmpTranslationUnits->Add(_marshalElement);
@ -2676,7 +2668,7 @@ System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ Cpp
return _tmpTranslationUnits; return _tmpTranslationUnits;
} }
void CppSharp::Parser::AST::Library::TranslationUnits::set(System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ value) void CppSharp::Parser::AST::ASTContext::TranslationUnits::set(System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ value)
{ {
auto _tmpvalue = std::vector<::CppSharp::CppParser::AST::TranslationUnit*>(); auto _tmpvalue = std::vector<::CppSharp::CppParser::AST::TranslationUnit*>();
for each(CppSharp::Parser::AST::TranslationUnit^ _element in value) for each(CppSharp::Parser::AST::TranslationUnit^ _element in value)
@ -2684,28 +2676,6 @@ void CppSharp::Parser::AST::Library::TranslationUnits::set(System::Collections::
auto _marshalElement = (::CppSharp::CppParser::AST::TranslationUnit*)_element->NativePtr; auto _marshalElement = (::CppSharp::CppParser::AST::TranslationUnit*)_element->NativePtr;
_tmpvalue.push_back(_marshalElement); _tmpvalue.push_back(_marshalElement);
} }
((::CppSharp::CppParser::AST::Library*)NativePtr)->TranslationUnits = _tmpvalue; ((::CppSharp::CppParser::AST::ASTContext*)NativePtr)->TranslationUnits = _tmpvalue;
}
System::Collections::Generic::List<CppSharp::Parser::AST::NativeLibrary^>^ CppSharp::Parser::AST::Library::Libraries::get()
{
auto _tmpLibraries = gcnew System::Collections::Generic::List<CppSharp::Parser::AST::NativeLibrary^>();
for(auto _element : ((::CppSharp::CppParser::AST::Library*)NativePtr)->Libraries)
{
auto _marshalElement = gcnew CppSharp::Parser::AST::NativeLibrary((::CppSharp::CppParser::AST::NativeLibrary*)_element);
_tmpLibraries->Add(_marshalElement);
}
return _tmpLibraries;
}
void CppSharp::Parser::AST::Library::Libraries::set(System::Collections::Generic::List<CppSharp::Parser::AST::NativeLibrary^>^ value)
{
auto _tmpvalue = std::vector<::CppSharp::CppParser::AST::NativeLibrary*>();
for each(CppSharp::Parser::AST::NativeLibrary^ _element in value)
{
auto _marshalElement = (::CppSharp::CppParser::AST::NativeLibrary*)_element->NativePtr;
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::AST::Library*)NativePtr)->Libraries = _tmpvalue;
} }

21
src/CppParser/Bindings/CLI/AST.h

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "CppSharp.h" #include "CppSharp.h"
#include <AST.h> #include <C:/Development/CppSharp/src/CppParser/AST.h>
namespace CppSharp namespace CppSharp
{ {
@ -64,7 +64,7 @@ namespace CppSharp
ref class MacroExpansion; ref class MacroExpansion;
ref class TranslationUnit; ref class TranslationUnit;
ref class NativeLibrary; ref class NativeLibrary;
ref class Library; ref class ASTContext;
} }
} }
} }
@ -1504,35 +1504,28 @@ namespace CppSharp
} }
}; };
public ref class Library : ICppInstance public ref class ASTContext : ICppInstance
{ {
public: public:
property ::CppSharp::CppParser::AST::Library* NativePtr; property ::CppSharp::CppParser::AST::ASTContext* NativePtr;
property System::IntPtr Instance property System::IntPtr Instance
{ {
virtual System::IntPtr get(); virtual System::IntPtr get();
virtual void set(System::IntPtr instance); virtual void set(System::IntPtr instance);
} }
Library(::CppSharp::CppParser::AST::Library* native); ASTContext(::CppSharp::CppParser::AST::ASTContext* native);
Library(System::IntPtr native); ASTContext(System::IntPtr native);
Library(); ASTContext();
property System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ TranslationUnits property System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ TranslationUnits
{ {
System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ get(); System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^); void set(System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^);
} }
property System::Collections::Generic::List<CppSharp::Parser::AST::NativeLibrary^>^ Libraries
{
System::Collections::Generic::List<CppSharp::Parser::AST::NativeLibrary^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::NativeLibrary^>^);
}
CppSharp::Parser::AST::TranslationUnit^ FindOrCreateModule(System::String^ File); CppSharp::Parser::AST::TranslationUnit^ FindOrCreateModule(System::String^ File);
CppSharp::Parser::AST::NativeLibrary^ FindOrCreateLibrary(System::String^ File);
}; };
} }
} }

38
src/CppParser/Bindings/CLI/CppParser.cpp

@ -128,14 +128,14 @@ void CppSharp::Parser::ParserOptions::FileName::set(System::String^ value)
((::CppSharp::CppParser::ParserOptions*)NativePtr)->FileName = clix::marshalString<clix::E_UTF8>(value); ((::CppSharp::CppParser::ParserOptions*)NativePtr)->FileName = clix::marshalString<clix::E_UTF8>(value);
} }
CppSharp::Parser::AST::Library^ CppSharp::Parser::ParserOptions::Library::get() CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::ParserOptions::ASTContext::get()
{ {
return gcnew CppSharp::Parser::AST::Library((::CppSharp::CppParser::AST::Library*)((::CppSharp::CppParser::ParserOptions*)NativePtr)->Library); return gcnew CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*)((::CppSharp::CppParser::ParserOptions*)NativePtr)->ASTContext);
} }
void CppSharp::Parser::ParserOptions::Library::set(CppSharp::Parser::AST::Library^ value) void CppSharp::Parser::ParserOptions::ASTContext::set(CppSharp::Parser::AST::ASTContext^ value)
{ {
((::CppSharp::CppParser::ParserOptions*)NativePtr)->Library = (::CppSharp::CppParser::AST::Library*)value->NativePtr; ((::CppSharp::CppParser::ParserOptions*)NativePtr)->ASTContext = (::CppSharp::CppParser::AST::ASTContext*)value->NativePtr;
} }
int CppSharp::Parser::ParserOptions::ToolSetToUse::get() int CppSharp::Parser::ParserOptions::ToolSetToUse::get()
@ -320,16 +320,6 @@ void CppSharp::Parser::ParserResult::Kind::set(CppSharp::Parser::ParserResultKin
((::CppSharp::CppParser::ParserResult*)NativePtr)->Kind = (::CppSharp::CppParser::ParserResultKind)value; ((::CppSharp::CppParser::ParserResult*)NativePtr)->Kind = (::CppSharp::CppParser::ParserResultKind)value;
} }
CppSharp::Parser::AST::Library^ CppSharp::Parser::ParserResult::Library::get()
{
return gcnew CppSharp::Parser::AST::Library((::CppSharp::CppParser::AST::Library*)((::CppSharp::CppParser::ParserResult*)NativePtr)->Library);
}
void CppSharp::Parser::ParserResult::Library::set(CppSharp::Parser::AST::Library^ value)
{
((::CppSharp::CppParser::ParserResult*)NativePtr)->Library = (::CppSharp::CppParser::AST::Library*)value->NativePtr;
}
System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ CppSharp::Parser::ParserResult::Diagnostics::get() System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ CppSharp::Parser::ParserResult::Diagnostics::get()
{ {
auto _tmpDiagnostics = gcnew System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>(); auto _tmpDiagnostics = gcnew System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>();
@ -353,6 +343,26 @@ void CppSharp::Parser::ParserResult::Diagnostics::set(System::Collections::Gener
((::CppSharp::CppParser::ParserResult*)NativePtr)->Diagnostics = _tmpvalue; ((::CppSharp::CppParser::ParserResult*)NativePtr)->Diagnostics = _tmpvalue;
} }
CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::ParserResult::ASTContext::get()
{
return gcnew CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*)((::CppSharp::CppParser::ParserResult*)NativePtr)->ASTContext);
}
void CppSharp::Parser::ParserResult::ASTContext::set(CppSharp::Parser::AST::ASTContext^ value)
{
((::CppSharp::CppParser::ParserResult*)NativePtr)->ASTContext = (::CppSharp::CppParser::AST::ASTContext*)value->NativePtr;
}
CppSharp::Parser::AST::NativeLibrary^ CppSharp::Parser::ParserResult::Library::get()
{
return gcnew CppSharp::Parser::AST::NativeLibrary((::CppSharp::CppParser::AST::NativeLibrary*)((::CppSharp::CppParser::ParserResult*)NativePtr)->Library);
}
void CppSharp::Parser::ParserResult::Library::set(CppSharp::Parser::AST::NativeLibrary^ value)
{
((::CppSharp::CppParser::ParserResult*)NativePtr)->Library = (::CppSharp::CppParser::AST::NativeLibrary*)value->NativePtr;
}
CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* native) CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* native)
{ {
NativePtr = native; NativePtr = native;

26
src/CppParser/Bindings/CLI/CppParser.h

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "CppSharp.h" #include "CppSharp.h"
#include <CppParser.h> #include <C:/Development/CppSharp/src/CppParser/CppParser.h>
namespace CppSharp namespace CppSharp
{ {
@ -16,8 +16,9 @@ namespace CppSharp
enum struct SourceLocationKind; enum struct SourceLocationKind;
namespace AST namespace AST
{ {
ref class Library; ref class ASTContext;
enum struct CppAbi; enum struct CppAbi;
ref class NativeLibrary;
} }
} }
} }
@ -91,10 +92,10 @@ namespace CppSharp
System::String^ get(); System::String^ get();
void set(System::String^); void set(System::String^);
} }
property CppSharp::Parser::AST::Library^ Library property CppSharp::Parser::AST::ASTContext^ ASTContext
{ {
CppSharp::Parser::AST::Library^ get(); CppSharp::Parser::AST::ASTContext^ get();
void set(CppSharp::Parser::AST::Library^); void set(CppSharp::Parser::AST::ASTContext^);
} }
property int ToolSetToUse property int ToolSetToUse
{ {
@ -195,16 +196,21 @@ namespace CppSharp
CppSharp::Parser::ParserResultKind get(); CppSharp::Parser::ParserResultKind get();
void set(CppSharp::Parser::ParserResultKind); void set(CppSharp::Parser::ParserResultKind);
} }
property CppSharp::Parser::AST::Library^ Library
{
CppSharp::Parser::AST::Library^ get();
void set(CppSharp::Parser::AST::Library^);
}
property System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ Diagnostics property System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ Diagnostics
{ {
System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ get(); System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^); void set(System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^);
} }
property CppSharp::Parser::AST::ASTContext^ ASTContext
{
CppSharp::Parser::AST::ASTContext^ get();
void set(CppSharp::Parser::AST::ASTContext^);
}
property CppSharp::Parser::AST::NativeLibrary^ Library
{
CppSharp::Parser::AST::NativeLibrary^ get();
void set(CppSharp::Parser::AST::NativeLibrary^);
}
}; };
public ref class ClangParser : ICppInstance public ref class ClangParser : ICppInstance

491
src/CppParser/Bindings/CSharp/AST.cs

File diff suppressed because it is too large Load Diff

167
src/CppParser/Bindings/CSharp/CppParser.cs

@ -37,26 +37,26 @@ namespace CppSharp
public unsafe partial class ParserOptions : IDisposable, CppSharp.Runtime.ICppMarshal public unsafe partial class ParserOptions : IDisposable, CppSharp.Runtime.ICppMarshal
{ {
[StructLayout(LayoutKind.Explicit, Size = 116)] [StructLayout(LayoutKind.Explicit, Size = 112)]
public struct Internal public struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
public Std.String FileName;
[FieldOffset(24)]
public Std.Vector IncludeDirs; public Std.Vector IncludeDirs;
[FieldOffset(12)] [FieldOffset(36)]
public Std.Vector SystemIncludeDirs; public Std.Vector SystemIncludeDirs;
[FieldOffset(24)] [FieldOffset(48)]
public Std.Vector Defines; public Std.Vector Defines;
[FieldOffset(36)] [FieldOffset(60)]
public Std.Vector LibraryDirs; public Std.Vector LibraryDirs;
[FieldOffset(48)]
public Std.String FileName;
[FieldOffset(72)] [FieldOffset(72)]
public global::System.IntPtr Library; public global::System.IntPtr ASTContext;
[FieldOffset(76)] [FieldOffset(76)]
public int ToolSetToUse; public int ToolSetToUse;
@ -65,33 +65,38 @@ namespace CppSharp
public Std.String TargetTriple; public Std.String TargetTriple;
[FieldOffset(104)] [FieldOffset(104)]
public CppSharp.Parser.AST.CppAbi Abi;
[FieldOffset(108)]
public bool NoStandardIncludes; public bool NoStandardIncludes;
[FieldOffset(105)] [FieldOffset(109)]
public bool NoBuiltinIncludes; public bool NoBuiltinIncludes;
[FieldOffset(106)] [FieldOffset(110)]
public bool MicrosoftMode; public bool MicrosoftMode;
[FieldOffset(108)] [FieldOffset(111)]
public CppSharp.Parser.AST.CppAbi Abi;
[FieldOffset(112)]
public bool Verbose; public bool Verbose;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserOptions@CppParser@CppSharp@@QAE@XZ")] EntryPoint="??0ParserOptions@CppParser@CppSharp@@QAE@XZ")]
public static extern global::System.IntPtr ParserOptions0(global::System.IntPtr instance); public static extern global::System.IntPtr ParserOptions0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserOptions@CppParser@CppSharp@@QAE@ABU012@@Z")] EntryPoint="??0ParserOptions@CppParser@CppSharp@@QAE@ABU012@@Z")]
public static extern global::System.IntPtr ParserOptions2(global::System.IntPtr instance, global::System.IntPtr _0); public static extern global::System.IntPtr ParserOptions2(global::System.IntPtr instance, global::System.IntPtr _0);
} }
public global::System.IntPtr __Instance { get; protected set; } public global::System.IntPtr __Instance { get; protected set; }
int CppSharp.Runtime.ICppMarshal.NativeDataSize
{
get { return 112; }
}
void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance) void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance)
{ {
} }
@ -117,7 +122,7 @@ namespace CppSharp
public ParserOptions() public ParserOptions()
{ {
__Instance = Marshal.AllocHGlobal(116); __Instance = Marshal.AllocHGlobal(112);
Internal.ParserOptions0(__Instance); Internal.ParserOptions0(__Instance);
} }
@ -132,6 +137,21 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
public Std.String FileName
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->FileName;
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->FileName = new Std.String();
}
}
public Std.Vector<Std.String> IncludeDirs public Std.Vector<Std.String> IncludeDirs
{ {
get get
@ -192,64 +212,64 @@ namespace CppSharp
} }
} }
public Std.String FileName public CppSharp.Parser.AST.ASTContext ASTContext
{ {
get get
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->FileName; var __copy = new global::System.IntPtr(&__ptr->ASTContext);
return new CppSharp.Parser.AST.ASTContext(__copy);
} }
set set
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
__ptr->FileName = new Std.String(); __ptr->ASTContext = value.__Instance;
} }
} }
public CppSharp.Parser.AST.Library Library public int ToolSetToUse
{ {
get get
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
var __copy = new global::System.IntPtr(&__ptr->Library); return __ptr->ToolSetToUse;
return new CppSharp.Parser.AST.Library(__copy);
} }
set set
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Library = value.__Instance; __ptr->ToolSetToUse = value;
} }
} }
public int ToolSetToUse public Std.String TargetTriple
{ {
get get
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->ToolSetToUse; return __ptr->TargetTriple;
} }
set set
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
__ptr->ToolSetToUse = value; __ptr->TargetTriple = new Std.String();
} }
} }
public Std.String TargetTriple public CppSharp.Parser.AST.CppAbi Abi
{ {
get get
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->TargetTriple; return __ptr->Abi;
} }
set set
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
__ptr->TargetTriple = new Std.String(); __ptr->Abi = value;
} }
} }
@ -298,21 +318,6 @@ namespace CppSharp
} }
} }
public CppSharp.Parser.AST.CppAbi Abi
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->Abi;
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Abi = value;
}
}
public bool Verbose public bool Verbose
{ {
get get
@ -350,18 +355,23 @@ namespace CppSharp
public int ColumnNumber; public int ColumnNumber;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QAE@XZ")] EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QAE@XZ")]
public static extern global::System.IntPtr ParserDiagnostic1(global::System.IntPtr instance); public static extern global::System.IntPtr ParserDiagnostic1(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QAE@ABU012@@Z")] EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QAE@ABU012@@Z")]
public static extern global::System.IntPtr ParserDiagnostic2(global::System.IntPtr instance, global::System.IntPtr _0); public static extern global::System.IntPtr ParserDiagnostic2(global::System.IntPtr instance, global::System.IntPtr _0);
} }
public global::System.IntPtr __Instance { get; protected set; } public global::System.IntPtr __Instance { get; protected set; }
int CppSharp.Runtime.ICppMarshal.NativeDataSize
{
get { return 60; }
}
void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance) void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance)
{ {
} }
@ -480,31 +490,39 @@ namespace CppSharp
public unsafe partial class ParserResult : IDisposable, CppSharp.Runtime.ICppMarshal public unsafe partial class ParserResult : IDisposable, CppSharp.Runtime.ICppMarshal
{ {
[StructLayout(LayoutKind.Explicit, Size = 20)] [StructLayout(LayoutKind.Explicit, Size = 24)]
public struct Internal public struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
public CppSharp.Parser.ParserResultKind Kind; public CppSharp.Parser.ParserResultKind Kind;
[FieldOffset(4)] [FieldOffset(4)]
public global::System.IntPtr Library;
[FieldOffset(8)]
public Std.Vector Diagnostics; public Std.Vector Diagnostics;
[FieldOffset(16)]
public global::System.IntPtr ASTContext;
[FieldOffset(20)]
public global::System.IntPtr Library;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@XZ")] EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@XZ")]
public static extern global::System.IntPtr ParserResult1(global::System.IntPtr instance); public static extern global::System.IntPtr ParserResult1(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@ABU012@@Z")] EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@ABU012@@Z")]
public static extern global::System.IntPtr ParserResult2(global::System.IntPtr instance, global::System.IntPtr _0); public static extern global::System.IntPtr ParserResult2(global::System.IntPtr instance, global::System.IntPtr _0);
} }
public global::System.IntPtr __Instance { get; protected set; } public global::System.IntPtr __Instance { get; protected set; }
int CppSharp.Runtime.ICppMarshal.NativeDataSize
{
get { return 24; }
}
void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance) void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance)
{ {
} }
@ -530,7 +548,7 @@ namespace CppSharp
public ParserResult() public ParserResult()
{ {
__Instance = Marshal.AllocHGlobal(20); __Instance = Marshal.AllocHGlobal(24);
Internal.ParserResult1(__Instance); Internal.ParserResult1(__Instance);
} }
@ -560,34 +578,50 @@ namespace CppSharp
} }
} }
public CppSharp.Parser.AST.Library Library public Std.Vector<CppSharp.Parser.ParserDiagnostic> Diagnostics
{ {
get get
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
var __copy = new global::System.IntPtr(&__ptr->Library); return new Std.Vector<CppSharp.Parser.ParserDiagnostic>(__ptr->Diagnostics);
return new CppSharp.Parser.AST.Library(__copy);
} }
set set
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Library = value.__Instance; __ptr->Diagnostics = value.Internal;
} }
} }
public Std.Vector<CppSharp.Parser.ParserDiagnostic> Diagnostics public CppSharp.Parser.AST.ASTContext ASTContext
{ {
get get
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
return new Std.Vector<CppSharp.Parser.ParserDiagnostic>(__ptr->Diagnostics); var __copy = new global::System.IntPtr(&__ptr->ASTContext);
return new CppSharp.Parser.AST.ASTContext(__copy);
} }
set set
{ {
var __ptr = (Internal*)__Instance.ToPointer(); var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Diagnostics = value.Internal; __ptr->ASTContext = value.__Instance;
}
}
public CppSharp.Parser.AST.NativeLibrary Library
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
var __copy = new global::System.IntPtr(&__ptr->Library);
return new CppSharp.Parser.AST.NativeLibrary(__copy);
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Library = value.__Instance;
} }
} }
} }
@ -598,23 +632,28 @@ namespace CppSharp
public struct Internal public struct Internal
{ {
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ClangParser@CppParser@CppSharp@@QAE@ABV012@@Z")] EntryPoint="??0ClangParser@CppParser@CppSharp@@QAE@ABV012@@Z")]
public static extern global::System.IntPtr ClangParser1(global::System.IntPtr instance, global::System.IntPtr _0); public static extern global::System.IntPtr ClangParser1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?ParseHeader@ClangParser@CppParser@CppSharp@@SAPAUParserResult@23@PAUParserOptions@23@@Z")] EntryPoint="?ParseHeader@ClangParser@CppParser@CppSharp@@SAPAUParserResult@23@PAUParserOptions@23@@Z")]
public static extern global::System.IntPtr ParseHeader0(global::System.IntPtr Opts); public static extern global::System.IntPtr ParseHeader0(global::System.IntPtr Opts);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?ParseLibrary@ClangParser@CppParser@CppSharp@@SAPAUParserResult@23@PAUParserOptions@23@@Z")] EntryPoint="?ParseLibrary@ClangParser@CppParser@CppSharp@@SAPAUParserResult@23@PAUParserOptions@23@@Z")]
public static extern global::System.IntPtr ParseLibrary0(global::System.IntPtr Opts); public static extern global::System.IntPtr ParseLibrary0(global::System.IntPtr Opts);
} }
public global::System.IntPtr __Instance { get; protected set; } public global::System.IntPtr __Instance { get; protected set; }
int CppSharp.Runtime.ICppMarshal.NativeDataSize
{
get { return 0; }
}
void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance) void CppSharp.Runtime.ICppMarshal.MarshalManagedToNative(global::System.IntPtr instance)
{ {
} }

Loading…
Cancel
Save