From 06c832cf68bcf05f5f0370d87d61968382a7d809 Mon Sep 17 00:00:00 2001 From: Deadlocklogic Date: Sat, 16 Dec 2023 17:55:51 +0200 Subject: [PATCH 1/8] Implement ClassTemplatePartialSpecialization::Parameters --- src/CppParser/AST.cpp | 2 ++ src/CppParser/Decl.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/CppParser/AST.cpp b/src/CppParser/AST.cpp index b01cb8deb..1b33cdb8c 100644 --- a/src/CppParser/AST.cpp +++ b/src/CppParser/AST.cpp @@ -793,6 +793,8 @@ ClassTemplatePartialSpecialization::ClassTemplatePartialSpecialization() ClassTemplatePartialSpecialization::~ClassTemplatePartialSpecialization() {} +DEF_VECTOR(ClassTemplatePartialSpecialization, Declaration*, Parameters) + FunctionTemplate::FunctionTemplate() : Template(DeclarationKind::FunctionTemplate) {} FunctionTemplate::~FunctionTemplate() {} diff --git a/src/CppParser/Decl.h b/src/CppParser/Decl.h index 40a2128bb..e8665ca7d 100644 --- a/src/CppParser/Decl.h +++ b/src/CppParser/Decl.h @@ -715,6 +715,7 @@ namespace CppSharp public: ClassTemplatePartialSpecialization(); ~ClassTemplatePartialSpecialization(); + VECTOR(Declaration *, Parameters) }; class CS_API FunctionTemplate : public Template From b9e403a3d2448c449f534ef0bf4c82034fce8439 Mon Sep 17 00:00:00 2001 From: Deadlocklogic Date: Sat, 16 Dec 2023 18:02:21 +0200 Subject: [PATCH 2/8] Template.cs: Implement ClassTemplatePartialSpecialization.Parameters --- src/AST/Template.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/AST/Template.cs b/src/AST/Template.cs index e71ee5b81..57cd5c7dc 100644 --- a/src/AST/Template.cs +++ b/src/AST/Template.cs @@ -304,6 +304,12 @@ public override string ToString() /// public class ClassTemplatePartialSpecialization : ClassTemplateSpecialization { + public readonly List Parameters; + + public ClassTemplatePartialSpecialization() + { + Parameters = new List(); + } } /// From e2e0317472fb6ed20536538c164a0fa24985fbaa Mon Sep 17 00:00:00 2001 From: Deadlocklogic Date: Sat, 16 Dec 2023 18:37:27 +0200 Subject: [PATCH 3/8] GeneratorKind: fix bug introduced while migrating from enum to class --- src/Generator/GeneratorKind.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Generator/GeneratorKind.cs b/src/Generator/GeneratorKind.cs index 200ed11e4..4101a77cb 100644 --- a/src/Generator/GeneratorKind.cs +++ b/src/Generator/GeneratorKind.cs @@ -104,6 +104,11 @@ public override int GetHashCode() } } + public override string ToString() + { + return ID; + } + public const string CLI_ID = "CLI"; public static readonly GeneratorKind CLI = new(CLI_ID, "C++/CLI", typeof(CLIGenerator), typeof(CLITypePrinter), new[] { "cli" }); From bf6a6609971d7d6a37884f27f30900ccb021552d Mon Sep 17 00:00:00 2001 From: Deadlocklogic Date: Sun, 17 Dec 2023 10:09:44 +0200 Subject: [PATCH 4/8] Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter --- src/CppParser/Bindings/CLI/Decl.cpp | 49 +++ src/CppParser/Bindings/CLI/Decl.h | 17 + .../CppSharp.CppParser.cs | 358 ++++++++++-------- .../CSharp/i686-apple-darwin12.4.0/Std.cs | 13 +- .../i686-pc-win32-msvc/CppSharp.CppParser.cs | 358 ++++++++++-------- .../Bindings/CSharp/i686-pc-win32-msvc/Std.cs | 22 +- .../CppSharp.CppParser.cs | 358 ++++++++++-------- .../CSharp/x86_64-apple-darwin12.4.0/Std.cs | 13 +- .../CppSharp.CppParser.cs | 358 ++++++++++-------- .../CSharp/x86_64-linux-gnu-cxx11abi/Std.cs | 13 +- .../x86_64-linux-gnu/CppSharp.CppParser.cs | 358 ++++++++++-------- .../Bindings/CSharp/x86_64-linux-gnu/Std.cs | 13 +- .../CppSharp.CppParser.cs | 358 ++++++++++-------- .../CSharp/x86_64-pc-win32-msvc/Std.cs | 22 +- src/CppParser/Parser.cpp | 2 + src/Generator/Types/Std/Stdlib.CSharp.cs | 16 - src/Parser/ASTConverter.cs | 6 + 17 files changed, 1364 insertions(+), 970 deletions(-) diff --git a/src/CppParser/Bindings/CLI/Decl.cpp b/src/CppParser/Bindings/CLI/Decl.cpp index 6afab65ea..58553e540 100644 --- a/src/CppParser/Bindings/CLI/Decl.cpp +++ b/src/CppParser/Bindings/CLI/Decl.cpp @@ -4514,6 +4514,26 @@ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::ClassTemplatePartialS NativePtr = new class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization(); } +CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::GetParameters(unsigned int i) +{ + auto ___ret = ((class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*)NativePtr)->getParameters(i); + if (___ret == nullptr) return nullptr; + return (___ret == nullptr) ? nullptr : gcnew ::CppSharp::Parser::AST::Declaration((class ::CppSharp::CppParser::AST::Declaration*)___ret); +} + +void CppSharp::Parser::AST::ClassTemplatePartialSpecialization::AddParameters(CppSharp::Parser::AST::Declaration^ s) +{ + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "Cannot be null because it is a C++ reference (&)."); + auto __arg0 = (class ::CppSharp::CppParser::AST::Declaration*)s->NativePtr; + ((class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*)NativePtr)->addParameters(__arg0); +} + +void CppSharp::Parser::AST::ClassTemplatePartialSpecialization::ClearParameters() +{ + ((class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*)NativePtr)->clearParameters(); +} + CppSharp::Parser::AST::ClassTemplatePartialSpecialization::ClassTemplatePartialSpecialization(CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ _0) : CppSharp::Parser::AST::ClassTemplateSpecialization((::CppSharp::CppParser::AST::ClassTemplateSpecialization*)nullptr) { @@ -4524,6 +4544,35 @@ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::ClassTemplatePartialS NativePtr = new class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization(__arg0); } +::System::Collections::Generic::List^ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::Parameters::get() +{ + auto _tmp__Parameters = gcnew ::System::Collections::Generic::List(); + auto __list0 = ((class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*)NativePtr)->Parameters; + for(auto _element : __list0) + { + auto _marshalElement = (_element == nullptr) ? nullptr : gcnew ::CppSharp::Parser::AST::Declaration((class ::CppSharp::CppParser::AST::Declaration*)_element); + _tmp__Parameters->Add(_marshalElement); + } + return _tmp__Parameters; +} + +void CppSharp::Parser::AST::ClassTemplatePartialSpecialization::Parameters::set(::System::Collections::Generic::List^ value) +{ + auto _tmpvalue = std::vector<::CppSharp::CppParser::AST::Declaration*>(); + for each(CppSharp::Parser::AST::Declaration^ _element in value) + { + auto _marshalElement = (class ::CppSharp::CppParser::AST::Declaration*)_element->NativePtr; + _tmpvalue.push_back(_marshalElement); + } + ((class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*)NativePtr)->Parameters = _tmpvalue; +} + +unsigned int CppSharp::Parser::AST::ClassTemplatePartialSpecialization::ParametersCount::get() +{ + auto ___ret = ((class ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*)NativePtr)->getParametersCount(); + return ___ret; +} + CppSharp::Parser::AST::FunctionTemplate::FunctionTemplate(class ::CppSharp::CppParser::AST::FunctionTemplate* native) : CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*)native) { diff --git a/src/CppParser/Bindings/CLI/Decl.h b/src/CppParser/Bindings/CLI/Decl.h index cfc54e856..107a2aefc 100644 --- a/src/CppParser/Bindings/CLI/Decl.h +++ b/src/CppParser/Bindings/CLI/Decl.h @@ -2205,6 +2205,23 @@ namespace CppSharp ClassTemplatePartialSpecialization(CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ _0); ~ClassTemplatePartialSpecialization(); + + property ::System::Collections::Generic::List^ Parameters + { + ::System::Collections::Generic::List^ get(); + void set(::System::Collections::Generic::List^); + } + + property unsigned int ParametersCount + { + unsigned int get(); + } + + CppSharp::Parser::AST::Declaration^ GetParameters(unsigned int i); + + void AddParameters(CppSharp::Parser::AST::Declaration^ s); + + void ClearParameters(); }; public ref class FunctionTemplate : CppSharp::Parser::AST::Template diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs index fe8c0db53..2f075705a 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs @@ -14,6 +14,7 @@ [assembly:InternalsVisibleTo("CppSharp.Parser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace CppSharp { @@ -187,12 +188,12 @@ public NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -378,12 +379,12 @@ public Comment(global::CppSharp.Parser.AST.Comment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -602,7 +603,7 @@ public FullComment(global::CppSharp.Parser.AST.FullComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -850,7 +851,7 @@ public ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1043,12 +1044,12 @@ public Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1151,7 +1152,7 @@ public BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1323,7 +1324,7 @@ public ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1462,7 +1463,7 @@ public TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1589,7 +1590,7 @@ public VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineCom partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1716,7 +1717,7 @@ public VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1847,7 +1848,7 @@ public VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2018,12 +2019,12 @@ public Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2117,7 +2118,7 @@ public InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2416,12 +2417,12 @@ public Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2529,7 +2530,7 @@ public HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2673,7 +2674,7 @@ public HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2786,7 +2787,7 @@ public TextComment(global::CppSharp.Parser.AST.TextComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2918,12 +2919,12 @@ public RawComment(global::CppSharp.Parser.AST.RawComment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3017,7 +3018,7 @@ public partial struct __Internal } private SourceLocation.__Internal __instance; - internal SourceLocation.__Internal __Instance => __instance; + internal ref SourceLocation.__Internal __Instance => ref __instance; internal static SourceLocation __CreateInstance(__IntPtr native, bool skipVTables = false) { @@ -3040,6 +3041,14 @@ private SourceLocation(void* native, bool skipVTables = false) : this() __instance = *(global::CppSharp.Parser.SourceLocation.__Internal*) native; } + public SourceLocation() + { + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } + } + public SourceLocation(uint ID) : this() { @@ -3175,12 +3184,12 @@ public SourceRange() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3402,12 +3411,12 @@ public Type(global::CppSharp.Parser.AST.Type _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3543,12 +3552,12 @@ public TypeQualifiers() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3695,12 +3704,12 @@ public QualifiedType(global::CppSharp.Parser.AST.QualifiedType _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4082,7 +4091,7 @@ public FunctionType(global::CppSharp.Parser.AST.FunctionType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4826,12 +4835,12 @@ public TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4997,7 +5006,7 @@ public TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializa partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5167,7 +5176,7 @@ public DependentTemplateSpecializationType(global::CppSharp.Parser.AST.Dependent partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5313,7 +5322,7 @@ public TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5688,7 +5697,7 @@ public DependentNameType(global::CppSharp.Parser.AST.DependentNameType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -6574,12 +6583,12 @@ public Declaration(global::CppSharp.Parser.AST.Declaration _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7147,7 +7156,7 @@ public DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7554,7 +7563,7 @@ public TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7693,7 +7702,7 @@ public TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7813,7 +7822,7 @@ public TypeAlias(global::CppSharp.Parser.AST.TypeAlias _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7946,7 +7955,7 @@ public Friend(global::CppSharp.Parser.AST.Friend _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8082,12 +8091,12 @@ public StatementObsolete(global::CppSharp.Parser.AST.StatementObsolete _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8232,7 +8241,7 @@ public ExpressionObsolete(global::CppSharp.Parser.AST.ExpressionObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8344,7 +8353,7 @@ public BinaryOperatorObsolete(global::CppSharp.Parser.AST.BinaryOperatorObsolete partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8503,7 +8512,7 @@ public CallExprObsolete(global::CppSharp.Parser.AST.CallExprObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8650,7 +8659,7 @@ public CXXConstructExprObsolete(global::CppSharp.Parser.AST.CXXConstructExprObso partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8804,7 +8813,7 @@ public Parameter(global::CppSharp.Parser.AST.Parameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9047,7 +9056,7 @@ public Function(global::CppSharp.Parser.AST.Function _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9507,7 +9516,7 @@ public Method(global::CppSharp.Parser.AST.Method _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9878,7 +9887,7 @@ public Item(global::CppSharp.Parser.AST.Enumeration.Item _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9985,7 +9994,7 @@ public Enumeration(global::CppSharp.Parser.AST.Enumeration _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10189,7 +10198,7 @@ public Variable(global::CppSharp.Parser.AST.Variable _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10357,12 +10366,12 @@ public BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10535,7 +10544,7 @@ public Field(global::CppSharp.Parser.AST.Field _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10708,7 +10717,7 @@ public AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10819,12 +10828,12 @@ public VTableComponent(global::CppSharp.Parser.AST.VTableComponent _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10989,12 +10998,12 @@ public VTableLayout(global::CppSharp.Parser.AST.VTableLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11141,12 +11150,12 @@ public VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11318,12 +11327,12 @@ public LayoutField(global::CppSharp.Parser.AST.LayoutField other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11494,12 +11503,12 @@ public LayoutBase(global::CppSharp.Parser.AST.LayoutBase other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11687,12 +11696,12 @@ public ClassLayout(global::CppSharp.Parser.AST.ClassLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12084,7 +12093,7 @@ public Class(global::CppSharp.Parser.AST.Class _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12505,7 +12514,7 @@ public Template(global::CppSharp.Parser.AST.Template _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12674,7 +12683,7 @@ public TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12795,7 +12804,7 @@ public TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12962,7 +12971,7 @@ public TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplatePar partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13123,7 +13132,7 @@ public TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13265,7 +13274,7 @@ public NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParam partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13486,7 +13495,7 @@ public ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13698,7 +13707,7 @@ public ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpec partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13770,7 +13779,7 @@ public uint ArgumentsCount public unsafe partial class ClassTemplatePartialSpecialization : global::CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable { - [StructLayout(LayoutKind.Sequential, Size = 328)] + [StructLayout(LayoutKind.Sequential, Size = 340)] public new partial struct __Internal { internal global::CppSharp.Parser.AST.DeclarationKind kind; @@ -13825,6 +13834,7 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar internal __IntPtr templatedDecl; internal global::Std.Vector.__Internalc__N_std_N___1_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_N___1_S_allocator__S0_ Arguments; internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind; + internal global::Std.Vector.__Internalc__N_std_N___1_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_N___1_S_allocator__S0_ Parameters; [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationC2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void ctor(__IntPtr __instance); @@ -13834,6 +13844,18 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationD2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void dtor(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13getParametersEj", CallingConvention = __CallingConvention.Cdecl)] + internal static extern __IntPtr GetParameters(__IntPtr __instance, uint i); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13addParametersERPNS1_11DeclarationE", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void AddParameters(__IntPtr __instance, __IntPtr s); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization15clearParametersEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void ClearParameters(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization18getParametersCountEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern uint GetParametersCount(__IntPtr __instance); } internal static new ClassTemplatePartialSpecialization __CreateInstance(__IntPtr native, bool skipVTables = false) @@ -13902,7 +13924,7 @@ public ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTempl partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13914,6 +13936,36 @@ internal protected override void Dispose(bool disposing, bool callNativeDtor ) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; } + + public global::CppSharp.Parser.AST.Declaration GetParameters(uint i) + { + var ___ret = __Internal.GetParameters(__Instance, i); + var __result0 = global::CppSharp.Parser.AST.Declaration.__GetOrCreateInstance(___ret, false); + return __result0; + } + + public void AddParameters(global::CppSharp.Parser.AST.Declaration s) + { + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&)."); + var ____arg0 = s.__Instance; + var __arg0 = new __IntPtr(&____arg0); + __Internal.AddParameters(__Instance, __arg0); + } + + public void ClearParameters() + { + __Internal.ClearParameters(__Instance); + } + + public uint ParametersCount + { + get + { + var ___ret = __Internal.GetParametersCount(__Instance); + return ___ret; + } + } } public unsafe partial class FunctionTemplate : global::CppSharp.Parser.AST.Template, IDisposable @@ -14038,7 +14090,7 @@ public FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14209,12 +14261,12 @@ public FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTempla public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14423,7 +14475,7 @@ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14612,7 +14664,7 @@ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpeciali partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14793,7 +14845,7 @@ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplateP partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14911,7 +14963,7 @@ public UnresolvedUsingTypename(global::CppSharp.Parser.AST.UnresolvedUsingTypena partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15041,7 +15093,7 @@ public Namespace(global::CppSharp.Parser.AST.Namespace _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15165,12 +15217,12 @@ public PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15310,7 +15362,7 @@ public MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15466,7 +15518,7 @@ public MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15653,7 +15705,7 @@ public TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15840,12 +15892,12 @@ public ASTContext(global::CppSharp.Parser.AST.ASTContext _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16148,12 +16200,12 @@ public Stmt(global::CppSharp.Parser.AST.Stmt _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16325,7 +16377,7 @@ public DeclStmt(global::CppSharp.Parser.AST.DeclStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16608,7 +16660,7 @@ public CompoundStmt(global::CppSharp.Parser.AST.CompoundStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -18966,7 +19018,7 @@ public AsmStmt(global::CppSharp.Parser.AST.AsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19277,12 +19329,12 @@ public AsmStringPiece(global::CppSharp.Parser.AST.GCCAsmStmt.AsmStringPiece _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19428,7 +19480,7 @@ public GCCAsmStmt(global::CppSharp.Parser.AST.GCCAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19554,7 +19606,7 @@ public MSAsmStmt(global::CppSharp.Parser.AST.MSAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20255,12 +20307,12 @@ public Capture(global::CppSharp.Parser.AST.CapturedStmt.Capture _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20416,7 +20468,7 @@ public CapturedStmt(global::CppSharp.Parser.AST.CapturedStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -21279,12 +21331,12 @@ public CtorArgs(global::CppSharp.Parser.AST.CoroutineBodyStmt.CtorArgs _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -22107,12 +22159,12 @@ public Classification(global::CppSharp.Parser.AST.Expr.Classification _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -23860,7 +23912,7 @@ public StringLiteral(global::CppSharp.Parser.AST.StringLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -25233,7 +25285,7 @@ public CallExpr(global::CppSharp.Parser.AST.CallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26539,7 +26591,7 @@ public BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26929,7 +26981,7 @@ public CompoundAssignOperator(global::CppSharp.Parser.AST.CompoundAssignOperator partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -28812,12 +28864,12 @@ public Designator(global::CppSharp.Parser.AST.DesignatedInitExpr.Designator _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29068,12 +29120,12 @@ public FieldDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.FieldDesig public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29178,12 +29230,12 @@ public ArrayOrRangeDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.Arr public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31346,7 +31398,7 @@ public CXXOperatorCallExpr(global::CppSharp.Parser.AST.CXXOperatorCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31523,7 +31575,7 @@ public CXXMemberCallExpr(global::CppSharp.Parser.AST.CXXMemberCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31675,7 +31727,7 @@ public CUDAKernelCallExpr(global::CppSharp.Parser.AST.CUDAKernelCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -32450,7 +32502,7 @@ public UserDefinedLiteral(global::CppSharp.Parser.AST.UserDefinedLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -33366,7 +33418,7 @@ public CXXUuidofExpr(global::CppSharp.Parser.AST.CXXUuidofExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34172,7 +34224,7 @@ public CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34714,7 +34766,7 @@ public CXXTemporaryObjectExpr(global::CppSharp.Parser.AST.CXXTemporaryObjectExpr partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34850,7 +34902,7 @@ public LambdaExpr(global::CppSharp.Parser.AST.LambdaExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -35256,7 +35308,7 @@ public CXXNewExpr(global::CppSharp.Parser.AST.CXXNewExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -36398,12 +36450,12 @@ public FindResult(global::CppSharp.Parser.AST.OverloadExpr.FindResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -37155,7 +37207,7 @@ public CXXUnresolvedConstructExpr(global::CppSharp.Parser.AST.CXXUnresolvedConst partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -38663,12 +38715,12 @@ public ExtraState(global::CppSharp.Parser.AST.MaterializeTemporaryExpr.ExtraStat public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -39755,12 +39807,12 @@ public ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -40641,12 +40693,12 @@ public CppParserOptions(global::CppSharp.Parser.CppParserOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41182,12 +41234,12 @@ public CppLinkerOptions(global::CppSharp.Parser.CppLinkerOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41381,12 +41433,12 @@ public ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41595,12 +41647,12 @@ public ParserResult(global::CppSharp.Parser.ParserResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41806,12 +41858,12 @@ public ClangParser(global::CppSharp.Parser.ClangParser _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs index c7e2920ad..f6c861347 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs @@ -16,6 +16,7 @@ [assembly:InternalsVisibleTo("CppSharp.CppParser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace Std { @@ -147,12 +148,12 @@ public Allocator() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -280,12 +281,12 @@ protected CharTraits(void* native, bool skipVTables = false) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -485,12 +486,12 @@ public BasicString() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs index 076c7153e..80f6d22dd 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs @@ -14,6 +14,7 @@ [assembly:InternalsVisibleTo("CppSharp.Parser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace CppSharp { @@ -187,12 +188,12 @@ public NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -378,12 +379,12 @@ public Comment(global::CppSharp.Parser.AST.Comment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -602,7 +603,7 @@ public FullComment(global::CppSharp.Parser.AST.FullComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -850,7 +851,7 @@ public ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1043,12 +1044,12 @@ public Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1151,7 +1152,7 @@ public BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1323,7 +1324,7 @@ public ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1462,7 +1463,7 @@ public TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1589,7 +1590,7 @@ public VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineCom partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1716,7 +1717,7 @@ public VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1847,7 +1848,7 @@ public VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2018,12 +2019,12 @@ public Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2117,7 +2118,7 @@ public InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2416,12 +2417,12 @@ public Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2529,7 +2530,7 @@ public HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2673,7 +2674,7 @@ public HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2786,7 +2787,7 @@ public TextComment(global::CppSharp.Parser.AST.TextComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2918,12 +2919,12 @@ public RawComment(global::CppSharp.Parser.AST.RawComment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3017,7 +3018,7 @@ public partial struct __Internal } private SourceLocation.__Internal __instance; - internal SourceLocation.__Internal __Instance => __instance; + internal ref SourceLocation.__Internal __Instance => ref __instance; internal static SourceLocation __CreateInstance(__IntPtr native, bool skipVTables = false) { @@ -3040,6 +3041,14 @@ private SourceLocation(void* native, bool skipVTables = false) : this() __instance = *(global::CppSharp.Parser.SourceLocation.__Internal*) native; } + public SourceLocation() + { + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } + } + public SourceLocation(uint ID) : this() { @@ -3175,12 +3184,12 @@ public SourceRange() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3402,12 +3411,12 @@ public Type(global::CppSharp.Parser.AST.Type _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3543,12 +3552,12 @@ public TypeQualifiers() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3695,12 +3704,12 @@ public QualifiedType(global::CppSharp.Parser.AST.QualifiedType _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4082,7 +4091,7 @@ public FunctionType(global::CppSharp.Parser.AST.FunctionType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4826,12 +4835,12 @@ public TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4997,7 +5006,7 @@ public TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializa partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5167,7 +5176,7 @@ public DependentTemplateSpecializationType(global::CppSharp.Parser.AST.Dependent partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5313,7 +5322,7 @@ public TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5688,7 +5697,7 @@ public DependentNameType(global::CppSharp.Parser.AST.DependentNameType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -6574,12 +6583,12 @@ public Declaration(global::CppSharp.Parser.AST.Declaration _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7147,7 +7156,7 @@ public DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7554,7 +7563,7 @@ public TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7693,7 +7702,7 @@ public TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7813,7 +7822,7 @@ public TypeAlias(global::CppSharp.Parser.AST.TypeAlias _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7946,7 +7955,7 @@ public Friend(global::CppSharp.Parser.AST.Friend _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8082,12 +8091,12 @@ public StatementObsolete(global::CppSharp.Parser.AST.StatementObsolete _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8232,7 +8241,7 @@ public ExpressionObsolete(global::CppSharp.Parser.AST.ExpressionObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8344,7 +8353,7 @@ public BinaryOperatorObsolete(global::CppSharp.Parser.AST.BinaryOperatorObsolete partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8503,7 +8512,7 @@ public CallExprObsolete(global::CppSharp.Parser.AST.CallExprObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8650,7 +8659,7 @@ public CXXConstructExprObsolete(global::CppSharp.Parser.AST.CXXConstructExprObso partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8804,7 +8813,7 @@ public Parameter(global::CppSharp.Parser.AST.Parameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9047,7 +9056,7 @@ public Function(global::CppSharp.Parser.AST.Function _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9507,7 +9516,7 @@ public Method(global::CppSharp.Parser.AST.Method _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9878,7 +9887,7 @@ public Item(global::CppSharp.Parser.AST.Enumeration.Item _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9985,7 +9994,7 @@ public Enumeration(global::CppSharp.Parser.AST.Enumeration _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10189,7 +10198,7 @@ public Variable(global::CppSharp.Parser.AST.Variable _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10357,12 +10366,12 @@ public BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10535,7 +10544,7 @@ public Field(global::CppSharp.Parser.AST.Field _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10708,7 +10717,7 @@ public AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10819,12 +10828,12 @@ public VTableComponent(global::CppSharp.Parser.AST.VTableComponent _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10989,12 +10998,12 @@ public VTableLayout(global::CppSharp.Parser.AST.VTableLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11141,12 +11150,12 @@ public VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11318,12 +11327,12 @@ public LayoutField(global::CppSharp.Parser.AST.LayoutField other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11494,12 +11503,12 @@ public LayoutBase(global::CppSharp.Parser.AST.LayoutBase other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11687,12 +11696,12 @@ public ClassLayout(global::CppSharp.Parser.AST.ClassLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12084,7 +12093,7 @@ public Class(global::CppSharp.Parser.AST.Class _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12505,7 +12514,7 @@ public Template(global::CppSharp.Parser.AST.Template _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12674,7 +12683,7 @@ public TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12795,7 +12804,7 @@ public TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12962,7 +12971,7 @@ public TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplatePar partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13123,7 +13132,7 @@ public TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13265,7 +13274,7 @@ public NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParam partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13486,7 +13495,7 @@ public ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13698,7 +13707,7 @@ public ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpec partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13770,7 +13779,7 @@ public uint ArgumentsCount public unsafe partial class ClassTemplatePartialSpecialization : global::CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable { - [StructLayout(LayoutKind.Sequential, Size = 360)] + [StructLayout(LayoutKind.Sequential, Size = 372)] public new partial struct __Internal { internal global::CppSharp.Parser.AST.DeclarationKind kind; @@ -13825,6 +13834,7 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar internal __IntPtr templatedDecl; internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments; internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind; + internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters; [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "??0ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAE@XZ", CallingConvention = __CallingConvention.ThisCall)] internal static extern __IntPtr ctor(__IntPtr __instance); @@ -13834,6 +13844,18 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "??1ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAE@XZ", CallingConvention = __CallingConvention.ThisCall)] internal static extern void dtor(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?getParameters@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAEPAVDeclaration@234@I@Z", CallingConvention = __CallingConvention.ThisCall)] + internal static extern __IntPtr GetParameters(__IntPtr __instance, uint i); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?addParameters@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAEXAAPAVDeclaration@234@@Z", CallingConvention = __CallingConvention.ThisCall)] + internal static extern void AddParameters(__IntPtr __instance, __IntPtr s); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?clearParameters@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAEXXZ", CallingConvention = __CallingConvention.ThisCall)] + internal static extern void ClearParameters(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?getParametersCount@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QAEIXZ", CallingConvention = __CallingConvention.ThisCall)] + internal static extern uint GetParametersCount(__IntPtr __instance); } internal static new ClassTemplatePartialSpecialization __CreateInstance(__IntPtr native, bool skipVTables = false) @@ -13902,7 +13924,7 @@ public ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTempl partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13914,6 +13936,36 @@ internal protected override void Dispose(bool disposing, bool callNativeDtor ) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; } + + public global::CppSharp.Parser.AST.Declaration GetParameters(uint i) + { + var ___ret = __Internal.GetParameters(__Instance, i); + var __result0 = global::CppSharp.Parser.AST.Declaration.__GetOrCreateInstance(___ret, false); + return __result0; + } + + public void AddParameters(global::CppSharp.Parser.AST.Declaration s) + { + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&)."); + var ____arg0 = s.__Instance; + var __arg0 = new __IntPtr(&____arg0); + __Internal.AddParameters(__Instance, __arg0); + } + + public void ClearParameters() + { + __Internal.ClearParameters(__Instance); + } + + public uint ParametersCount + { + get + { + var ___ret = __Internal.GetParametersCount(__Instance); + return ___ret; + } + } } public unsafe partial class FunctionTemplate : global::CppSharp.Parser.AST.Template, IDisposable @@ -14038,7 +14090,7 @@ public FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14209,12 +14261,12 @@ public FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTempla public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14423,7 +14475,7 @@ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14612,7 +14664,7 @@ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpeciali partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14793,7 +14845,7 @@ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplateP partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14911,7 +14963,7 @@ public UnresolvedUsingTypename(global::CppSharp.Parser.AST.UnresolvedUsingTypena partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15042,7 +15094,7 @@ public Namespace(global::CppSharp.Parser.AST.Namespace _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15166,12 +15218,12 @@ public PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15311,7 +15363,7 @@ public MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15467,7 +15519,7 @@ public MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15655,7 +15707,7 @@ public TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15842,12 +15894,12 @@ public ASTContext(global::CppSharp.Parser.AST.ASTContext _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16150,12 +16202,12 @@ public Stmt(global::CppSharp.Parser.AST.Stmt _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16327,7 +16379,7 @@ public DeclStmt(global::CppSharp.Parser.AST.DeclStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16610,7 +16662,7 @@ public CompoundStmt(global::CppSharp.Parser.AST.CompoundStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -18968,7 +19020,7 @@ public AsmStmt(global::CppSharp.Parser.AST.AsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19279,12 +19331,12 @@ public AsmStringPiece(global::CppSharp.Parser.AST.GCCAsmStmt.AsmStringPiece _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19430,7 +19482,7 @@ public GCCAsmStmt(global::CppSharp.Parser.AST.GCCAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19556,7 +19608,7 @@ public MSAsmStmt(global::CppSharp.Parser.AST.MSAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20257,12 +20309,12 @@ public Capture(global::CppSharp.Parser.AST.CapturedStmt.Capture _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20418,7 +20470,7 @@ public CapturedStmt(global::CppSharp.Parser.AST.CapturedStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -21281,12 +21333,12 @@ public CtorArgs(global::CppSharp.Parser.AST.CoroutineBodyStmt.CtorArgs _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -22109,12 +22161,12 @@ public Classification(global::CppSharp.Parser.AST.Expr.Classification _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -23864,7 +23916,7 @@ public StringLiteral(global::CppSharp.Parser.AST.StringLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -25237,7 +25289,7 @@ public CallExpr(global::CppSharp.Parser.AST.CallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26543,7 +26595,7 @@ public BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26933,7 +26985,7 @@ public CompoundAssignOperator(global::CppSharp.Parser.AST.CompoundAssignOperator partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -28817,12 +28869,12 @@ public Designator(global::CppSharp.Parser.AST.DesignatedInitExpr.Designator _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29073,12 +29125,12 @@ public FieldDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.FieldDesig public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29183,12 +29235,12 @@ public ArrayOrRangeDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.Arr public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31351,7 +31403,7 @@ public CXXOperatorCallExpr(global::CppSharp.Parser.AST.CXXOperatorCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31528,7 +31580,7 @@ public CXXMemberCallExpr(global::CppSharp.Parser.AST.CXXMemberCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31680,7 +31732,7 @@ public CUDAKernelCallExpr(global::CppSharp.Parser.AST.CUDAKernelCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -32455,7 +32507,7 @@ public UserDefinedLiteral(global::CppSharp.Parser.AST.UserDefinedLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -33373,7 +33425,7 @@ public CXXUuidofExpr(global::CppSharp.Parser.AST.CXXUuidofExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34179,7 +34231,7 @@ public CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34722,7 +34774,7 @@ public CXXTemporaryObjectExpr(global::CppSharp.Parser.AST.CXXTemporaryObjectExpr partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34858,7 +34910,7 @@ public LambdaExpr(global::CppSharp.Parser.AST.LambdaExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -35264,7 +35316,7 @@ public CXXNewExpr(global::CppSharp.Parser.AST.CXXNewExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -36408,12 +36460,12 @@ public FindResult(global::CppSharp.Parser.AST.OverloadExpr.FindResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -37165,7 +37217,7 @@ public CXXUnresolvedConstructExpr(global::CppSharp.Parser.AST.CXXUnresolvedConst partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -38674,12 +38726,12 @@ public ExtraState(global::CppSharp.Parser.AST.MaterializeTemporaryExpr.ExtraStat public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -39766,12 +39818,12 @@ public ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -40652,12 +40704,12 @@ public CppParserOptions(global::CppSharp.Parser.CppParserOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41193,12 +41245,12 @@ public CppLinkerOptions(global::CppSharp.Parser.CppLinkerOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41392,12 +41444,12 @@ public ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41606,12 +41658,12 @@ public ParserResult(global::CppSharp.Parser.ParserResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41817,12 +41869,12 @@ public ClangParser(global::CppSharp.Parser.ClangParser _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs index 7ebca0dad..e44bd1f9e 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs @@ -16,6 +16,7 @@ [assembly:InternalsVisibleTo("CppSharp.CppParser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace Std { @@ -160,17 +161,26 @@ public Allocator() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; NativeToManagedMap.TryRemove(__Instance, out _); DisposePartial(disposing); + if (callNativeDtor) + { + var ___Ty = typeof(_Ty); + if (___Ty.IsAssignableFrom(typeof(sbyte))) + { + return; + } + throw new ArgumentOutOfRangeException("_Ty", string.Join(", ", new[] { typeof(_Ty).FullName }), "global::Std.Allocator<_Ty> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: ."); + } if (__ownsNativeInstance) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; @@ -299,12 +309,12 @@ public BasicString() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -431,12 +441,12 @@ protected CharTraits(void* native, bool skipVTables = false) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs index 0aee6b458..5f7e6c23c 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs @@ -14,6 +14,7 @@ [assembly:InternalsVisibleTo("CppSharp.Parser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace CppSharp { @@ -187,12 +188,12 @@ public NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -378,12 +379,12 @@ public Comment(global::CppSharp.Parser.AST.Comment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -602,7 +603,7 @@ public FullComment(global::CppSharp.Parser.AST.FullComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -850,7 +851,7 @@ public ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1043,12 +1044,12 @@ public Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1151,7 +1152,7 @@ public BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1323,7 +1324,7 @@ public ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1462,7 +1463,7 @@ public TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1589,7 +1590,7 @@ public VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineCom partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1716,7 +1717,7 @@ public VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1847,7 +1848,7 @@ public VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2018,12 +2019,12 @@ public Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2117,7 +2118,7 @@ public InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2416,12 +2417,12 @@ public Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2529,7 +2530,7 @@ public HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2673,7 +2674,7 @@ public HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2786,7 +2787,7 @@ public TextComment(global::CppSharp.Parser.AST.TextComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2918,12 +2919,12 @@ public RawComment(global::CppSharp.Parser.AST.RawComment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3017,7 +3018,7 @@ public partial struct __Internal } private SourceLocation.__Internal __instance; - internal SourceLocation.__Internal __Instance => __instance; + internal ref SourceLocation.__Internal __Instance => ref __instance; internal static SourceLocation __CreateInstance(__IntPtr native, bool skipVTables = false) { @@ -3040,6 +3041,14 @@ private SourceLocation(void* native, bool skipVTables = false) : this() __instance = *(global::CppSharp.Parser.SourceLocation.__Internal*) native; } + public SourceLocation() + { + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } + } + public SourceLocation(uint ID) : this() { @@ -3175,12 +3184,12 @@ public SourceRange() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3402,12 +3411,12 @@ public Type(global::CppSharp.Parser.AST.Type _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3543,12 +3552,12 @@ public TypeQualifiers() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3695,12 +3704,12 @@ public QualifiedType(global::CppSharp.Parser.AST.QualifiedType _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4082,7 +4091,7 @@ public FunctionType(global::CppSharp.Parser.AST.FunctionType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4826,12 +4835,12 @@ public TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4997,7 +5006,7 @@ public TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializa partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5167,7 +5176,7 @@ public DependentTemplateSpecializationType(global::CppSharp.Parser.AST.Dependent partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5313,7 +5322,7 @@ public TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5688,7 +5697,7 @@ public DependentNameType(global::CppSharp.Parser.AST.DependentNameType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -6574,12 +6583,12 @@ public Declaration(global::CppSharp.Parser.AST.Declaration _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7147,7 +7156,7 @@ public DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7554,7 +7563,7 @@ public TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7693,7 +7702,7 @@ public TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7813,7 +7822,7 @@ public TypeAlias(global::CppSharp.Parser.AST.TypeAlias _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7946,7 +7955,7 @@ public Friend(global::CppSharp.Parser.AST.Friend _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8082,12 +8091,12 @@ public StatementObsolete(global::CppSharp.Parser.AST.StatementObsolete _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8232,7 +8241,7 @@ public ExpressionObsolete(global::CppSharp.Parser.AST.ExpressionObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8344,7 +8353,7 @@ public BinaryOperatorObsolete(global::CppSharp.Parser.AST.BinaryOperatorObsolete partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8503,7 +8512,7 @@ public CallExprObsolete(global::CppSharp.Parser.AST.CallExprObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8650,7 +8659,7 @@ public CXXConstructExprObsolete(global::CppSharp.Parser.AST.CXXConstructExprObso partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8804,7 +8813,7 @@ public Parameter(global::CppSharp.Parser.AST.Parameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9047,7 +9056,7 @@ public Function(global::CppSharp.Parser.AST.Function _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9507,7 +9516,7 @@ public Method(global::CppSharp.Parser.AST.Method _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9878,7 +9887,7 @@ public Item(global::CppSharp.Parser.AST.Enumeration.Item _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9985,7 +9994,7 @@ public Enumeration(global::CppSharp.Parser.AST.Enumeration _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10189,7 +10198,7 @@ public Variable(global::CppSharp.Parser.AST.Variable _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10357,12 +10366,12 @@ public BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10535,7 +10544,7 @@ public Field(global::CppSharp.Parser.AST.Field _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10708,7 +10717,7 @@ public AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10819,12 +10828,12 @@ public VTableComponent(global::CppSharp.Parser.AST.VTableComponent _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10989,12 +10998,12 @@ public VTableLayout(global::CppSharp.Parser.AST.VTableLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11140,12 +11149,12 @@ public VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11317,12 +11326,12 @@ public LayoutField(global::CppSharp.Parser.AST.LayoutField other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11493,12 +11502,12 @@ public LayoutBase(global::CppSharp.Parser.AST.LayoutBase other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11686,12 +11695,12 @@ public ClassLayout(global::CppSharp.Parser.AST.ClassLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12083,7 +12092,7 @@ public Class(global::CppSharp.Parser.AST.Class _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12504,7 +12513,7 @@ public Template(global::CppSharp.Parser.AST.Template _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12673,7 +12682,7 @@ public TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12794,7 +12803,7 @@ public TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12961,7 +12970,7 @@ public TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplatePar partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13122,7 +13131,7 @@ public TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13264,7 +13273,7 @@ public NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParam partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13485,7 +13494,7 @@ public ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13697,7 +13706,7 @@ public ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpec partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13769,7 +13778,7 @@ public uint ArgumentsCount public unsafe partial class ClassTemplatePartialSpecialization : global::CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable { - [StructLayout(LayoutKind.Sequential, Size = 608)] + [StructLayout(LayoutKind.Sequential, Size = 632)] public new partial struct __Internal { internal global::CppSharp.Parser.AST.DeclarationKind kind; @@ -13824,6 +13833,7 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar internal __IntPtr templatedDecl; internal global::Std.Vector.__Internalc__N_std_N___1_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_N___1_S_allocator__S0_ Arguments; internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind; + internal global::Std.Vector.__Internalc__N_std_N___1_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_N___1_S_allocator__S0_ Parameters; [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationC2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void ctor(__IntPtr __instance); @@ -13833,6 +13843,18 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationD2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void dtor(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13getParametersEj", CallingConvention = __CallingConvention.Cdecl)] + internal static extern __IntPtr GetParameters(__IntPtr __instance, uint i); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13addParametersERPNS1_11DeclarationE", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void AddParameters(__IntPtr __instance, __IntPtr s); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization15clearParametersEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void ClearParameters(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization18getParametersCountEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern uint GetParametersCount(__IntPtr __instance); } internal static new ClassTemplatePartialSpecialization __CreateInstance(__IntPtr native, bool skipVTables = false) @@ -13901,7 +13923,7 @@ public ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTempl partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13913,6 +13935,36 @@ internal protected override void Dispose(bool disposing, bool callNativeDtor ) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; } + + public global::CppSharp.Parser.AST.Declaration GetParameters(uint i) + { + var ___ret = __Internal.GetParameters(__Instance, i); + var __result0 = global::CppSharp.Parser.AST.Declaration.__GetOrCreateInstance(___ret, false); + return __result0; + } + + public void AddParameters(global::CppSharp.Parser.AST.Declaration s) + { + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&)."); + var ____arg0 = s.__Instance; + var __arg0 = new __IntPtr(&____arg0); + __Internal.AddParameters(__Instance, __arg0); + } + + public void ClearParameters() + { + __Internal.ClearParameters(__Instance); + } + + public uint ParametersCount + { + get + { + var ___ret = __Internal.GetParametersCount(__Instance); + return ___ret; + } + } } public unsafe partial class FunctionTemplate : global::CppSharp.Parser.AST.Template, IDisposable @@ -14037,7 +14089,7 @@ public FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14208,12 +14260,12 @@ public FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTempla public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14422,7 +14474,7 @@ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14611,7 +14663,7 @@ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpeciali partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14792,7 +14844,7 @@ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplateP partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14910,7 +14962,7 @@ public UnresolvedUsingTypename(global::CppSharp.Parser.AST.UnresolvedUsingTypena partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15040,7 +15092,7 @@ public Namespace(global::CppSharp.Parser.AST.Namespace _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15164,12 +15216,12 @@ public PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15309,7 +15361,7 @@ public MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15465,7 +15517,7 @@ public MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15652,7 +15704,7 @@ public TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15839,12 +15891,12 @@ public ASTContext(global::CppSharp.Parser.AST.ASTContext _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16147,12 +16199,12 @@ public Stmt(global::CppSharp.Parser.AST.Stmt _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16324,7 +16376,7 @@ public DeclStmt(global::CppSharp.Parser.AST.DeclStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16607,7 +16659,7 @@ public CompoundStmt(global::CppSharp.Parser.AST.CompoundStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -18965,7 +19017,7 @@ public AsmStmt(global::CppSharp.Parser.AST.AsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19276,12 +19328,12 @@ public AsmStringPiece(global::CppSharp.Parser.AST.GCCAsmStmt.AsmStringPiece _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19427,7 +19479,7 @@ public GCCAsmStmt(global::CppSharp.Parser.AST.GCCAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19553,7 +19605,7 @@ public MSAsmStmt(global::CppSharp.Parser.AST.MSAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20254,12 +20306,12 @@ public Capture(global::CppSharp.Parser.AST.CapturedStmt.Capture _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20415,7 +20467,7 @@ public CapturedStmt(global::CppSharp.Parser.AST.CapturedStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -21278,12 +21330,12 @@ public CtorArgs(global::CppSharp.Parser.AST.CoroutineBodyStmt.CtorArgs _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -22106,12 +22158,12 @@ public Classification(global::CppSharp.Parser.AST.Expr.Classification _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -23859,7 +23911,7 @@ public StringLiteral(global::CppSharp.Parser.AST.StringLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -25232,7 +25284,7 @@ public CallExpr(global::CppSharp.Parser.AST.CallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26538,7 +26590,7 @@ public BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26928,7 +26980,7 @@ public CompoundAssignOperator(global::CppSharp.Parser.AST.CompoundAssignOperator partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -28811,12 +28863,12 @@ public Designator(global::CppSharp.Parser.AST.DesignatedInitExpr.Designator _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29067,12 +29119,12 @@ public FieldDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.FieldDesig public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29177,12 +29229,12 @@ public ArrayOrRangeDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.Arr public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31345,7 +31397,7 @@ public CXXOperatorCallExpr(global::CppSharp.Parser.AST.CXXOperatorCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31522,7 +31574,7 @@ public CXXMemberCallExpr(global::CppSharp.Parser.AST.CXXMemberCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31674,7 +31726,7 @@ public CUDAKernelCallExpr(global::CppSharp.Parser.AST.CUDAKernelCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -32449,7 +32501,7 @@ public UserDefinedLiteral(global::CppSharp.Parser.AST.UserDefinedLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -33365,7 +33417,7 @@ public CXXUuidofExpr(global::CppSharp.Parser.AST.CXXUuidofExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34171,7 +34223,7 @@ public CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34713,7 +34765,7 @@ public CXXTemporaryObjectExpr(global::CppSharp.Parser.AST.CXXTemporaryObjectExpr partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34849,7 +34901,7 @@ public LambdaExpr(global::CppSharp.Parser.AST.LambdaExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -35255,7 +35307,7 @@ public CXXNewExpr(global::CppSharp.Parser.AST.CXXNewExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -36397,12 +36449,12 @@ public FindResult(global::CppSharp.Parser.AST.OverloadExpr.FindResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -37154,7 +37206,7 @@ public CXXUnresolvedConstructExpr(global::CppSharp.Parser.AST.CXXUnresolvedConst partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -38662,12 +38714,12 @@ public ExtraState(global::CppSharp.Parser.AST.MaterializeTemporaryExpr.ExtraStat public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -39754,12 +39806,12 @@ public ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -40640,12 +40692,12 @@ public CppParserOptions(global::CppSharp.Parser.CppParserOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41181,12 +41233,12 @@ public CppLinkerOptions(global::CppSharp.Parser.CppLinkerOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41380,12 +41432,12 @@ public ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41594,12 +41646,12 @@ public ParserResult(global::CppSharp.Parser.ParserResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41805,12 +41857,12 @@ public ClangParser(global::CppSharp.Parser.ClangParser _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs index 086462296..3f7910977 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs @@ -16,6 +16,7 @@ [assembly:InternalsVisibleTo("CppSharp.CppParser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace Std { @@ -147,12 +148,12 @@ public Allocator() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -280,12 +281,12 @@ protected CharTraits(void* native, bool skipVTables = false) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -485,12 +486,12 @@ public BasicString() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs index 5c0c7a9d4..c4efef79d 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs @@ -14,6 +14,7 @@ [assembly:InternalsVisibleTo("CppSharp.Parser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace CppSharp { @@ -187,12 +188,12 @@ public NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -378,12 +379,12 @@ public Comment(global::CppSharp.Parser.AST.Comment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -602,7 +603,7 @@ public FullComment(global::CppSharp.Parser.AST.FullComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -850,7 +851,7 @@ public ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1043,12 +1044,12 @@ public Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1151,7 +1152,7 @@ public BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1323,7 +1324,7 @@ public ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1462,7 +1463,7 @@ public TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1589,7 +1590,7 @@ public VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineCom partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1716,7 +1717,7 @@ public VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1847,7 +1848,7 @@ public VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2018,12 +2019,12 @@ public Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2117,7 +2118,7 @@ public InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2416,12 +2417,12 @@ public Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2529,7 +2530,7 @@ public HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2673,7 +2674,7 @@ public HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2786,7 +2787,7 @@ public TextComment(global::CppSharp.Parser.AST.TextComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2918,12 +2919,12 @@ public RawComment(global::CppSharp.Parser.AST.RawComment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3017,7 +3018,7 @@ public partial struct __Internal } private SourceLocation.__Internal __instance; - internal SourceLocation.__Internal __Instance => __instance; + internal ref SourceLocation.__Internal __Instance => ref __instance; internal static SourceLocation __CreateInstance(__IntPtr native, bool skipVTables = false) { @@ -3040,6 +3041,14 @@ private SourceLocation(void* native, bool skipVTables = false) : this() __instance = *(global::CppSharp.Parser.SourceLocation.__Internal*) native; } + public SourceLocation() + { + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } + } + public SourceLocation(uint ID) : this() { @@ -3175,12 +3184,12 @@ public SourceRange() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3402,12 +3411,12 @@ public Type(global::CppSharp.Parser.AST.Type _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3543,12 +3552,12 @@ public TypeQualifiers() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3695,12 +3704,12 @@ public QualifiedType(global::CppSharp.Parser.AST.QualifiedType _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4082,7 +4091,7 @@ public FunctionType(global::CppSharp.Parser.AST.FunctionType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4826,12 +4835,12 @@ public TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4997,7 +5006,7 @@ public TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializa partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5167,7 +5176,7 @@ public DependentTemplateSpecializationType(global::CppSharp.Parser.AST.Dependent partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5313,7 +5322,7 @@ public TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5688,7 +5697,7 @@ public DependentNameType(global::CppSharp.Parser.AST.DependentNameType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -6574,12 +6583,12 @@ public Declaration(global::CppSharp.Parser.AST.Declaration _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7147,7 +7156,7 @@ public DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7554,7 +7563,7 @@ public TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7693,7 +7702,7 @@ public TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7813,7 +7822,7 @@ public TypeAlias(global::CppSharp.Parser.AST.TypeAlias _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7946,7 +7955,7 @@ public Friend(global::CppSharp.Parser.AST.Friend _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8082,12 +8091,12 @@ public StatementObsolete(global::CppSharp.Parser.AST.StatementObsolete _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8232,7 +8241,7 @@ public ExpressionObsolete(global::CppSharp.Parser.AST.ExpressionObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8344,7 +8353,7 @@ public BinaryOperatorObsolete(global::CppSharp.Parser.AST.BinaryOperatorObsolete partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8503,7 +8512,7 @@ public CallExprObsolete(global::CppSharp.Parser.AST.CallExprObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8650,7 +8659,7 @@ public CXXConstructExprObsolete(global::CppSharp.Parser.AST.CXXConstructExprObso partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8804,7 +8813,7 @@ public Parameter(global::CppSharp.Parser.AST.Parameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9047,7 +9056,7 @@ public Function(global::CppSharp.Parser.AST.Function _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9507,7 +9516,7 @@ public Method(global::CppSharp.Parser.AST.Method _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9878,7 +9887,7 @@ public Item(global::CppSharp.Parser.AST.Enumeration.Item _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9985,7 +9994,7 @@ public Enumeration(global::CppSharp.Parser.AST.Enumeration _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10189,7 +10198,7 @@ public Variable(global::CppSharp.Parser.AST.Variable _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10357,12 +10366,12 @@ public BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10535,7 +10544,7 @@ public Field(global::CppSharp.Parser.AST.Field _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10708,7 +10717,7 @@ public AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10819,12 +10828,12 @@ public VTableComponent(global::CppSharp.Parser.AST.VTableComponent _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10989,12 +10998,12 @@ public VTableLayout(global::CppSharp.Parser.AST.VTableLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11140,12 +11149,12 @@ public VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11317,12 +11326,12 @@ public LayoutField(global::CppSharp.Parser.AST.LayoutField other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11493,12 +11502,12 @@ public LayoutBase(global::CppSharp.Parser.AST.LayoutBase other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11686,12 +11695,12 @@ public ClassLayout(global::CppSharp.Parser.AST.ClassLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12083,7 +12092,7 @@ public Class(global::CppSharp.Parser.AST.Class _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12504,7 +12513,7 @@ public Template(global::CppSharp.Parser.AST.Template _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12673,7 +12682,7 @@ public TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12794,7 +12803,7 @@ public TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12961,7 +12970,7 @@ public TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplatePar partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13122,7 +13131,7 @@ public TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13264,7 +13273,7 @@ public NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParam partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13485,7 +13494,7 @@ public ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13697,7 +13706,7 @@ public ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpec partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13769,7 +13778,7 @@ public uint ArgumentsCount public unsafe partial class ClassTemplatePartialSpecialization : global::CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable { - [StructLayout(LayoutKind.Sequential, Size = 656)] + [StructLayout(LayoutKind.Sequential, Size = 680)] public new partial struct __Internal { internal global::CppSharp.Parser.AST.DeclarationKind kind; @@ -13824,6 +13833,7 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar internal __IntPtr templatedDecl; internal global::Std.Vector.__Internal Arguments; internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind; + internal global::Std.Vector.__Internal Parameters; [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationC2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void ctor(__IntPtr __instance); @@ -13833,6 +13843,18 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationD2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void dtor(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13getParametersEj", CallingConvention = __CallingConvention.Cdecl)] + internal static extern __IntPtr GetParameters(__IntPtr __instance, uint i); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13addParametersERPNS1_11DeclarationE", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void AddParameters(__IntPtr __instance, __IntPtr s); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization15clearParametersEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void ClearParameters(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization18getParametersCountEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern uint GetParametersCount(__IntPtr __instance); } internal static new ClassTemplatePartialSpecialization __CreateInstance(__IntPtr native, bool skipVTables = false) @@ -13901,7 +13923,7 @@ public ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTempl partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13913,6 +13935,36 @@ internal protected override void Dispose(bool disposing, bool callNativeDtor ) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; } + + public global::CppSharp.Parser.AST.Declaration GetParameters(uint i) + { + var ___ret = __Internal.GetParameters(__Instance, i); + var __result0 = global::CppSharp.Parser.AST.Declaration.__GetOrCreateInstance(___ret, false); + return __result0; + } + + public void AddParameters(global::CppSharp.Parser.AST.Declaration s) + { + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&)."); + var ____arg0 = s.__Instance; + var __arg0 = new __IntPtr(&____arg0); + __Internal.AddParameters(__Instance, __arg0); + } + + public void ClearParameters() + { + __Internal.ClearParameters(__Instance); + } + + public uint ParametersCount + { + get + { + var ___ret = __Internal.GetParametersCount(__Instance); + return ___ret; + } + } } public unsafe partial class FunctionTemplate : global::CppSharp.Parser.AST.Template, IDisposable @@ -14037,7 +14089,7 @@ public FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14208,12 +14260,12 @@ public FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTempla public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14422,7 +14474,7 @@ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14611,7 +14663,7 @@ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpeciali partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14792,7 +14844,7 @@ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplateP partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14910,7 +14962,7 @@ public UnresolvedUsingTypename(global::CppSharp.Parser.AST.UnresolvedUsingTypena partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15040,7 +15092,7 @@ public Namespace(global::CppSharp.Parser.AST.Namespace _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15164,12 +15216,12 @@ public PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15309,7 +15361,7 @@ public MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15465,7 +15517,7 @@ public MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15652,7 +15704,7 @@ public TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15839,12 +15891,12 @@ public ASTContext(global::CppSharp.Parser.AST.ASTContext _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16147,12 +16199,12 @@ public Stmt(global::CppSharp.Parser.AST.Stmt _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16324,7 +16376,7 @@ public DeclStmt(global::CppSharp.Parser.AST.DeclStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16607,7 +16659,7 @@ public CompoundStmt(global::CppSharp.Parser.AST.CompoundStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -18965,7 +19017,7 @@ public AsmStmt(global::CppSharp.Parser.AST.AsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19276,12 +19328,12 @@ public AsmStringPiece(global::CppSharp.Parser.AST.GCCAsmStmt.AsmStringPiece _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19427,7 +19479,7 @@ public GCCAsmStmt(global::CppSharp.Parser.AST.GCCAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19553,7 +19605,7 @@ public MSAsmStmt(global::CppSharp.Parser.AST.MSAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20254,12 +20306,12 @@ public Capture(global::CppSharp.Parser.AST.CapturedStmt.Capture _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20415,7 +20467,7 @@ public CapturedStmt(global::CppSharp.Parser.AST.CapturedStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -21278,12 +21330,12 @@ public CtorArgs(global::CppSharp.Parser.AST.CoroutineBodyStmt.CtorArgs _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -22106,12 +22158,12 @@ public Classification(global::CppSharp.Parser.AST.Expr.Classification _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -23859,7 +23911,7 @@ public StringLiteral(global::CppSharp.Parser.AST.StringLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -25232,7 +25284,7 @@ public CallExpr(global::CppSharp.Parser.AST.CallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26538,7 +26590,7 @@ public BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26928,7 +26980,7 @@ public CompoundAssignOperator(global::CppSharp.Parser.AST.CompoundAssignOperator partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -28811,12 +28863,12 @@ public Designator(global::CppSharp.Parser.AST.DesignatedInitExpr.Designator _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29067,12 +29119,12 @@ public FieldDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.FieldDesig public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29177,12 +29229,12 @@ public ArrayOrRangeDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.Arr public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31345,7 +31397,7 @@ public CXXOperatorCallExpr(global::CppSharp.Parser.AST.CXXOperatorCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31522,7 +31574,7 @@ public CXXMemberCallExpr(global::CppSharp.Parser.AST.CXXMemberCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31674,7 +31726,7 @@ public CUDAKernelCallExpr(global::CppSharp.Parser.AST.CUDAKernelCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -32449,7 +32501,7 @@ public UserDefinedLiteral(global::CppSharp.Parser.AST.UserDefinedLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -33365,7 +33417,7 @@ public CXXUuidofExpr(global::CppSharp.Parser.AST.CXXUuidofExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34171,7 +34223,7 @@ public CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34713,7 +34765,7 @@ public CXXTemporaryObjectExpr(global::CppSharp.Parser.AST.CXXTemporaryObjectExpr partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34849,7 +34901,7 @@ public LambdaExpr(global::CppSharp.Parser.AST.LambdaExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -35255,7 +35307,7 @@ public CXXNewExpr(global::CppSharp.Parser.AST.CXXNewExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -36397,12 +36449,12 @@ public FindResult(global::CppSharp.Parser.AST.OverloadExpr.FindResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -37154,7 +37206,7 @@ public CXXUnresolvedConstructExpr(global::CppSharp.Parser.AST.CXXUnresolvedConst partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -38662,12 +38714,12 @@ public ExtraState(global::CppSharp.Parser.AST.MaterializeTemporaryExpr.ExtraStat public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -39754,12 +39806,12 @@ public ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -40640,12 +40692,12 @@ public CppParserOptions(global::CppSharp.Parser.CppParserOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41181,12 +41233,12 @@ public CppLinkerOptions(global::CppSharp.Parser.CppLinkerOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41380,12 +41432,12 @@ public ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41594,12 +41646,12 @@ public ParserResult(global::CppSharp.Parser.ParserResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41805,12 +41857,12 @@ public ClangParser(global::CppSharp.Parser.ClangParser _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs index cdf0bbf78..640bb868c 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs @@ -16,6 +16,7 @@ [assembly:InternalsVisibleTo("CppSharp.CppParser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace Std { @@ -113,12 +114,12 @@ public Allocator() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -305,12 +306,12 @@ protected CharTraits(void* native, bool skipVTables = false) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -457,12 +458,12 @@ public BasicString() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs index 58d27ea06..1aec7530f 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs @@ -14,6 +14,7 @@ [assembly:InternalsVisibleTo("CppSharp.Parser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace CppSharp { @@ -187,12 +188,12 @@ public NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -378,12 +379,12 @@ public Comment(global::CppSharp.Parser.AST.Comment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -602,7 +603,7 @@ public FullComment(global::CppSharp.Parser.AST.FullComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -850,7 +851,7 @@ public ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1043,12 +1044,12 @@ public Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1151,7 +1152,7 @@ public BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1323,7 +1324,7 @@ public ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1462,7 +1463,7 @@ public TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1589,7 +1590,7 @@ public VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineCom partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1716,7 +1717,7 @@ public VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1847,7 +1848,7 @@ public VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2018,12 +2019,12 @@ public Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2117,7 +2118,7 @@ public InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2416,12 +2417,12 @@ public Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2529,7 +2530,7 @@ public HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2673,7 +2674,7 @@ public HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2786,7 +2787,7 @@ public TextComment(global::CppSharp.Parser.AST.TextComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2918,12 +2919,12 @@ public RawComment(global::CppSharp.Parser.AST.RawComment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3017,7 +3018,7 @@ public partial struct __Internal } private SourceLocation.__Internal __instance; - internal SourceLocation.__Internal __Instance => __instance; + internal ref SourceLocation.__Internal __Instance => ref __instance; internal static SourceLocation __CreateInstance(__IntPtr native, bool skipVTables = false) { @@ -3040,6 +3041,14 @@ private SourceLocation(void* native, bool skipVTables = false) : this() __instance = *(global::CppSharp.Parser.SourceLocation.__Internal*) native; } + public SourceLocation() + { + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } + } + public SourceLocation(uint ID) : this() { @@ -3175,12 +3184,12 @@ public SourceRange() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3402,12 +3411,12 @@ public Type(global::CppSharp.Parser.AST.Type _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3543,12 +3552,12 @@ public TypeQualifiers() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3695,12 +3704,12 @@ public QualifiedType(global::CppSharp.Parser.AST.QualifiedType _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4082,7 +4091,7 @@ public FunctionType(global::CppSharp.Parser.AST.FunctionType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4826,12 +4835,12 @@ public TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4997,7 +5006,7 @@ public TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializa partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5167,7 +5176,7 @@ public DependentTemplateSpecializationType(global::CppSharp.Parser.AST.Dependent partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5313,7 +5322,7 @@ public TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5688,7 +5697,7 @@ public DependentNameType(global::CppSharp.Parser.AST.DependentNameType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -6574,12 +6583,12 @@ public Declaration(global::CppSharp.Parser.AST.Declaration _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7147,7 +7156,7 @@ public DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7554,7 +7563,7 @@ public TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7693,7 +7702,7 @@ public TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7813,7 +7822,7 @@ public TypeAlias(global::CppSharp.Parser.AST.TypeAlias _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7946,7 +7955,7 @@ public Friend(global::CppSharp.Parser.AST.Friend _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8082,12 +8091,12 @@ public StatementObsolete(global::CppSharp.Parser.AST.StatementObsolete _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8232,7 +8241,7 @@ public ExpressionObsolete(global::CppSharp.Parser.AST.ExpressionObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8344,7 +8353,7 @@ public BinaryOperatorObsolete(global::CppSharp.Parser.AST.BinaryOperatorObsolete partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8503,7 +8512,7 @@ public CallExprObsolete(global::CppSharp.Parser.AST.CallExprObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8650,7 +8659,7 @@ public CXXConstructExprObsolete(global::CppSharp.Parser.AST.CXXConstructExprObso partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8804,7 +8813,7 @@ public Parameter(global::CppSharp.Parser.AST.Parameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9047,7 +9056,7 @@ public Function(global::CppSharp.Parser.AST.Function _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9507,7 +9516,7 @@ public Method(global::CppSharp.Parser.AST.Method _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9878,7 +9887,7 @@ public Item(global::CppSharp.Parser.AST.Enumeration.Item _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9985,7 +9994,7 @@ public Enumeration(global::CppSharp.Parser.AST.Enumeration _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10189,7 +10198,7 @@ public Variable(global::CppSharp.Parser.AST.Variable _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10357,12 +10366,12 @@ public BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10535,7 +10544,7 @@ public Field(global::CppSharp.Parser.AST.Field _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10708,7 +10717,7 @@ public AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10819,12 +10828,12 @@ public VTableComponent(global::CppSharp.Parser.AST.VTableComponent _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10989,12 +10998,12 @@ public VTableLayout(global::CppSharp.Parser.AST.VTableLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11140,12 +11149,12 @@ public VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11317,12 +11326,12 @@ public LayoutField(global::CppSharp.Parser.AST.LayoutField other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11493,12 +11502,12 @@ public LayoutBase(global::CppSharp.Parser.AST.LayoutBase other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11686,12 +11695,12 @@ public ClassLayout(global::CppSharp.Parser.AST.ClassLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12083,7 +12092,7 @@ public Class(global::CppSharp.Parser.AST.Class _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12504,7 +12513,7 @@ public Template(global::CppSharp.Parser.AST.Template _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12673,7 +12682,7 @@ public TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12794,7 +12803,7 @@ public TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12961,7 +12970,7 @@ public TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplatePar partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13122,7 +13131,7 @@ public TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13264,7 +13273,7 @@ public NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParam partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13485,7 +13494,7 @@ public ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13697,7 +13706,7 @@ public ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpec partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13769,7 +13778,7 @@ public uint ArgumentsCount public unsafe partial class ClassTemplatePartialSpecialization : global::CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable { - [StructLayout(LayoutKind.Sequential, Size = 584)] + [StructLayout(LayoutKind.Sequential, Size = 608)] public new partial struct __Internal { internal global::CppSharp.Parser.AST.DeclarationKind kind; @@ -13824,6 +13833,7 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar internal __IntPtr templatedDecl; internal global::Std.Vector.__Internal Arguments; internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind; + internal global::Std.Vector.__Internal Parameters; [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationC2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void ctor(__IntPtr __instance); @@ -13833,6 +13843,18 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecializationD2Ev", CallingConvention = __CallingConvention.Cdecl)] internal static extern void dtor(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13getParametersEj", CallingConvention = __CallingConvention.Cdecl)] + internal static extern __IntPtr GetParameters(__IntPtr __instance, uint i); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization13addParametersERPNS1_11DeclarationE", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void AddParameters(__IntPtr __instance, __IntPtr s); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization15clearParametersEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void ClearParameters(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser", EntryPoint = "_ZN8CppSharp9CppParser3AST34ClassTemplatePartialSpecialization18getParametersCountEv", CallingConvention = __CallingConvention.Cdecl)] + internal static extern uint GetParametersCount(__IntPtr __instance); } internal static new ClassTemplatePartialSpecialization __CreateInstance(__IntPtr native, bool skipVTables = false) @@ -13901,7 +13923,7 @@ public ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTempl partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13913,6 +13935,36 @@ internal protected override void Dispose(bool disposing, bool callNativeDtor ) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; } + + public global::CppSharp.Parser.AST.Declaration GetParameters(uint i) + { + var ___ret = __Internal.GetParameters(__Instance, i); + var __result0 = global::CppSharp.Parser.AST.Declaration.__GetOrCreateInstance(___ret, false); + return __result0; + } + + public void AddParameters(global::CppSharp.Parser.AST.Declaration s) + { + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&)."); + var ____arg0 = s.__Instance; + var __arg0 = new __IntPtr(&____arg0); + __Internal.AddParameters(__Instance, __arg0); + } + + public void ClearParameters() + { + __Internal.ClearParameters(__Instance); + } + + public uint ParametersCount + { + get + { + var ___ret = __Internal.GetParametersCount(__Instance); + return ___ret; + } + } } public unsafe partial class FunctionTemplate : global::CppSharp.Parser.AST.Template, IDisposable @@ -14037,7 +14089,7 @@ public FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14208,12 +14260,12 @@ public FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTempla public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14422,7 +14474,7 @@ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14611,7 +14663,7 @@ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpeciali partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14792,7 +14844,7 @@ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplateP partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14910,7 +14962,7 @@ public UnresolvedUsingTypename(global::CppSharp.Parser.AST.UnresolvedUsingTypena partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15040,7 +15092,7 @@ public Namespace(global::CppSharp.Parser.AST.Namespace _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15164,12 +15216,12 @@ public PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15309,7 +15361,7 @@ public MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15465,7 +15517,7 @@ public MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15652,7 +15704,7 @@ public TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15839,12 +15891,12 @@ public ASTContext(global::CppSharp.Parser.AST.ASTContext _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16147,12 +16199,12 @@ public Stmt(global::CppSharp.Parser.AST.Stmt _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16324,7 +16376,7 @@ public DeclStmt(global::CppSharp.Parser.AST.DeclStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16607,7 +16659,7 @@ public CompoundStmt(global::CppSharp.Parser.AST.CompoundStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -18965,7 +19017,7 @@ public AsmStmt(global::CppSharp.Parser.AST.AsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19276,12 +19328,12 @@ public AsmStringPiece(global::CppSharp.Parser.AST.GCCAsmStmt.AsmStringPiece _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19427,7 +19479,7 @@ public GCCAsmStmt(global::CppSharp.Parser.AST.GCCAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19553,7 +19605,7 @@ public MSAsmStmt(global::CppSharp.Parser.AST.MSAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20254,12 +20306,12 @@ public Capture(global::CppSharp.Parser.AST.CapturedStmt.Capture _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20415,7 +20467,7 @@ public CapturedStmt(global::CppSharp.Parser.AST.CapturedStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -21278,12 +21330,12 @@ public CtorArgs(global::CppSharp.Parser.AST.CoroutineBodyStmt.CtorArgs _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -22106,12 +22158,12 @@ public Classification(global::CppSharp.Parser.AST.Expr.Classification _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -23859,7 +23911,7 @@ public StringLiteral(global::CppSharp.Parser.AST.StringLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -25232,7 +25284,7 @@ public CallExpr(global::CppSharp.Parser.AST.CallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26538,7 +26590,7 @@ public BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26928,7 +26980,7 @@ public CompoundAssignOperator(global::CppSharp.Parser.AST.CompoundAssignOperator partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -28811,12 +28863,12 @@ public Designator(global::CppSharp.Parser.AST.DesignatedInitExpr.Designator _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29067,12 +29119,12 @@ public FieldDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.FieldDesig public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29177,12 +29229,12 @@ public ArrayOrRangeDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.Arr public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31345,7 +31397,7 @@ public CXXOperatorCallExpr(global::CppSharp.Parser.AST.CXXOperatorCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31522,7 +31574,7 @@ public CXXMemberCallExpr(global::CppSharp.Parser.AST.CXXMemberCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31674,7 +31726,7 @@ public CUDAKernelCallExpr(global::CppSharp.Parser.AST.CUDAKernelCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -32449,7 +32501,7 @@ public UserDefinedLiteral(global::CppSharp.Parser.AST.UserDefinedLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -33365,7 +33417,7 @@ public CXXUuidofExpr(global::CppSharp.Parser.AST.CXXUuidofExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34171,7 +34223,7 @@ public CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34713,7 +34765,7 @@ public CXXTemporaryObjectExpr(global::CppSharp.Parser.AST.CXXTemporaryObjectExpr partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34849,7 +34901,7 @@ public LambdaExpr(global::CppSharp.Parser.AST.LambdaExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -35255,7 +35307,7 @@ public CXXNewExpr(global::CppSharp.Parser.AST.CXXNewExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -36397,12 +36449,12 @@ public FindResult(global::CppSharp.Parser.AST.OverloadExpr.FindResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -37154,7 +37206,7 @@ public CXXUnresolvedConstructExpr(global::CppSharp.Parser.AST.CXXUnresolvedConst partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -38662,12 +38714,12 @@ public ExtraState(global::CppSharp.Parser.AST.MaterializeTemporaryExpr.ExtraStat public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -39754,12 +39806,12 @@ public ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -40640,12 +40692,12 @@ public CppParserOptions(global::CppSharp.Parser.CppParserOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41181,12 +41233,12 @@ public CppLinkerOptions(global::CppSharp.Parser.CppLinkerOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41380,12 +41432,12 @@ public ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41594,12 +41646,12 @@ public ParserResult(global::CppSharp.Parser.ParserResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41805,12 +41857,12 @@ public ClangParser(global::CppSharp.Parser.ClangParser _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs index 91785e9fd..55496aa49 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs @@ -16,6 +16,7 @@ [assembly:InternalsVisibleTo("CppSharp.CppParser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace Std { @@ -113,12 +114,12 @@ public Allocator() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -305,12 +306,12 @@ protected CharTraits(void* native, bool skipVTables = false) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -433,12 +434,12 @@ public BasicString() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs index e8e7233f1..6bb311677 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs @@ -14,6 +14,7 @@ [assembly:InternalsVisibleTo("CppSharp.Parser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace CppSharp { @@ -187,12 +188,12 @@ public NativeLibrary(global::CppSharp.Parser.AST.NativeLibrary _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -378,12 +379,12 @@ public Comment(global::CppSharp.Parser.AST.Comment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -602,7 +603,7 @@ public FullComment(global::CppSharp.Parser.AST.FullComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -850,7 +851,7 @@ public ParagraphComment(global::CppSharp.Parser.AST.ParagraphComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1043,12 +1044,12 @@ public Argument(global::CppSharp.Parser.AST.BlockCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1151,7 +1152,7 @@ public BlockCommandComment(global::CppSharp.Parser.AST.BlockCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1323,7 +1324,7 @@ public ParamCommandComment(global::CppSharp.Parser.AST.ParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1462,7 +1463,7 @@ public TParamCommandComment(global::CppSharp.Parser.AST.TParamCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1589,7 +1590,7 @@ public VerbatimBlockLineComment(global::CppSharp.Parser.AST.VerbatimBlockLineCom partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1716,7 +1717,7 @@ public VerbatimBlockComment(global::CppSharp.Parser.AST.VerbatimBlockComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -1847,7 +1848,7 @@ public VerbatimLineComment(global::CppSharp.Parser.AST.VerbatimLineComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2018,12 +2019,12 @@ public Argument(global::CppSharp.Parser.AST.InlineCommandComment.Argument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2117,7 +2118,7 @@ public InlineCommandComment(global::CppSharp.Parser.AST.InlineCommandComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2416,12 +2417,12 @@ public Attribute(global::CppSharp.Parser.AST.HTMLStartTagComment.Attribute _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2529,7 +2530,7 @@ public HTMLStartTagComment(global::CppSharp.Parser.AST.HTMLStartTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2673,7 +2674,7 @@ public HTMLEndTagComment(global::CppSharp.Parser.AST.HTMLEndTagComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2786,7 +2787,7 @@ public TextComment(global::CppSharp.Parser.AST.TextComment _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -2918,12 +2919,12 @@ public RawComment(global::CppSharp.Parser.AST.RawComment _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3017,7 +3018,7 @@ public partial struct __Internal } private SourceLocation.__Internal __instance; - internal SourceLocation.__Internal __Instance => __instance; + internal ref SourceLocation.__Internal __Instance => ref __instance; internal static SourceLocation __CreateInstance(__IntPtr native, bool skipVTables = false) { @@ -3040,6 +3041,14 @@ private SourceLocation(void* native, bool skipVTables = false) : this() __instance = *(global::CppSharp.Parser.SourceLocation.__Internal*) native; } + public SourceLocation() + { + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } + } + public SourceLocation(uint ID) : this() { @@ -3175,12 +3184,12 @@ public SourceRange() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3402,12 +3411,12 @@ public Type(global::CppSharp.Parser.AST.Type _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3543,12 +3552,12 @@ public TypeQualifiers() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -3695,12 +3704,12 @@ public QualifiedType(global::CppSharp.Parser.AST.QualifiedType _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4082,7 +4091,7 @@ public FunctionType(global::CppSharp.Parser.AST.FunctionType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4826,12 +4835,12 @@ public TemplateArgument(global::CppSharp.Parser.AST.TemplateArgument _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -4997,7 +5006,7 @@ public TemplateSpecializationType(global::CppSharp.Parser.AST.TemplateSpecializa partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5167,7 +5176,7 @@ public DependentTemplateSpecializationType(global::CppSharp.Parser.AST.Dependent partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5313,7 +5322,7 @@ public TemplateParameterType(global::CppSharp.Parser.AST.TemplateParameterType _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -5688,7 +5697,7 @@ public DependentNameType(global::CppSharp.Parser.AST.DependentNameType _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -6574,12 +6583,12 @@ public Declaration(global::CppSharp.Parser.AST.Declaration _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7147,7 +7156,7 @@ public DeclarationContext(global::CppSharp.Parser.AST.DeclarationContext _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7554,7 +7563,7 @@ public TypedefNameDecl(global::CppSharp.Parser.AST.TypedefNameDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7693,7 +7702,7 @@ public TypedefDecl(global::CppSharp.Parser.AST.TypedefDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7813,7 +7822,7 @@ public TypeAlias(global::CppSharp.Parser.AST.TypeAlias _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -7946,7 +7955,7 @@ public Friend(global::CppSharp.Parser.AST.Friend _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8082,12 +8091,12 @@ public StatementObsolete(global::CppSharp.Parser.AST.StatementObsolete _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8232,7 +8241,7 @@ public ExpressionObsolete(global::CppSharp.Parser.AST.ExpressionObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8344,7 +8353,7 @@ public BinaryOperatorObsolete(global::CppSharp.Parser.AST.BinaryOperatorObsolete partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8503,7 +8512,7 @@ public CallExprObsolete(global::CppSharp.Parser.AST.CallExprObsolete _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8650,7 +8659,7 @@ public CXXConstructExprObsolete(global::CppSharp.Parser.AST.CXXConstructExprObso partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -8804,7 +8813,7 @@ public Parameter(global::CppSharp.Parser.AST.Parameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9047,7 +9056,7 @@ public Function(global::CppSharp.Parser.AST.Function _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9507,7 +9516,7 @@ public Method(global::CppSharp.Parser.AST.Method _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9879,7 +9888,7 @@ public Item(global::CppSharp.Parser.AST.Enumeration.Item _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -9986,7 +9995,7 @@ public Enumeration(global::CppSharp.Parser.AST.Enumeration _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10190,7 +10199,7 @@ public Variable(global::CppSharp.Parser.AST.Variable _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10358,12 +10367,12 @@ public BaseClassSpecifier(global::CppSharp.Parser.AST.BaseClassSpecifier _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10536,7 +10545,7 @@ public Field(global::CppSharp.Parser.AST.Field _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10709,7 +10718,7 @@ public AccessSpecifierDecl(global::CppSharp.Parser.AST.AccessSpecifierDecl _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10820,12 +10829,12 @@ public VTableComponent(global::CppSharp.Parser.AST.VTableComponent _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -10990,12 +10999,12 @@ public VTableLayout(global::CppSharp.Parser.AST.VTableLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11142,12 +11151,12 @@ public VFTableInfo(global::CppSharp.Parser.AST.VFTableInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11319,12 +11328,12 @@ public LayoutField(global::CppSharp.Parser.AST.LayoutField other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11495,12 +11504,12 @@ public LayoutBase(global::CppSharp.Parser.AST.LayoutBase other) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -11688,12 +11697,12 @@ public ClassLayout(global::CppSharp.Parser.AST.ClassLayout _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12085,7 +12094,7 @@ public Class(global::CppSharp.Parser.AST.Class _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12506,7 +12515,7 @@ public Template(global::CppSharp.Parser.AST.Template _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12675,7 +12684,7 @@ public TypeAliasTemplate(global::CppSharp.Parser.AST.TypeAliasTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12796,7 +12805,7 @@ public TemplateParameter(global::CppSharp.Parser.AST.TemplateParameter _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -12963,7 +12972,7 @@ public TemplateTemplateParameter(global::CppSharp.Parser.AST.TemplateTemplatePar partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13124,7 +13133,7 @@ public TypeTemplateParameter(global::CppSharp.Parser.AST.TypeTemplateParameter _ partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13266,7 +13275,7 @@ public NonTypeTemplateParameter(global::CppSharp.Parser.AST.NonTypeTemplateParam partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13487,7 +13496,7 @@ public ClassTemplate(global::CppSharp.Parser.AST.ClassTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13699,7 +13708,7 @@ public ClassTemplateSpecialization(global::CppSharp.Parser.AST.ClassTemplateSpec partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13771,7 +13780,7 @@ public uint ArgumentsCount public unsafe partial class ClassTemplatePartialSpecialization : global::CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable { - [StructLayout(LayoutKind.Sequential, Size = 624)] + [StructLayout(LayoutKind.Sequential, Size = 648)] public new partial struct __Internal { internal global::CppSharp.Parser.AST.DeclarationKind kind; @@ -13826,6 +13835,7 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar internal __IntPtr templatedDecl; internal global::Std.Vector.__Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_ Arguments; internal global::CppSharp.Parser.AST.TemplateSpecializationKind specializationKind; + internal global::Std.Vector.__Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_ Parameters; [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "??0ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ", CallingConvention = __CallingConvention.Cdecl)] internal static extern __IntPtr ctor(__IntPtr __instance); @@ -13835,6 +13845,18 @@ public unsafe partial class ClassTemplatePartialSpecialization : global::CppShar [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "??1ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAA@XZ", CallingConvention = __CallingConvention.Cdecl)] internal static extern void dtor(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?getParameters@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAAPEAVDeclaration@234@I@Z", CallingConvention = __CallingConvention.Cdecl)] + internal static extern __IntPtr GetParameters(__IntPtr __instance, uint i); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?addParameters@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAAXAEAPEAVDeclaration@234@@Z", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void AddParameters(__IntPtr __instance, __IntPtr s); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?clearParameters@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAAXXZ", CallingConvention = __CallingConvention.Cdecl)] + internal static extern void ClearParameters(__IntPtr __instance); + + [SuppressUnmanagedCodeSecurity, DllImport("CppSharp.CppParser.dll", EntryPoint = "?getParametersCount@ClassTemplatePartialSpecialization@AST@CppParser@CppSharp@@QEAAIXZ", CallingConvention = __CallingConvention.Cdecl)] + internal static extern uint GetParametersCount(__IntPtr __instance); } internal static new ClassTemplatePartialSpecialization __CreateInstance(__IntPtr native, bool skipVTables = false) @@ -13903,7 +13925,7 @@ public ClassTemplatePartialSpecialization(global::CppSharp.Parser.AST.ClassTempl partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -13915,6 +13937,36 @@ internal protected override void Dispose(bool disposing, bool callNativeDtor ) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; } + + public global::CppSharp.Parser.AST.Declaration GetParameters(uint i) + { + var ___ret = __Internal.GetParameters(__Instance, i); + var __result0 = global::CppSharp.Parser.AST.Declaration.__GetOrCreateInstance(___ret, false); + return __result0; + } + + public void AddParameters(global::CppSharp.Parser.AST.Declaration s) + { + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&)."); + var ____arg0 = s.__Instance; + var __arg0 = new __IntPtr(&____arg0); + __Internal.AddParameters(__Instance, __arg0); + } + + public void ClearParameters() + { + __Internal.ClearParameters(__Instance); + } + + public uint ParametersCount + { + get + { + var ___ret = __Internal.GetParametersCount(__Instance); + return ___ret; + } + } } public unsafe partial class FunctionTemplate : global::CppSharp.Parser.AST.Template, IDisposable @@ -14039,7 +14091,7 @@ public FunctionTemplate(global::CppSharp.Parser.AST.FunctionTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14210,12 +14262,12 @@ public FunctionTemplateSpecialization(global::CppSharp.Parser.AST.FunctionTempla public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14424,7 +14476,7 @@ public VarTemplate(global::CppSharp.Parser.AST.VarTemplate _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14613,7 +14665,7 @@ public VarTemplateSpecialization(global::CppSharp.Parser.AST.VarTemplateSpeciali partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14794,7 +14846,7 @@ public VarTemplatePartialSpecialization(global::CppSharp.Parser.AST.VarTemplateP partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -14912,7 +14964,7 @@ public UnresolvedUsingTypename(global::CppSharp.Parser.AST.UnresolvedUsingTypena partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15043,7 +15095,7 @@ public Namespace(global::CppSharp.Parser.AST.Namespace _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15167,12 +15219,12 @@ public PreprocessedEntity(global::CppSharp.Parser.AST.PreprocessedEntity _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15312,7 +15364,7 @@ public MacroDefinition(global::CppSharp.Parser.AST.MacroDefinition _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15468,7 +15520,7 @@ public MacroExpansion(global::CppSharp.Parser.AST.MacroExpansion _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15656,7 +15708,7 @@ public TranslationUnit(global::CppSharp.Parser.AST.TranslationUnit _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -15843,12 +15895,12 @@ public ASTContext(global::CppSharp.Parser.AST.ASTContext _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16151,12 +16203,12 @@ public Stmt(global::CppSharp.Parser.AST.Stmt _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16328,7 +16380,7 @@ public DeclStmt(global::CppSharp.Parser.AST.DeclStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -16611,7 +16663,7 @@ public CompoundStmt(global::CppSharp.Parser.AST.CompoundStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -18969,7 +19021,7 @@ public AsmStmt(global::CppSharp.Parser.AST.AsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19280,12 +19332,12 @@ public AsmStringPiece(global::CppSharp.Parser.AST.GCCAsmStmt.AsmStringPiece _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19431,7 +19483,7 @@ public GCCAsmStmt(global::CppSharp.Parser.AST.GCCAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -19557,7 +19609,7 @@ public MSAsmStmt(global::CppSharp.Parser.AST.MSAsmStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20258,12 +20310,12 @@ public Capture(global::CppSharp.Parser.AST.CapturedStmt.Capture _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -20419,7 +20471,7 @@ public CapturedStmt(global::CppSharp.Parser.AST.CapturedStmt _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -21282,12 +21334,12 @@ public CtorArgs(global::CppSharp.Parser.AST.CoroutineBodyStmt.CtorArgs _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -22110,12 +22162,12 @@ public Classification(global::CppSharp.Parser.AST.Expr.Classification _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -23869,7 +23921,7 @@ public StringLiteral(global::CppSharp.Parser.AST.StringLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -25246,7 +25298,7 @@ public CallExpr(global::CppSharp.Parser.AST.CallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26557,7 +26609,7 @@ public BinaryOperator(global::CppSharp.Parser.AST.BinaryOperator _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -26948,7 +27000,7 @@ public CompoundAssignOperator(global::CppSharp.Parser.AST.CompoundAssignOperator partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -28836,12 +28888,12 @@ public Designator(global::CppSharp.Parser.AST.DesignatedInitExpr.Designator _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29092,12 +29144,12 @@ public FieldDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.FieldDesig public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -29202,12 +29254,12 @@ public ArrayOrRangeDesignator(global::CppSharp.Parser.AST.DesignatedInitExpr.Arr public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31373,7 +31425,7 @@ public CXXOperatorCallExpr(global::CppSharp.Parser.AST.CXXOperatorCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31550,7 +31602,7 @@ public CXXMemberCallExpr(global::CppSharp.Parser.AST.CXXMemberCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -31702,7 +31754,7 @@ public CUDAKernelCallExpr(global::CppSharp.Parser.AST.CUDAKernelCallExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -32482,7 +32534,7 @@ public UserDefinedLiteral(global::CppSharp.Parser.AST.UserDefinedLiteral _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -33402,7 +33454,7 @@ public CXXUuidofExpr(global::CppSharp.Parser.AST.CXXUuidofExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34209,7 +34261,7 @@ public CXXConstructExpr(global::CppSharp.Parser.AST.CXXConstructExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34753,7 +34805,7 @@ public CXXTemporaryObjectExpr(global::CppSharp.Parser.AST.CXXTemporaryObjectExpr partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -34889,7 +34941,7 @@ public LambdaExpr(global::CppSharp.Parser.AST.LambdaExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -35296,7 +35348,7 @@ public CXXNewExpr(global::CppSharp.Parser.AST.CXXNewExpr _0) partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -36441,12 +36493,12 @@ public FindResult(global::CppSharp.Parser.AST.OverloadExpr.FindResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -37201,7 +37253,7 @@ public CXXUnresolvedConstructExpr(global::CppSharp.Parser.AST.CXXUnresolvedConst partial void DisposePartial(bool disposing); - internal protected override void Dispose(bool disposing, bool callNativeDtor ) + internal protected override void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -38716,12 +38768,12 @@ public ExtraState(global::CppSharp.Parser.AST.MaterializeTemporaryExpr.ExtraStat public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -39811,12 +39863,12 @@ public ParserTargetInfo(global::CppSharp.Parser.ParserTargetInfo _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -40697,12 +40749,12 @@ public CppParserOptions(global::CppSharp.Parser.CppParserOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41238,12 +41290,12 @@ public CppLinkerOptions(global::CppSharp.Parser.CppLinkerOptions _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41437,12 +41489,12 @@ public ParserDiagnostic(global::CppSharp.Parser.ParserDiagnostic _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41651,12 +41703,12 @@ public ParserResult(global::CppSharp.Parser.ParserResult _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -41862,12 +41914,12 @@ public ClangParser(global::CppSharp.Parser.ClangParser _0) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs index 8a426d693..a34a2d26e 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs @@ -16,6 +16,7 @@ [assembly:InternalsVisibleTo("CppSharp.CppParser")] #pragma warning disable CS0109 // Member does not hide an inherited member; new keyword is not required +#pragma warning disable CS9084 // Struct member returns 'this' or other instance members by reference namespace Std { @@ -160,17 +161,26 @@ public Allocator() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; NativeToManagedMap.TryRemove(__Instance, out _); DisposePartial(disposing); + if (callNativeDtor) + { + var ___Ty = typeof(_Ty); + if (___Ty.IsAssignableFrom(typeof(sbyte))) + { + return; + } + throw new ArgumentOutOfRangeException("_Ty", string.Join(", ", new[] { typeof(_Ty).FullName }), "global::Std.Allocator<_Ty> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: ."); + } if (__ownsNativeInstance) Marshal.FreeHGlobal(__Instance); __Instance = IntPtr.Zero; @@ -299,12 +309,12 @@ public BasicString() public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; @@ -431,12 +441,12 @@ protected CharTraits(void* native, bool skipVTables = false) public void Dispose() { - Dispose(disposing: true, callNativeDtor : __ownsNativeInstance ); + Dispose(disposing: true, callNativeDtor: __ownsNativeInstance); } partial void DisposePartial(bool disposing); - internal protected virtual void Dispose(bool disposing, bool callNativeDtor ) + internal protected virtual void Dispose(bool disposing, bool callNativeDtor) { if (__Instance == IntPtr.Zero) return; diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 8821ae03e..06b39aa12 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -1339,6 +1339,8 @@ Parser::WalkClassTemplatePartialSpecialization(const clang::ClassTemplatePartial } } + TS->Parameters = WalkTemplateParameterList(CTS->getTemplateParameters()); + return TS; } diff --git a/src/Generator/Types/Std/Stdlib.CSharp.cs b/src/Generator/Types/Std/Stdlib.CSharp.cs index a4198bcd1..e69de8e7e 100644 --- a/src/Generator/Types/Std/Stdlib.CSharp.cs +++ b/src/Generator/Types/Std/Stdlib.CSharp.cs @@ -412,22 +412,6 @@ private static ClassTemplateSpecialization GetBasicString(Type type) } } - [TypeMap("std::map", GeneratorKindID = GeneratorKind.CSharp_ID)] - public class Map : TypeMap - { - public override bool IsIgnored { get { return true; } } - - public override Type SignatureType(TypePrinterContext ctx) - { - if (ctx.Kind == TypePrinterContextKind.Native) - return new CustomType("Std.Map"); - - var type = Type as TemplateSpecializationType; - return new CustomType( - $@"System.Collections.Generic.Dictionary<{type.Arguments[0].Type}, {type.Arguments[1].Type}>"); - } - } - [TypeMap("FILE", GeneratorKindID = GeneratorKind.CSharp_ID)] public class FILE : TypeMap { diff --git a/src/Parser/ASTConverter.cs b/src/Parser/ASTConverter.cs index 1c03e9390..ea827d097 100644 --- a/src/Parser/ASTConverter.cs +++ b/src/Parser/ASTConverter.cs @@ -1918,6 +1918,12 @@ public override AST.Declaration VisitClassTemplatePartialSpecialization( { var _decl = new AST.ClassTemplatePartialSpecialization(); VisitClassTemplateSpecialization(decl, _decl); + for (uint i = 0; i < decl.ParametersCount; ++i) + { + var param = decl.GetParameters(i); + var _param = Visit(param); + _decl.Parameters.Add(_param); + } return _decl; } From 95425238eab38c7180831933c0e0fd42c0ab99dc Mon Sep 17 00:00:00 2001 From: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com> Date: Sun, 17 Dec 2023 13:08:34 +0200 Subject: [PATCH 5/8] regenerated bindings (#1813) * regenerated bindings * regenerated bindings after rebase * Directory.Build.props: support C# 10.0 --- Directory.Build.props | 114 +++++++++--------- .../CppSharp.CppParser.cs | 8 +- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 2a32266a0..0dc6c392c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,58 +1,58 @@ - - - - - $(MSBuildThisFileDirectory) - x86;x64 - false - true - MIT - https://github.com/mono/CppSharp - $(GITHUB_SHA) - João Matos, Dimitar Dobrev, Jose Torres - João Matos, Dimitar Dobrev - $(NBGV_Version) - $(NBGV_AssemblyVersion) - $(NBGV_AssemblyFileVersion) - $(NBGV_AssemblyInformationalVersion) - false - $(RootDir)build\ - $(BuildDir)obj\ - $(BuildDir)gen\ - $(RootDir)src\ - $(TargetFramework) - $(ObjDir)$(MSBuildProjectName)\ - $(RootDir)bin\ - $(BaseOutputPath)$(Configuration)_$(PlatformTarget)\ - $(BuildDir)$(PremakeAction)\ - $(ActionDir)projects\ - $(RootDir)artifacts\package\ - $(OutputPath) - 9.0 - 4 - dotnet - dll - "$(MSBuildProgramFiles32)\dotnet\dotnet.exe" - "$(ProgramW6432)\dotnet\dotnet.exe" - win - linux - osx - $(RID)-$(PlatformTarget) - - - - true - full - false - - - - exe - - - - - - - + + + + + $(MSBuildThisFileDirectory) + x86;x64 + false + true + MIT + https://github.com/mono/CppSharp + $(GITHUB_SHA) + João Matos, Dimitar Dobrev, Jose Torres + João Matos, Dimitar Dobrev + $(NBGV_Version) + $(NBGV_AssemblyVersion) + $(NBGV_AssemblyFileVersion) + $(NBGV_AssemblyInformationalVersion) + false + $(RootDir)build\ + $(BuildDir)obj\ + $(BuildDir)gen\ + $(RootDir)src\ + $(TargetFramework) + $(ObjDir)$(MSBuildProjectName)\ + $(RootDir)bin\ + $(BaseOutputPath)$(Configuration)_$(PlatformTarget)\ + $(BuildDir)$(PremakeAction)\ + $(ActionDir)projects\ + $(RootDir)artifacts\package\ + $(OutputPath) + 10.0 + 4 + dotnet + dll + "$(MSBuildProgramFiles32)\dotnet\dotnet.exe" + "$(ProgramW6432)\dotnet\dotnet.exe" + win + linux + osx + $(RID)-$(PlatformTarget) + + + + true + full + false + + + + exe + + + + + + + \ No newline at end of file diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs index 6bb311677..c626a8ec5 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs @@ -3043,10 +3043,10 @@ private SourceLocation(void* native, bool skipVTables = false) : this() public SourceLocation() { - fixed (__Internal* __instancePtr = &__instance) - { - __Internal.ctor(new __IntPtr(__instancePtr)); - } + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } } public SourceLocation(uint ID) From 56c0aafe8143537d9cb3454d1e5cce083d145630 Mon Sep 17 00:00:00 2001 From: Deadlocklogic Date: Sun, 17 Dec 2023 10:09:44 +0200 Subject: [PATCH 6/8] Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter --- .../CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs index c626a8ec5..6bb311677 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs @@ -3043,10 +3043,10 @@ private SourceLocation(void* native, bool skipVTables = false) : this() public SourceLocation() { - fixed (__Internal* __instancePtr = &__instance) - { - __Internal.ctor(new __IntPtr(__instancePtr)); - } + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } } public SourceLocation(uint ID) From 208d7604b2d768101697ab169108ab6b5c7fd4a4 Mon Sep 17 00:00:00 2001 From: Deadlocklogic Date: Sun, 17 Dec 2023 14:52:00 +0200 Subject: [PATCH 7/8] Regenerated bindings --- .../CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs index 6bb311677..c626a8ec5 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs @@ -3043,10 +3043,10 @@ private SourceLocation(void* native, bool skipVTables = false) : this() public SourceLocation() { - fixed (__Internal* __instancePtr = &__instance) - { - __Internal.ctor(new __IntPtr(__instancePtr)); - } + fixed (__Internal* __instancePtr = &__instance) + { + __Internal.ctor(new __IntPtr(__instancePtr)); + } } public SourceLocation(uint ID) From 124167de099b05d937233958b7d5268bcc144855 Mon Sep 17 00:00:00 2001 From: Deadlocklogic Date: Sun, 17 Dec 2023 16:40:15 +0200 Subject: [PATCH 8/8] TestAST.cs: add TestASTClassTemplatePartialSpecialization --- src/Generator.Tests/AST/TestAST.cs | 22 ++++++++++++++++++++++ tests/dotnet/Native/AST.h | 11 ++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/Generator.Tests/AST/TestAST.cs b/src/Generator.Tests/AST/TestAST.cs index b04a6f0c9..62a0f6d9f 100644 --- a/src/Generator.Tests/AST/TestAST.cs +++ b/src/Generator.Tests/AST/TestAST.cs @@ -289,6 +289,28 @@ public void TestASTClassTemplates() Assert.AreSame(classTemplateSpecialization.TemplatedDecl.TemplatedClass, template.TemplatedClass); } + [Test] + public void TestASTClassTemplatePartialSpecialization() + { + var classTemplate = AstContext.TranslationUnits + .SelectMany(u => u.Templates.OfType()) + .FirstOrDefault(t => t.Name == "TestClassTemplatePartialSpecialization"); + + var classTemplatePartialSpecializations = classTemplate.Specializations.Where(specialization => specialization is ClassTemplatePartialSpecialization).Cast(); + Assert.IsTrue(classTemplatePartialSpecializations.Count() == 1); + var classTemplatePartialSpecialization = classTemplatePartialSpecializations.First(); + Assert.AreEqual(TemplateSpecializationKind.ExplicitSpecialization, classTemplatePartialSpecialization.SpecializationKind); + + var classTemplatePartialSpecializationParameters = classTemplatePartialSpecialization.Parameters; + Assert.AreEqual(1, classTemplatePartialSpecializationParameters.Count); + Assert.AreEqual((classTemplatePartialSpecializationParameters[0] as TypeTemplateParameter).Name, "K"); + + var classTemplatePartialSpecializationArguments = classTemplatePartialSpecialization.Arguments; + Assert.AreEqual(2, classTemplatePartialSpecializationArguments.Count); + Assert.AreEqual((classTemplatePartialSpecializationArguments[0].Type.Type as BuiltinType).Type, PrimitiveType.Int); + Assert.AreEqual((classTemplatePartialSpecializationArguments[1].Type.Type as TemplateParameterType).Parameter, classTemplatePartialSpecializationParameters[0]); + } + [Test] public void TestDeprecatedAttrs() { diff --git a/tests/dotnet/Native/AST.h b/tests/dotnet/Native/AST.h index 29ff07628..1ec43910a 100644 --- a/tests/dotnet/Native/AST.h +++ b/tests/dotnet/Native/AST.h @@ -190,4 +190,13 @@ class HasMethods { public: void isVolatileMethod() volatile {} -}; \ No newline at end of file +}; + +template +class TestClassTemplatePartialSpecialization +{ +}; +template +class TestClassTemplatePartialSpecialization +{ +};