Browse Source

Regenerated the C++ parser bindings.

pull/146/merge
triton 12 years ago
parent
commit
7a7a2ab32a
  1. 916
      src/CppParser/Bindings/CLI/AST.cpp
  2. 461
      src/CppParser/Bindings/CLI/AST.h
  3. 226
      src/CppParser/Bindings/CLI/CppParser.cpp
  4. 89
      src/CppParser/Bindings/CLI/CppParser.h
  5. 1060
      src/CppParser/Bindings/CSharp/AST.cs
  6. 387
      src/CppParser/Bindings/CSharp/CppParser.cs
  7. 35
      src/CppParser/Bindings/ParserGen.cs

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

226
src/CppParser/Bindings/CLI/CppParser.cpp

@ -20,142 +20,144 @@ CppSharp::Parser::ParserOptions::ParserOptions() @@ -20,142 +20,144 @@ CppSharp::Parser::ParserOptions::ParserOptions()
NativePtr = new ::CppSharp::CppParser::ParserOptions();
}
System::IntPtr CppSharp::Parser::ParserOptions::Instance::get()
System::String^ CppSharp::Parser::ParserOptions::getIncludeDirs(unsigned int i)
{
return System::IntPtr(NativePtr);
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getIncludeDirs(i);
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserOptions::Instance::set(System::IntPtr object)
void CppSharp::Parser::ParserOptions::addIncludeDirs(System::String^ s)
{
NativePtr = (::CppSharp::CppParser::ParserOptions*)object.ToPointer();
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserOptions*)NativePtr)->addIncludeDirs(arg0);
}
System::String^ CppSharp::Parser::ParserOptions::FileName::get()
System::String^ CppSharp::Parser::ParserOptions::getSystemIncludeDirs(unsigned int i)
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::ParserOptions*)NativePtr)->FileName);
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getSystemIncludeDirs(i);
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserOptions::FileName::set(System::String^ value)
void CppSharp::Parser::ParserOptions::addSystemIncludeDirs(System::String^ s)
{
((::CppSharp::CppParser::ParserOptions*)NativePtr)->FileName = clix::marshalString<clix::E_UTF8>(value);
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserOptions*)NativePtr)->addSystemIncludeDirs(arg0);
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::ParserOptions::IncludeDirs::get()
System::String^ CppSharp::Parser::ParserOptions::getDefines(unsigned int i)
{
auto _tmpIncludeDirs = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::ParserOptions*)NativePtr)->IncludeDirs)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpIncludeDirs->Add(_marshalElement);
}
return _tmpIncludeDirs;
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getDefines(i);
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserOptions::IncludeDirs::set(System::Collections::Generic::List<System::String^>^ value)
void CppSharp::Parser::ParserOptions::addDefines(System::String^ s)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::ParserOptions*)NativePtr)->IncludeDirs = _tmpvalue;
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserOptions*)NativePtr)->addDefines(arg0);
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::ParserOptions::SystemIncludeDirs::get()
System::String^ CppSharp::Parser::ParserOptions::getLibraryDirs(unsigned int i)
{
auto _tmpSystemIncludeDirs = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::ParserOptions*)NativePtr)->SystemIncludeDirs)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpSystemIncludeDirs->Add(_marshalElement);
}
return _tmpSystemIncludeDirs;
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getLibraryDirs(i);
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserOptions::SystemIncludeDirs::set(System::Collections::Generic::List<System::String^>^ value)
void CppSharp::Parser::ParserOptions::addLibraryDirs(System::String^ s)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::ParserOptions*)NativePtr)->SystemIncludeDirs = _tmpvalue;
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserOptions*)NativePtr)->addLibraryDirs(arg0);
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::ParserOptions::Defines::get()
System::IntPtr CppSharp::Parser::ParserOptions::Instance::get()
{
auto _tmpDefines = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::ParserOptions*)NativePtr)->Defines)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpDefines->Add(_marshalElement);
}
return _tmpDefines;
return System::IntPtr(NativePtr);
}
void CppSharp::Parser::ParserOptions::Defines::set(System::Collections::Generic::List<System::String^>^ value)
void CppSharp::Parser::ParserOptions::Instance::set(System::IntPtr object)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::ParserOptions*)NativePtr)->Defines = _tmpvalue;
NativePtr = (::CppSharp::CppParser::ParserOptions*)object.ToPointer();
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::ParserOptions::LibraryDirs::get()
System::String^ CppSharp::Parser::ParserOptions::FileName::get()
{
auto _tmpLibraryDirs = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::ParserOptions*)NativePtr)->LibraryDirs)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpLibraryDirs->Add(_marshalElement);
}
return _tmpLibraryDirs;
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getFileName();
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserOptions::LibraryDirs::set(System::Collections::Generic::List<System::String^>^ value)
void CppSharp::Parser::ParserOptions::FileName::set(System::String^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::ParserOptions*)NativePtr)->LibraryDirs = _tmpvalue;
auto s = value;
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserOptions*)NativePtr)->setFileName(arg0);
}
CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::ParserOptions::ASTContext::get()
unsigned int CppSharp::Parser::ParserOptions::IncludeDirsCount::get()
{
return gcnew CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*)((::CppSharp::CppParser::ParserOptions*)NativePtr)->ASTContext);
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getIncludeDirsCount();
return __ret;
}
void CppSharp::Parser::ParserOptions::ASTContext::set(CppSharp::Parser::AST::ASTContext^ value)
unsigned int CppSharp::Parser::ParserOptions::SystemIncludeDirsCount::get()
{
((::CppSharp::CppParser::ParserOptions*)NativePtr)->ASTContext = (::CppSharp::CppParser::AST::ASTContext*)value->NativePtr;
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getSystemIncludeDirsCount();
return __ret;
}
int CppSharp::Parser::ParserOptions::ToolSetToUse::get()
unsigned int CppSharp::Parser::ParserOptions::DefinesCount::get()
{
return ((::CppSharp::CppParser::ParserOptions*)NativePtr)->ToolSetToUse;
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getDefinesCount();
return __ret;
}
void CppSharp::Parser::ParserOptions::ToolSetToUse::set(int value)
unsigned int CppSharp::Parser::ParserOptions::LibraryDirsCount::get()
{
((::CppSharp::CppParser::ParserOptions*)NativePtr)->ToolSetToUse = value;
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getLibraryDirsCount();
return __ret;
}
System::String^ CppSharp::Parser::ParserOptions::TargetTriple::get()
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::ParserOptions*)NativePtr)->TargetTriple);
auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getTargetTriple();
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserOptions::TargetTriple::set(System::String^ value)
{
((::CppSharp::CppParser::ParserOptions*)NativePtr)->TargetTriple = clix::marshalString<clix::E_UTF8>(value);
auto s = value;
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserOptions*)NativePtr)->setTargetTriple(arg0);
}
CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::ParserOptions::ASTContext::get()
{
return gcnew CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*)((::CppSharp::CppParser::ParserOptions*)NativePtr)->ASTContext);
}
void CppSharp::Parser::ParserOptions::ASTContext::set(CppSharp::Parser::AST::ASTContext^ value)
{
((::CppSharp::CppParser::ParserOptions*)NativePtr)->ASTContext = (::CppSharp::CppParser::AST::ASTContext*)value->NativePtr;
}
int CppSharp::Parser::ParserOptions::ToolSetToUse::get()
{
return ((::CppSharp::CppParser::ParserOptions*)NativePtr)->ToolSetToUse;
}
void CppSharp::Parser::ParserOptions::ToolSetToUse::set(int value)
{
((::CppSharp::CppParser::ParserOptions*)NativePtr)->ToolSetToUse = value;
}
CppSharp::Parser::AST::CppAbi CppSharp::Parser::ParserOptions::Abi::get()
@ -236,22 +238,32 @@ void CppSharp::Parser::ParserDiagnostic::Instance::set(System::IntPtr object) @@ -236,22 +238,32 @@ void CppSharp::Parser::ParserDiagnostic::Instance::set(System::IntPtr object)
System::String^ CppSharp::Parser::ParserDiagnostic::FileName::get()
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->FileName);
auto __ret = ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->getFileName();
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserDiagnostic::FileName::set(System::String^ value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->FileName = clix::marshalString<clix::E_UTF8>(value);
auto s = value;
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->setFileName(arg0);
}
System::String^ CppSharp::Parser::ParserDiagnostic::Message::get()
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->Message);
auto __ret = ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->getMessage();
if (__ret == nullptr) return nullptr;
return clix::marshalString<clix::E_UTF8>(__ret);
}
void CppSharp::Parser::ParserDiagnostic::Message::set(System::String^ value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->Message = clix::marshalString<clix::E_UTF8>(value);
auto s = value;
auto _arg0 = clix::marshalString<clix::E_UTF8>(s);
auto arg0 = _arg0.c_str();
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->setMessage(arg0);
}
CppSharp::Parser::ParserDiagnosticLevel CppSharp::Parser::ParserDiagnostic::Level::get()
@ -295,6 +307,19 @@ CppSharp::Parser::ParserResult::ParserResult(System::IntPtr native) @@ -295,6 +307,19 @@ CppSharp::Parser::ParserResult::ParserResult(System::IntPtr native)
NativePtr = __native;
}
CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserResult::getDiagnostics(unsigned int i)
{
auto __ret = ((::CppSharp::CppParser::ParserResult*)NativePtr)->getDiagnostics(i);
auto ____ret = new ::CppSharp::CppParser::ParserDiagnostic(__ret);
return gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*)____ret);
}
void CppSharp::Parser::ParserResult::addDiagnostics(CppSharp::Parser::ParserDiagnostic^ s)
{
auto &arg0 = *(::CppSharp::CppParser::ParserDiagnostic*)s->NativePtr;
((::CppSharp::CppParser::ParserResult*)NativePtr)->addDiagnostics(arg0);
}
CppSharp::Parser::ParserResult::ParserResult()
{
NativePtr = new ::CppSharp::CppParser::ParserResult();
@ -310,6 +335,12 @@ void CppSharp::Parser::ParserResult::Instance::set(System::IntPtr object) @@ -310,6 +335,12 @@ void CppSharp::Parser::ParserResult::Instance::set(System::IntPtr object)
NativePtr = (::CppSharp::CppParser::ParserResult*)object.ToPointer();
}
unsigned int CppSharp::Parser::ParserResult::DiagnosticsCount::get()
{
auto __ret = ((::CppSharp::CppParser::ParserResult*)NativePtr)->getDiagnosticsCount();
return __ret;
}
CppSharp::Parser::ParserResultKind CppSharp::Parser::ParserResult::Kind::get()
{
return (CppSharp::Parser::ParserResultKind)((::CppSharp::CppParser::ParserResult*)NativePtr)->Kind;
@ -320,29 +351,6 @@ void CppSharp::Parser::ParserResult::Kind::set(CppSharp::Parser::ParserResultKin @@ -320,29 +351,6 @@ void CppSharp::Parser::ParserResult::Kind::set(CppSharp::Parser::ParserResultKin
((::CppSharp::CppParser::ParserResult*)NativePtr)->Kind = (::CppSharp::CppParser::ParserResultKind)value;
}
System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ CppSharp::Parser::ParserResult::Diagnostics::get()
{
auto _tmpDiagnostics = gcnew System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>();
for(auto _element : ((::CppSharp::CppParser::ParserResult*)NativePtr)->Diagnostics)
{
auto ___element = new ::CppSharp::CppParser::ParserDiagnostic(_element);
auto _marshalElement = gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*)___element);
_tmpDiagnostics->Add(_marshalElement);
}
return _tmpDiagnostics;
}
void CppSharp::Parser::ParserResult::Diagnostics::set(System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ value)
{
auto _tmpvalue = std::vector<::CppSharp::CppParser::ParserDiagnostic>();
for each(CppSharp::Parser::ParserDiagnostic^ _element in value)
{
auto _marshalElement = *(::CppSharp::CppParser::ParserDiagnostic*)_element->NativePtr;
_tmpvalue.push_back(_marshalElement);
}
((::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);

89
src/CppParser/Bindings/CLI/CppParser.h

@ -7,17 +7,17 @@ namespace CppSharp @@ -7,17 +7,17 @@ namespace CppSharp
{
namespace Parser
{
ref class ParserOptions;
ref class ParserDiagnostic;
enum struct ParserDiagnosticLevel;
ref class ParserResult;
enum struct ParserResultKind;
ref class ClangParser;
enum struct SourceLocationKind;
ref class ClangParser;
ref class ParserDiagnostic;
ref class ParserOptions;
ref class ParserResult;
namespace AST
{
ref class ASTContext;
enum struct CppAbi;
ref class ASTContext;
ref class NativeLibrary;
}
}
@ -72,66 +72,90 @@ namespace CppSharp @@ -72,66 +72,90 @@ namespace CppSharp
System::String^ get();
void set(System::String^);
}
property System::Collections::Generic::List<System::String^>^ IncludeDirs
property unsigned int IncludeDirsCount
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
unsigned int get();
}
property System::Collections::Generic::List<System::String^>^ SystemIncludeDirs
property unsigned int SystemIncludeDirsCount
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
unsigned int get();
}
property System::Collections::Generic::List<System::String^>^ Defines
property unsigned int DefinesCount
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
unsigned int get();
}
property System::Collections::Generic::List<System::String^>^ LibraryDirs
property unsigned int LibraryDirsCount
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
unsigned int get();
}
property System::String^ TargetTriple
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::ASTContext^ ASTContext
{
CppSharp::Parser::AST::ASTContext^ get();
void set(CppSharp::Parser::AST::ASTContext^);
}
property int ToolSetToUse
{
int get();
void set(int);
}
property System::String^ TargetTriple
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::CppAbi Abi
{
CppSharp::Parser::AST::CppAbi get();
void set(CppSharp::Parser::AST::CppAbi);
}
property bool NoStandardIncludes
{
bool get();
void set(bool);
}
property bool NoBuiltinIncludes
{
bool get();
void set(bool);
}
property bool MicrosoftMode
{
bool get();
void set(bool);
}
property bool Verbose
{
bool get();
void set(bool);
}
System::String^ getIncludeDirs(unsigned int i);
void addIncludeDirs(System::String^ s);
System::String^ getSystemIncludeDirs(unsigned int i);
void addSystemIncludeDirs(System::String^ s);
System::String^ getDefines(unsigned int i);
void addDefines(System::String^ s);
System::String^ getLibraryDirs(unsigned int i);
void addLibraryDirs(System::String^ s);
};
public ref class ParserDiagnostic : ICppInstance
@ -154,21 +178,25 @@ namespace CppSharp @@ -154,21 +178,25 @@ namespace CppSharp
System::String^ get();
void set(System::String^);
}
property System::String^ Message
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::ParserDiagnosticLevel Level
{
CppSharp::Parser::ParserDiagnosticLevel get();
void set(CppSharp::Parser::ParserDiagnosticLevel);
}
property int LineNumber
{
int get();
void set(int);
}
property int ColumnNumber
{
int get();
@ -191,26 +219,32 @@ namespace CppSharp @@ -191,26 +219,32 @@ namespace CppSharp
ParserResult(System::IntPtr native);
ParserResult();
property unsigned int DiagnosticsCount
{
unsigned int get();
}
property CppSharp::Parser::ParserResultKind Kind
{
CppSharp::Parser::ParserResultKind get();
void set(CppSharp::Parser::ParserResultKind);
}
property System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ Diagnostics
{
System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ get();
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^);
}
CppSharp::Parser::ParserDiagnostic^ getDiagnostics(unsigned int i);
void addDiagnostics(CppSharp::Parser::ParserDiagnostic^ s);
};
public ref class ClangParser : ICppInstance
@ -231,7 +265,6 @@ namespace CppSharp @@ -231,7 +265,6 @@ namespace CppSharp
static CppSharp::Parser::ParserResult^ ParseHeader(CppSharp::Parser::ParserOptions^ Opts);
static CppSharp::Parser::ParserResult^ ParseLibrary(CppSharp::Parser::ParserOptions^ Opts);
};
}
}

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

File diff suppressed because it is too large Load Diff

387
src/CppParser/Bindings/CSharp/CppParser.cs

@ -40,30 +40,12 @@ namespace CppSharp @@ -40,30 +40,12 @@ namespace CppSharp
[StructLayout(LayoutKind.Explicit, Size = 112)]
public struct Internal
{
[FieldOffset(0)]
public Std.String FileName;
[FieldOffset(24)]
public Std.Vector IncludeDirs;
[FieldOffset(36)]
public Std.Vector SystemIncludeDirs;
[FieldOffset(48)]
public Std.Vector Defines;
[FieldOffset(60)]
public Std.Vector LibraryDirs;
[FieldOffset(72)]
public global::System.IntPtr ASTContext;
[FieldOffset(76)]
public int ToolSetToUse;
[FieldOffset(80)]
public Std.String TargetTriple;
[FieldOffset(104)]
public CppSharp.Parser.AST.CppAbi Abi;
@ -80,14 +62,94 @@ namespace CppSharp @@ -80,14 +62,94 @@ namespace CppSharp
public bool Verbose;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserOptions@CppParser@CppSharp@@QAE@XZ")]
public static extern global::System.IntPtr ParserOptions0(global::System.IntPtr instance);
internal static extern global::System.IntPtr ParserOptions_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserOptions@CppParser@CppSharp@@QAE@ABU012@@Z")]
public static extern global::System.IntPtr ParserOptions2(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr ParserOptions_2(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
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.ThisCall,
EntryPoint="?addIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
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.ThisCall,
EntryPoint="?getSystemIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
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.ThisCall,
EntryPoint="?addSystemIncludeDirs@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
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.ThisCall,
EntryPoint="?getDefines@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
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.ThisCall,
EntryPoint="?addDefines@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
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.ThisCall,
EntryPoint="?getLibraryDirs@ParserOptions@CppParser@CppSharp@@QAEPBDI@Z")]
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.ThisCall,
EntryPoint="?addLibraryDirs@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
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.ThisCall,
EntryPoint="?getFileName@ParserOptions@CppParser@CppSharp@@QAEPBDXZ")]
internal static extern global::System.IntPtr getFileName_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?setFileName@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
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.ThisCall,
EntryPoint="?getIncludeDirsCount@ParserOptions@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getIncludeDirsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getSystemIncludeDirsCount@ParserOptions@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getSystemIncludeDirsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getDefinesCount@ParserOptions@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getDefinesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getLibraryDirsCount@ParserOptions@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getLibraryDirsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getTargetTriple@ParserOptions@CppParser@CppSharp@@QAEPBDXZ")]
internal static extern global::System.IntPtr getTargetTriple_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?setTargetTriple@ParserOptions@CppParser@CppSharp@@QAEXPBD@Z")]
internal static extern void setTargetTriple_0(global::System.IntPtr instance, global::System.IntPtr s);
}
public global::System.IntPtr __Instance { get; protected set; }
@ -123,7 +185,7 @@ namespace CppSharp @@ -123,7 +185,7 @@ namespace CppSharp
public ParserOptions()
{
__Instance = Marshal.AllocHGlobal(112);
Internal.ParserOptions0(__Instance);
Internal.ParserOptions_0(__Instance);
}
public void Dispose()
@ -137,78 +199,129 @@ namespace CppSharp @@ -137,78 +199,129 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance);
}
public Std.String FileName
public string getIncludeDirs(uint i)
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->FileName;
}
var __ret = Internal.getIncludeDirs_0(__Instance, i);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->FileName = new Std.String();
}
public void addIncludeDirs(string s)
{
var arg0 = Marshal.StringToHGlobalAnsi(s);
Internal.addIncludeDirs_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
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 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 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 Std.Vector<Std.String> IncludeDirs
public string FileName
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return new Std.Vector<Std.String>(__ptr->IncludeDirs);
var __ret = Internal.getFileName_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->IncludeDirs = value.Internal;
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setFileName_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
public Std.Vector<Std.String> SystemIncludeDirs
public uint IncludeDirsCount
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return new Std.Vector<Std.String>(__ptr->SystemIncludeDirs);
var __ret = Internal.getIncludeDirsCount_0(__Instance);
return __ret;
}
}
set
public uint SystemIncludeDirsCount
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->SystemIncludeDirs = value.Internal;
var __ret = Internal.getSystemIncludeDirsCount_0(__Instance);
return __ret;
}
}
public Std.Vector<Std.String> Defines
public uint DefinesCount
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return new Std.Vector<Std.String>(__ptr->Defines);
var __ret = Internal.getDefinesCount_0(__Instance);
return __ret;
}
}
set
public uint LibraryDirsCount
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Defines = value.Internal;
var __ret = Internal.getLibraryDirsCount_0(__Instance);
return __ret;
}
}
public Std.Vector<Std.String> LibraryDirs
public string TargetTriple
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return new Std.Vector<Std.String>(__ptr->LibraryDirs);
var __ret = Internal.getTargetTriple_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->LibraryDirs = value.Internal;
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setTargetTriple_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
@ -224,7 +337,7 @@ namespace CppSharp @@ -224,7 +337,7 @@ namespace CppSharp
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->ASTContext = value.__Instance;
__ptr->ASTContext = value == (CppSharp.Parser.AST.ASTContext) null ? global::System.IntPtr.Zero : value.__Instance;
}
}
@ -243,21 +356,6 @@ namespace CppSharp @@ -243,21 +356,6 @@ namespace CppSharp
}
}
public Std.String TargetTriple
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->TargetTriple;
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->TargetTriple = new Std.String();
}
}
public CppSharp.Parser.AST.CppAbi Abi
{
get
@ -339,12 +437,6 @@ namespace CppSharp @@ -339,12 +437,6 @@ namespace CppSharp
[StructLayout(LayoutKind.Explicit, Size = 60)]
public struct Internal
{
[FieldOffset(0)]
public Std.String FileName;
[FieldOffset(24)]
public Std.String Message;
[FieldOffset(48)]
public CppSharp.Parser.ParserDiagnosticLevel Level;
@ -355,14 +447,34 @@ namespace CppSharp @@ -355,14 +447,34 @@ namespace CppSharp
public int ColumnNumber;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QAE@XZ")]
public static extern global::System.IntPtr ParserDiagnostic1(global::System.IntPtr instance);
internal static extern global::System.IntPtr ParserDiagnostic_1(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserDiagnostic@CppParser@CppSharp@@QAE@ABU012@@Z")]
public static extern global::System.IntPtr ParserDiagnostic2(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr ParserDiagnostic_2(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getFileName@ParserDiagnostic@CppParser@CppSharp@@QAEPBDXZ")]
internal static extern global::System.IntPtr getFileName_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?setFileName@ParserDiagnostic@CppParser@CppSharp@@QAEXPBD@Z")]
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.ThisCall,
EntryPoint="?getMessage@ParserDiagnostic@CppParser@CppSharp@@QAEPBDXZ")]
internal static extern global::System.IntPtr getMessage_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?setMessage@ParserDiagnostic@CppParser@CppSharp@@QAEXPBD@Z")]
internal static extern void setMessage_0(global::System.IntPtr instance, global::System.IntPtr s);
}
public global::System.IntPtr __Instance { get; protected set; }
@ -398,7 +510,7 @@ namespace CppSharp @@ -398,7 +510,7 @@ namespace CppSharp
public ParserDiagnostic()
{
__Instance = Marshal.AllocHGlobal(60);
Internal.ParserDiagnostic1(__Instance);
Internal.ParserDiagnostic_1(__Instance);
}
public void Dispose()
@ -412,33 +524,37 @@ namespace CppSharp @@ -412,33 +524,37 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance);
}
public Std.String FileName
public string FileName
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->FileName;
var __ret = Internal.getFileName_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->FileName = new Std.String();
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setFileName_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
public Std.String Message
public string Message
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->Message;
var __ret = Internal.getMessage_0(__Instance);
if (__ret == global::System.IntPtr.Zero) return null;
return Marshal.PtrToStringAnsi(__ret);
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Message = new Std.String();
var arg0 = Marshal.StringToHGlobalAnsi(value);
Internal.setMessage_0(__Instance, arg0);
Marshal.FreeHGlobal(arg0);
}
}
@ -496,9 +612,6 @@ namespace CppSharp @@ -496,9 +612,6 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.ParserResultKind Kind;
[FieldOffset(4)]
public Std.Vector Diagnostics;
[FieldOffset(16)]
public global::System.IntPtr ASTContext;
@ -506,14 +619,29 @@ namespace CppSharp @@ -506,14 +619,29 @@ namespace CppSharp
public global::System.IntPtr Library;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@XZ")]
public static extern global::System.IntPtr ParserResult1(global::System.IntPtr instance);
internal static extern global::System.IntPtr ParserResult_1(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParserResult@CppParser@CppSharp@@QAE@ABU012@@Z")]
public static extern global::System.IntPtr ParserResult2(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr ParserResult_2(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getDiagnostics@ParserResult@CppParser@CppSharp@@QAE?AUParserDiagnostic@23@I@Z")]
internal static extern void getDiagnostics_0(global::System.IntPtr instance, global::System.IntPtr __return, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?addDiagnostics@ParserResult@CppParser@CppSharp@@QAEXABUParserDiagnostic@23@@Z")]
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.ThisCall,
EntryPoint="?getDiagnosticsCount@ParserResult@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getDiagnosticsCount_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
@ -549,7 +677,7 @@ namespace CppSharp @@ -549,7 +677,7 @@ namespace CppSharp
public ParserResult()
{
__Instance = Marshal.AllocHGlobal(24);
Internal.ParserResult1(__Instance);
Internal.ParserResult_1(__Instance);
}
public void Dispose()
@ -563,33 +691,42 @@ namespace CppSharp @@ -563,33 +691,42 @@ namespace CppSharp
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.ParserResultKind Kind
public CppSharp.Parser.ParserDiagnostic getDiagnostics(uint i)
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return __ptr->Kind;
}
var __ret = new CppSharp.Parser.ParserDiagnostic.Internal();
Internal.getDiagnostics_0(__Instance, new IntPtr(&__ret), i);
var __instance = Marshal.AllocHGlobal(60);
CppSharp.Parser.ParserDiagnostic.Internal.ParserDiagnostic_2(__instance, new global::System.IntPtr(&__ret));
return new CppSharp.Parser.ParserDiagnostic(__instance);
}
set
public void addDiagnostics(CppSharp.Parser.ParserDiagnostic s)
{
var arg0 = s == (CppSharp.Parser.ParserDiagnostic) null ? global::System.IntPtr.Zero : s.__Instance;
Internal.addDiagnostics_0(__Instance, arg0);
}
public uint DiagnosticsCount
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Kind = value;
var __ret = Internal.getDiagnosticsCount_0(__Instance);
return __ret;
}
}
public Std.Vector<CppSharp.Parser.ParserDiagnostic> Diagnostics
public CppSharp.Parser.ParserResultKind Kind
{
get
{
var __ptr = (Internal*)__Instance.ToPointer();
return new Std.Vector<CppSharp.Parser.ParserDiagnostic>(__ptr->Diagnostics);
return __ptr->Kind;
}
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Diagnostics = value.Internal;
__ptr->Kind = value;
}
}
@ -605,7 +742,7 @@ namespace CppSharp @@ -605,7 +742,7 @@ namespace CppSharp
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->ASTContext = value.__Instance;
__ptr->ASTContext = value == (CppSharp.Parser.AST.ASTContext) null ? global::System.IntPtr.Zero : value.__Instance;
}
}
@ -621,7 +758,7 @@ namespace CppSharp @@ -621,7 +758,7 @@ namespace CppSharp
set
{
var __ptr = (Internal*)__Instance.ToPointer();
__ptr->Library = value.__Instance;
__ptr->Library = value == (CppSharp.Parser.AST.NativeLibrary) null ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
@ -632,19 +769,19 @@ namespace CppSharp @@ -632,19 +769,19 @@ namespace CppSharp
public struct Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.ThisCall,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ClangParser@CppParser@CppSharp@@QAE@ABV012@@Z")]
public static extern global::System.IntPtr ClangParser1(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr ClangParser_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?ParseHeader@ClangParser@CppParser@CppSharp@@SAPAUParserResult@23@PAUParserOptions@23@@Z")]
public static extern global::System.IntPtr ParseHeader0(global::System.IntPtr Opts);
internal static extern global::System.IntPtr ParseHeader_0(global::System.IntPtr Opts);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl,
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?ParseLibrary@ClangParser@CppParser@CppSharp@@SAPAUParserResult@23@PAUParserOptions@23@@Z")]
public static extern global::System.IntPtr ParseLibrary0(global::System.IntPtr Opts);
internal static extern global::System.IntPtr ParseLibrary_0(global::System.IntPtr Opts);
}
public global::System.IntPtr __Instance { get; protected set; }
@ -695,16 +832,16 @@ namespace CppSharp @@ -695,16 +832,16 @@ namespace CppSharp
public static CppSharp.Parser.ParserResult ParseHeader(CppSharp.Parser.ParserOptions Opts)
{
var arg0 = Opts.__Instance;
var __ret = Internal.ParseHeader0(arg0);
var arg0 = Opts == (CppSharp.Parser.ParserOptions) null ? global::System.IntPtr.Zero : Opts.__Instance;
var __ret = Internal.ParseHeader_0(arg0);
if (__ret == global::System.IntPtr.Zero) return null;
return new CppSharp.Parser.ParserResult(__ret);
}
public static CppSharp.Parser.ParserResult ParseLibrary(CppSharp.Parser.ParserOptions Opts)
{
var arg0 = Opts.__Instance;
var __ret = Internal.ParseLibrary0(arg0);
var arg0 = Opts == (CppSharp.Parser.ParserOptions) null ? global::System.IntPtr.Zero : Opts.__Instance;
var __ret = Internal.ParseLibrary_0(arg0);
if (__ret == global::System.IntPtr.Zero) return null;
return new CppSharp.Parser.ParserResult(__ret);
}

35
src/CppParser/Bindings/ParserGen.cs

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
using System.IO;
using CppSharp.AST;
using CppSharp.Generators;
using CppSharp.Passes;
using CppSharp.Types;
namespace CppSharp
{
@ -41,19 +43,30 @@ namespace CppSharp @@ -41,19 +43,30 @@ namespace CppSharp
options.GeneratorKind = Kind;
options.Headers.Add("AST.h");
options.Headers.Add("CppParser.h");
options.Libraries.Add("CppSharp.CppParser.lib");
var basePath = Path.Combine(GetSourceDirectory(), "CppParser");
#if OLD_PARSER
options.IncludeDirs.Add(basePath);
options.Libraries.Add("CppSharp.CppParser.lib");
options.LibraryDirs.Add(".");
#else
options.addIncludeDirs(basePath);
options.addLibraryDirs(".");
#endif
options.OutputDir = "../../../../src/CppParser/Bindings/";
options.OutputDir += Kind.ToString();
options.GenerateLibraryNamespace = false;
options.CheckSymbols = false;
options.Verbose = true;
}
public void SetupPasses(Driver driver)
{
driver.AddTranslationUnitPass(new IgnoreStdFieldsPass());
driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
}
public void Preprocess(Driver driver, ASTContext ctx)
@ -79,4 +92,22 @@ namespace CppSharp @@ -79,4 +92,22 @@ namespace CppSharp
ConsoleDriver.Run(new ParserGen(GeneratorKind.CSharp));
}
}
public class IgnoreStdFieldsPass : TranslationUnitPass
{
public override bool VisitFieldDecl(Field field)
{
if (field.Ignore)
return false;
var typePrinter = new CppTypePrinter(Driver.TypeDatabase);
var typeName = field.QualifiedType.Visit(typePrinter);
if (!typeName.Contains("std::"))
return false;
field.ExplicityIgnored = true;
return true;
}
}
}

Loading…
Cancel
Save