diff --git a/src/CppParser/AST.cpp b/src/CppParser/AST.cpp index 2e7aeea2..1192e887 100644 --- a/src/CppParser/AST.cpp +++ b/src/CppParser/AST.cpp @@ -486,16 +486,34 @@ Expression::Expression(const std::string& str, StatementClass stmtClass, Declara BinaryOperator::BinaryOperator(const std::string& str, Expression* lhs, Expression* rhs, const std::string& opcodeStr) : Expression(str, StatementClass::BinaryOperator), LHS(lhs), RHS(rhs), OpcodeStr(opcodeStr) {} +BinaryOperator::~BinaryOperator() +{ + delete LHS; + delete RHS; +} + DEF_STRING(BinaryOperator, OpcodeStr) CallExpr::CallExpr(const std::string& str, Declaration* decl) : Expression(str, StatementClass::CallExprClass, decl) {} +CallExpr::~CallExpr() +{ + for (auto& arg : Arguments) + delete arg; +} + DEF_VECTOR(CallExpr, Expression*, Arguments) CXXConstructExpr::CXXConstructExpr(const std::string& str, Declaration* decl) : Expression(str, StatementClass::CXXConstructExprClass, decl) {} +CXXConstructExpr::~CXXConstructExpr() +{ + for (auto& arg : Arguments) + delete arg; +} + DEF_VECTOR(CXXConstructExpr, Expression*, Arguments) Parameter::Parameter() : Declaration(DeclarationKind::Parameter), diff --git a/src/CppParser/AST.h b/src/CppParser/AST.h index d1efdf89..c78572d6 100644 --- a/src/CppParser/AST.h +++ b/src/CppParser/AST.h @@ -508,6 +508,7 @@ class CS_API BinaryOperator : public Expression { public: BinaryOperator(const std::string& str, Expression* lhs, Expression* rhs, const std::string& opcodeStr); + ~BinaryOperator(); Expression* LHS; Expression* RHS; STRING(OpcodeStr) @@ -517,6 +518,7 @@ class CS_API CallExpr : public Expression { public: CallExpr(const std::string& str, Declaration* decl); + ~CallExpr(); VECTOR(Expression*, Arguments) }; @@ -524,6 +526,7 @@ class CS_API CXXConstructExpr : public Expression { public: CXXConstructExpr(const std::string& str, Declaration* decl = 0); + ~CXXConstructExpr(); VECTOR(Expression*, Arguments) }; diff --git a/src/CppParser/Bindings/CLI/AST.cpp b/src/CppParser/Bindings/CLI/AST.cpp index 6280ac7a..1295f549 100644 --- a/src/CppParser/Bindings/CLI/AST.cpp +++ b/src/CppParser/Bindings/CLI/AST.cpp @@ -37,6 +37,8 @@ CppSharp::Parser::AST::Type::Type(CppSharp::Parser::AST::TypeKind kind) CppSharp::Parser::AST::Type::Type(CppSharp::Parser::AST::Type^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Type*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Type(arg0); } @@ -98,6 +100,8 @@ CppSharp::Parser::AST::TypeQualifiers::~TypeQualifiers() CppSharp::Parser::AST::TypeQualifiers::TypeQualifiers(CppSharp::Parser::AST::TypeQualifiers^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TypeQualifiers*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TypeQualifiers(arg0); } @@ -181,6 +185,8 @@ CppSharp::Parser::AST::QualifiedType::QualifiedType() CppSharp::Parser::AST::QualifiedType::QualifiedType(CppSharp::Parser::AST::QualifiedType^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::QualifiedType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::QualifiedType(arg0); } @@ -247,6 +253,8 @@ CppSharp::Parser::AST::TagType::TagType(CppSharp::Parser::AST::TagType^ _0) : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TagType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TagType(arg0); } @@ -293,6 +301,8 @@ CppSharp::Parser::AST::ArrayType::ArrayType(CppSharp::Parser::AST::ArrayType^ _0 : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ArrayType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ArrayType(arg0); } @@ -374,6 +384,8 @@ CppSharp::Parser::AST::Parameter^ CppSharp::Parser::AST::FunctionType::getParame void CppSharp::Parser::AST::FunctionType::addParameters(CppSharp::Parser::AST::Parameter^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Parameter*)s->NativePtr; ((::CppSharp::CppParser::AST::FunctionType*)NativePtr)->addParameters(arg0); } @@ -387,6 +399,8 @@ CppSharp::Parser::AST::FunctionType::FunctionType(CppSharp::Parser::AST::Functio : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::FunctionType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::FunctionType(arg0); } @@ -449,6 +463,8 @@ CppSharp::Parser::AST::PointerType::PointerType(CppSharp::Parser::AST::PointerTy : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::PointerType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::PointerType(arg0); } @@ -505,6 +521,8 @@ CppSharp::Parser::AST::MemberPointerType::MemberPointerType(CppSharp::Parser::AS : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::MemberPointerType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::MemberPointerType(arg0); } @@ -551,6 +569,8 @@ CppSharp::Parser::AST::TypedefType::TypedefType(CppSharp::Parser::AST::TypedefTy : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TypedefType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TypedefType(arg0); } @@ -597,6 +617,8 @@ CppSharp::Parser::AST::AttributedType::AttributedType(CppSharp::Parser::AST::Att : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::AttributedType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::AttributedType(arg0); } @@ -653,6 +675,8 @@ CppSharp::Parser::AST::DecayedType::DecayedType(CppSharp::Parser::AST::DecayedTy : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::DecayedType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::DecayedType(arg0); } @@ -720,6 +744,8 @@ CppSharp::Parser::AST::TemplateArgument::TemplateArgument() CppSharp::Parser::AST::TemplateArgument::TemplateArgument(CppSharp::Parser::AST::TemplateArgument^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateArgument*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TemplateArgument(arg0); } @@ -806,6 +832,8 @@ CppSharp::Parser::AST::TemplateSpecializationType::TemplateSpecializationType(Cp : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateSpecializationType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TemplateSpecializationType(arg0); } @@ -819,6 +847,8 @@ CppSharp::Parser::AST::TemplateArgument^ CppSharp::Parser::AST::TemplateSpeciali void CppSharp::Parser::AST::TemplateSpecializationType::addArguments(CppSharp::Parser::AST::TemplateArgument^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateArgument*)s->NativePtr; ((::CppSharp::CppParser::AST::TemplateSpecializationType*)NativePtr)->addArguments(arg0); } @@ -887,12 +917,18 @@ CppSharp::Parser::AST::TemplateParameter::TemplateParameter() CppSharp::Parser::AST::TemplateParameter::TemplateParameter(CppSharp::Parser::AST::TemplateParameter^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateParameter*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TemplateParameter(arg0); } bool CppSharp::Parser::AST::TemplateParameter::operator==(CppSharp::Parser::AST::TemplateParameter^ __op, CppSharp::Parser::AST::TemplateParameter^ param) { + bool __opNull = ReferenceEquals(__op, nullptr); + bool paramNull = ReferenceEquals(param, nullptr); + if (__opNull || paramNull) + return __opNull && paramNull; auto &arg0 = *(::CppSharp::CppParser::AST::TemplateParameter*)__op->NativePtr; auto &arg1 = *(::CppSharp::CppParser::AST::TemplateParameter*)param->NativePtr; auto __ret = arg0 == arg1; @@ -970,6 +1006,8 @@ CppSharp::Parser::AST::TemplateParameterType::TemplateParameterType(CppSharp::Pa : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateParameterType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TemplateParameterType(arg0); } @@ -1046,6 +1084,8 @@ CppSharp::Parser::AST::TemplateParameterSubstitutionType::TemplateParameterSubst : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateParameterSubstitutionType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TemplateParameterSubstitutionType(arg0); } @@ -1092,6 +1132,8 @@ CppSharp::Parser::AST::InjectedClassNameType::InjectedClassNameType(CppSharp::Pa : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::InjectedClassNameType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::InjectedClassNameType(arg0); } @@ -1148,6 +1190,8 @@ CppSharp::Parser::AST::DependentNameType::DependentNameType(CppSharp::Parser::AS : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::DependentNameType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::DependentNameType(arg0); } @@ -1184,6 +1228,8 @@ CppSharp::Parser::AST::PackExpansionType::PackExpansionType(CppSharp::Parser::AS : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::PackExpansionType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::PackExpansionType(arg0); } @@ -1220,6 +1266,8 @@ CppSharp::Parser::AST::BuiltinType::BuiltinType(CppSharp::Parser::AST::BuiltinTy : CppSharp::Parser::AST::Type((::CppSharp::CppParser::AST::Type*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::BuiltinType*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::BuiltinType(arg0); } @@ -1267,6 +1315,8 @@ CppSharp::Parser::AST::VTableComponent::VTableComponent() CppSharp::Parser::AST::VTableComponent::VTableComponent(CppSharp::Parser::AST::VTableComponent^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VTableComponent*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::VTableComponent(arg0); } @@ -1344,6 +1394,8 @@ CppSharp::Parser::AST::VTableLayout::VTableLayout() CppSharp::Parser::AST::VTableLayout::VTableLayout(CppSharp::Parser::AST::VTableLayout^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VTableLayout*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::VTableLayout(arg0); } @@ -1357,6 +1409,8 @@ CppSharp::Parser::AST::VTableComponent^ CppSharp::Parser::AST::VTableLayout::get void CppSharp::Parser::AST::VTableLayout::addComponents(CppSharp::Parser::AST::VTableComponent^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VTableComponent*)s->NativePtr; ((::CppSharp::CppParser::AST::VTableLayout*)NativePtr)->addComponents(arg0); } @@ -1415,6 +1469,8 @@ CppSharp::Parser::AST::VFTableInfo::VFTableInfo() CppSharp::Parser::AST::VFTableInfo::VFTableInfo(CppSharp::Parser::AST::VFTableInfo^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VFTableInfo*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::VFTableInfo(arg0); } @@ -1508,6 +1564,8 @@ CppSharp::Parser::AST::VFTableInfo^ CppSharp::Parser::AST::ClassLayout::getVFTab void CppSharp::Parser::AST::ClassLayout::addVFTables(CppSharp::Parser::AST::VFTableInfo^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VFTableInfo*)s->NativePtr; ((::CppSharp::CppParser::AST::ClassLayout*)NativePtr)->addVFTables(arg0); } @@ -1520,6 +1578,8 @@ void CppSharp::Parser::AST::ClassLayout::clearVFTables() CppSharp::Parser::AST::ClassLayout::ClassLayout(CppSharp::Parser::AST::ClassLayout^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ClassLayout*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ClassLayout(arg0); } @@ -1644,6 +1704,8 @@ CppSharp::Parser::AST::Declaration::Declaration(CppSharp::Parser::AST::Declarati CppSharp::Parser::AST::Declaration::Declaration(CppSharp::Parser::AST::Declaration^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Declaration*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Declaration(arg0); } @@ -1657,6 +1719,8 @@ CppSharp::Parser::AST::PreprocessedEntity^ CppSharp::Parser::AST::Declaration::g void CppSharp::Parser::AST::Declaration::addPreprocessedEntities(CppSharp::Parser::AST::PreprocessedEntity^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::PreprocessedEntity*)s->NativePtr; ((::CppSharp::CppParser::AST::Declaration*)NativePtr)->addPreprocessedEntities(arg0); } @@ -1870,6 +1934,8 @@ CppSharp::Parser::AST::Namespace^ CppSharp::Parser::AST::DeclarationContext::get void CppSharp::Parser::AST::DeclarationContext::addNamespaces(CppSharp::Parser::AST::Namespace^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Namespace*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addNamespaces(arg0); } @@ -1888,6 +1954,8 @@ CppSharp::Parser::AST::Enumeration^ CppSharp::Parser::AST::DeclarationContext::g void CppSharp::Parser::AST::DeclarationContext::addEnums(CppSharp::Parser::AST::Enumeration^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Enumeration*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addEnums(arg0); } @@ -1906,6 +1974,8 @@ CppSharp::Parser::AST::Function^ CppSharp::Parser::AST::DeclarationContext::getF void CppSharp::Parser::AST::DeclarationContext::addFunctions(CppSharp::Parser::AST::Function^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Function*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addFunctions(arg0); } @@ -1924,6 +1994,8 @@ CppSharp::Parser::AST::Class^ CppSharp::Parser::AST::DeclarationContext::getClas void CppSharp::Parser::AST::DeclarationContext::addClasses(CppSharp::Parser::AST::Class^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Class*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addClasses(arg0); } @@ -1942,6 +2014,8 @@ CppSharp::Parser::AST::Template^ CppSharp::Parser::AST::DeclarationContext::getT void CppSharp::Parser::AST::DeclarationContext::addTemplates(CppSharp::Parser::AST::Template^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Template*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addTemplates(arg0); } @@ -1960,6 +2034,8 @@ CppSharp::Parser::AST::TypedefDecl^ CppSharp::Parser::AST::DeclarationContext::g void CppSharp::Parser::AST::DeclarationContext::addTypedefs(CppSharp::Parser::AST::TypedefDecl^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::TypedefDecl*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addTypedefs(arg0); } @@ -1978,6 +2054,8 @@ CppSharp::Parser::AST::Variable^ CppSharp::Parser::AST::DeclarationContext::getV void CppSharp::Parser::AST::DeclarationContext::addVariables(CppSharp::Parser::AST::Variable^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Variable*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addVariables(arg0); } @@ -1996,6 +2074,8 @@ CppSharp::Parser::AST::Friend^ CppSharp::Parser::AST::DeclarationContext::getFri void CppSharp::Parser::AST::DeclarationContext::addFriends(CppSharp::Parser::AST::Friend^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Friend*)s->NativePtr; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addFriends(arg0); } @@ -2009,6 +2089,8 @@ CppSharp::Parser::AST::DeclarationContext::DeclarationContext(CppSharp::Parser:: : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::DeclarationContext*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::DeclarationContext(arg0); } @@ -2103,6 +2185,8 @@ CppSharp::Parser::AST::TypedefDecl::TypedefDecl(CppSharp::Parser::AST::TypedefDe : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TypedefDecl*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TypedefDecl(arg0); } @@ -2149,6 +2233,8 @@ CppSharp::Parser::AST::Friend::Friend(CppSharp::Parser::AST::Friend^ _0) : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Friend*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Friend(arg0); } @@ -2190,6 +2276,8 @@ CppSharp::Parser::AST::Statement::~Statement() CppSharp::Parser::AST::Statement::Statement(CppSharp::Parser::AST::Statement^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Statement*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Statement(arg0); } @@ -2263,6 +2351,8 @@ CppSharp::Parser::AST::Expression::Expression(CppSharp::Parser::AST::Expression^ : CppSharp::Parser::AST::Statement((::CppSharp::CppParser::AST::Statement*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Expression*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Expression(arg0); } @@ -2292,6 +2382,8 @@ CppSharp::Parser::AST::BinaryOperator::BinaryOperator(CppSharp::Parser::AST::Bin : CppSharp::Parser::AST::Expression((::CppSharp::CppParser::AST::Expression*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::BinaryOperator*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::BinaryOperator(arg0); } @@ -2360,6 +2452,8 @@ CppSharp::Parser::AST::Expression^ CppSharp::Parser::AST::CallExpr::getArguments void CppSharp::Parser::AST::CallExpr::addArguments(CppSharp::Parser::AST::Expression^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Expression*)s->NativePtr; ((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->addArguments(arg0); } @@ -2373,6 +2467,8 @@ CppSharp::Parser::AST::CallExpr::CallExpr(CppSharp::Parser::AST::CallExpr^ _0) : CppSharp::Parser::AST::Expression((::CppSharp::CppParser::AST::Expression*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::CallExpr*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::CallExpr(arg0); } @@ -2413,6 +2509,8 @@ CppSharp::Parser::AST::Expression^ CppSharp::Parser::AST::CXXConstructExpr::getA void CppSharp::Parser::AST::CXXConstructExpr::addArguments(CppSharp::Parser::AST::Expression^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Expression*)s->NativePtr; ((::CppSharp::CppParser::AST::CXXConstructExpr*)NativePtr)->addArguments(arg0); } @@ -2426,6 +2524,8 @@ CppSharp::Parser::AST::CXXConstructExpr::CXXConstructExpr(CppSharp::Parser::AST: : CppSharp::Parser::AST::Expression((::CppSharp::CppParser::AST::Expression*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::CXXConstructExpr*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::CXXConstructExpr(arg0); } @@ -2468,6 +2568,8 @@ CppSharp::Parser::AST::Parameter::Parameter(CppSharp::Parser::AST::Parameter^ _0 : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Parameter*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Parameter(arg0); } @@ -2559,6 +2661,8 @@ CppSharp::Parser::AST::Parameter^ CppSharp::Parser::AST::Function::getParameters void CppSharp::Parser::AST::Function::addParameters(CppSharp::Parser::AST::Parameter^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Parameter*)s->NativePtr; ((::CppSharp::CppParser::AST::Function*)NativePtr)->addParameters(arg0); } @@ -2572,6 +2676,8 @@ CppSharp::Parser::AST::Function::Function(CppSharp::Parser::AST::Function^ _0) : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Function*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Function(arg0); } @@ -2742,6 +2848,8 @@ CppSharp::Parser::AST::Method::Method(CppSharp::Parser::AST::Method^ _0) : CppSharp::Parser::AST::Function((::CppSharp::CppParser::AST::Function*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Method*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Method(arg0); } @@ -2898,6 +3006,8 @@ CppSharp::Parser::AST::Enumeration::Item::Item(CppSharp::Parser::AST::Enumeratio : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Enumeration::Item*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Enumeration::Item(arg0); } @@ -2963,6 +3073,8 @@ CppSharp::Parser::AST::Enumeration::Item^ CppSharp::Parser::AST::Enumeration::ge void CppSharp::Parser::AST::Enumeration::addItems(CppSharp::Parser::AST::Enumeration::Item^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Enumeration::Item*)s->NativePtr; ((::CppSharp::CppParser::AST::Enumeration*)NativePtr)->addItems(arg0); } @@ -2976,6 +3088,8 @@ CppSharp::Parser::AST::Enumeration::Enumeration(CppSharp::Parser::AST::Enumerati : CppSharp::Parser::AST::DeclarationContext((::CppSharp::CppParser::AST::DeclarationContext*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Enumeration*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Enumeration(arg0); } @@ -3048,6 +3162,8 @@ CppSharp::Parser::AST::Variable::Variable(CppSharp::Parser::AST::Variable^ _0) : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Variable*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Variable(arg0); } @@ -3109,6 +3225,8 @@ CppSharp::Parser::AST::BaseClassSpecifier::BaseClassSpecifier() CppSharp::Parser::AST::BaseClassSpecifier::BaseClassSpecifier(CppSharp::Parser::AST::BaseClassSpecifier^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::BaseClassSpecifier*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::BaseClassSpecifier(arg0); } @@ -3195,6 +3313,8 @@ CppSharp::Parser::AST::Field::Field(CppSharp::Parser::AST::Field^ _0) : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Field*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Field(arg0); } @@ -3281,6 +3401,8 @@ CppSharp::Parser::AST::AccessSpecifierDecl::AccessSpecifierDecl(CppSharp::Parser : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::AccessSpecifierDecl*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::AccessSpecifierDecl(arg0); } @@ -3322,6 +3444,8 @@ CppSharp::Parser::AST::BaseClassSpecifier^ CppSharp::Parser::AST::Class::getBase void CppSharp::Parser::AST::Class::addBases(CppSharp::Parser::AST::BaseClassSpecifier^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::BaseClassSpecifier*)s->NativePtr; ((::CppSharp::CppParser::AST::Class*)NativePtr)->addBases(arg0); } @@ -3340,6 +3464,8 @@ CppSharp::Parser::AST::Field^ CppSharp::Parser::AST::Class::getFields(unsigned i void CppSharp::Parser::AST::Class::addFields(CppSharp::Parser::AST::Field^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Field*)s->NativePtr; ((::CppSharp::CppParser::AST::Class*)NativePtr)->addFields(arg0); } @@ -3358,6 +3484,8 @@ CppSharp::Parser::AST::Method^ CppSharp::Parser::AST::Class::getMethods(unsigned void CppSharp::Parser::AST::Class::addMethods(CppSharp::Parser::AST::Method^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::Method*)s->NativePtr; ((::CppSharp::CppParser::AST::Class*)NativePtr)->addMethods(arg0); } @@ -3376,6 +3504,8 @@ CppSharp::Parser::AST::AccessSpecifierDecl^ CppSharp::Parser::AST::Class::getSpe void CppSharp::Parser::AST::Class::addSpecifiers(CppSharp::Parser::AST::AccessSpecifierDecl^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::AccessSpecifierDecl*)s->NativePtr; ((::CppSharp::CppParser::AST::Class*)NativePtr)->addSpecifiers(arg0); } @@ -3389,6 +3519,8 @@ CppSharp::Parser::AST::Class::Class(CppSharp::Parser::AST::Class^ _0) : CppSharp::Parser::AST::DeclarationContext((::CppSharp::CppParser::AST::DeclarationContext*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Class*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Class(arg0); } @@ -3562,6 +3694,8 @@ CppSharp::Parser::AST::TemplateParameter^ CppSharp::Parser::AST::Template::getPa void CppSharp::Parser::AST::Template::addParameters(CppSharp::Parser::AST::TemplateParameter^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateParameter*)s->NativePtr; ((::CppSharp::CppParser::AST::Template*)NativePtr)->addParameters(arg0); } @@ -3575,6 +3709,8 @@ CppSharp::Parser::AST::Template::Template(CppSharp::Parser::AST::Template^ _0) : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Template*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Template(arg0); } @@ -3632,6 +3768,8 @@ CppSharp::Parser::AST::ClassTemplateSpecialization^ CppSharp::Parser::AST::Class void CppSharp::Parser::AST::ClassTemplate::addSpecializations(CppSharp::Parser::AST::ClassTemplateSpecialization^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::ClassTemplateSpecialization*)s->NativePtr; ((::CppSharp::CppParser::AST::ClassTemplate*)NativePtr)->addSpecializations(arg0); } @@ -3645,6 +3783,8 @@ CppSharp::Parser::AST::ClassTemplate::ClassTemplate(CppSharp::Parser::AST::Class : CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ClassTemplate*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ClassTemplate(arg0); } @@ -3692,6 +3832,8 @@ CppSharp::Parser::AST::TemplateArgument^ CppSharp::Parser::AST::ClassTemplateSpe void CppSharp::Parser::AST::ClassTemplateSpecialization::addArguments(CppSharp::Parser::AST::TemplateArgument^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateArgument*)s->NativePtr; ((::CppSharp::CppParser::AST::ClassTemplateSpecialization*)NativePtr)->addArguments(arg0); } @@ -3705,6 +3847,8 @@ CppSharp::Parser::AST::ClassTemplateSpecialization::ClassTemplateSpecialization( : CppSharp::Parser::AST::Class((::CppSharp::CppParser::AST::Class*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ClassTemplateSpecialization*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ClassTemplateSpecialization(arg0); } @@ -3767,6 +3911,8 @@ CppSharp::Parser::AST::ClassTemplatePartialSpecialization::ClassTemplatePartialS : CppSharp::Parser::AST::ClassTemplateSpecialization((::CppSharp::CppParser::AST::ClassTemplateSpecialization*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization(arg0); } @@ -3808,6 +3954,8 @@ CppSharp::Parser::AST::FunctionTemplateSpecialization^ CppSharp::Parser::AST::Fu void CppSharp::Parser::AST::FunctionTemplate::addSpecializations(CppSharp::Parser::AST::FunctionTemplateSpecialization^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::FunctionTemplateSpecialization*)s->NativePtr; ((::CppSharp::CppParser::AST::FunctionTemplate*)NativePtr)->addSpecializations(arg0); } @@ -3821,6 +3969,8 @@ CppSharp::Parser::AST::FunctionTemplate::FunctionTemplate(CppSharp::Parser::AST: : CppSharp::Parser::AST::Template((::CppSharp::CppParser::AST::Template*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::FunctionTemplate*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::FunctionTemplate(arg0); } @@ -3870,6 +4020,8 @@ CppSharp::Parser::AST::TemplateArgument^ CppSharp::Parser::AST::FunctionTemplate void CppSharp::Parser::AST::FunctionTemplateSpecialization::addArguments(CppSharp::Parser::AST::TemplateArgument^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TemplateArgument*)s->NativePtr; ((::CppSharp::CppParser::AST::FunctionTemplateSpecialization*)NativePtr)->addArguments(arg0); } @@ -3882,6 +4034,8 @@ void CppSharp::Parser::AST::FunctionTemplateSpecialization::clearArguments() CppSharp::Parser::AST::FunctionTemplateSpecialization::FunctionTemplateSpecialization(CppSharp::Parser::AST::FunctionTemplateSpecialization^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::FunctionTemplateSpecialization*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::FunctionTemplateSpecialization(arg0); } @@ -3964,6 +4118,8 @@ CppSharp::Parser::AST::Namespace::Namespace(CppSharp::Parser::AST::Namespace^ _0 : CppSharp::Parser::AST::DeclarationContext((::CppSharp::CppParser::AST::DeclarationContext*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Namespace*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Namespace(arg0); } @@ -4010,6 +4166,8 @@ CppSharp::Parser::AST::PreprocessedEntity::PreprocessedEntity(CppSharp::Parser:: : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::PreprocessedEntity*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::PreprocessedEntity(arg0); } @@ -4056,6 +4214,8 @@ CppSharp::Parser::AST::MacroDefinition::MacroDefinition(CppSharp::Parser::AST::M : CppSharp::Parser::AST::PreprocessedEntity((::CppSharp::CppParser::AST::PreprocessedEntity*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::MacroDefinition*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::MacroDefinition(arg0); } @@ -4106,6 +4266,8 @@ CppSharp::Parser::AST::MacroExpansion::MacroExpansion(CppSharp::Parser::AST::Mac : CppSharp::Parser::AST::PreprocessedEntity((::CppSharp::CppParser::AST::PreprocessedEntity*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::MacroExpansion*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::MacroExpansion(arg0); } @@ -4171,6 +4333,8 @@ CppSharp::Parser::AST::MacroDefinition^ CppSharp::Parser::AST::TranslationUnit:: void CppSharp::Parser::AST::TranslationUnit::addMacros(CppSharp::Parser::AST::MacroDefinition^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::MacroDefinition*)s->NativePtr; ((::CppSharp::CppParser::AST::TranslationUnit*)NativePtr)->addMacros(arg0); } @@ -4184,6 +4348,8 @@ CppSharp::Parser::AST::TranslationUnit::TranslationUnit(CppSharp::Parser::AST::T : CppSharp::Parser::AST::Namespace((::CppSharp::CppParser::AST::Namespace*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TranslationUnit*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TranslationUnit(arg0); } @@ -4289,6 +4455,8 @@ void CppSharp::Parser::AST::NativeLibrary::clearDependencies() CppSharp::Parser::AST::NativeLibrary::NativeLibrary(CppSharp::Parser::AST::NativeLibrary^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::NativeLibrary*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::NativeLibrary(arg0); } @@ -4378,6 +4546,8 @@ CppSharp::Parser::AST::TranslationUnit^ CppSharp::Parser::AST::ASTContext::getTr void CppSharp::Parser::AST::ASTContext::addTranslationUnits(CppSharp::Parser::AST::TranslationUnit^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::TranslationUnit*)s->NativePtr; ((::CppSharp::CppParser::AST::ASTContext*)NativePtr)->addTranslationUnits(arg0); } @@ -4390,6 +4560,8 @@ void CppSharp::Parser::AST::ASTContext::clearTranslationUnits() CppSharp::Parser::AST::ASTContext::ASTContext(CppSharp::Parser::AST::ASTContext^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ASTContext*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ASTContext(arg0); } @@ -4444,6 +4616,8 @@ CppSharp::Parser::AST::Comment::Comment(CppSharp::Parser::AST::CommentKind kind) CppSharp::Parser::AST::Comment::Comment(CppSharp::Parser::AST::Comment^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::Comment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::Comment(arg0); } @@ -4508,6 +4682,8 @@ CppSharp::Parser::AST::BlockContentComment::BlockContentComment(CppSharp::Parser : CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::BlockContentComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::BlockContentComment(arg0); } @@ -4549,6 +4725,8 @@ CppSharp::Parser::AST::BlockContentComment^ CppSharp::Parser::AST::FullComment:: void CppSharp::Parser::AST::FullComment::addBlocks(CppSharp::Parser::AST::BlockContentComment^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::BlockContentComment*)s->NativePtr; ((::CppSharp::CppParser::AST::FullComment*)NativePtr)->addBlocks(arg0); } @@ -4562,6 +4740,8 @@ CppSharp::Parser::AST::FullComment::FullComment(CppSharp::Parser::AST::FullComme : CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::FullComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::FullComment(arg0); } @@ -4605,6 +4785,8 @@ CppSharp::Parser::AST::BlockCommandComment::Argument::Argument() CppSharp::Parser::AST::BlockCommandComment::Argument::Argument(CppSharp::Parser::AST::BlockCommandComment::Argument^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::BlockCommandComment::Argument*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::BlockCommandComment::Argument(arg0); } @@ -4678,6 +4860,8 @@ CppSharp::Parser::AST::BlockCommandComment::Argument^ CppSharp::Parser::AST::Blo void CppSharp::Parser::AST::BlockCommandComment::addArguments(CppSharp::Parser::AST::BlockCommandComment::Argument^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::BlockCommandComment::Argument*)s->NativePtr; ((::CppSharp::CppParser::AST::BlockCommandComment*)NativePtr)->addArguments(arg0); } @@ -4691,6 +4875,8 @@ CppSharp::Parser::AST::BlockCommandComment::BlockCommandComment(CppSharp::Parser : CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::BlockCommandComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::BlockCommandComment(arg0); } @@ -4743,6 +4929,8 @@ CppSharp::Parser::AST::ParamCommandComment::ParamCommandComment(CppSharp::Parser : CppSharp::Parser::AST::BlockCommandComment((::CppSharp::CppParser::AST::BlockCommandComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ParamCommandComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ParamCommandComment(arg0); } @@ -4817,6 +5005,8 @@ CppSharp::Parser::AST::TParamCommandComment::TParamCommandComment(CppSharp::Pars : CppSharp::Parser::AST::BlockCommandComment((::CppSharp::CppParser::AST::BlockCommandComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TParamCommandComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TParamCommandComment(arg0); } @@ -4859,6 +5049,8 @@ CppSharp::Parser::AST::VerbatimBlockLineComment::VerbatimBlockLineComment(CppSha : CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VerbatimBlockLineComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::VerbatimBlockLineComment(arg0); } @@ -4914,6 +5106,8 @@ CppSharp::Parser::AST::VerbatimBlockLineComment^ CppSharp::Parser::AST::Verbatim void CppSharp::Parser::AST::VerbatimBlockComment::addLines(CppSharp::Parser::AST::VerbatimBlockLineComment^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::VerbatimBlockLineComment*)s->NativePtr; ((::CppSharp::CppParser::AST::VerbatimBlockComment*)NativePtr)->addLines(arg0); } @@ -4927,6 +5121,8 @@ CppSharp::Parser::AST::VerbatimBlockComment::VerbatimBlockComment(CppSharp::Pars : CppSharp::Parser::AST::BlockCommandComment((::CppSharp::CppParser::AST::BlockCommandComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VerbatimBlockComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::VerbatimBlockComment(arg0); } @@ -4969,6 +5165,8 @@ CppSharp::Parser::AST::VerbatimLineComment::VerbatimLineComment(CppSharp::Parser : CppSharp::Parser::AST::BlockCommandComment((::CppSharp::CppParser::AST::BlockCommandComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::VerbatimLineComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::VerbatimLineComment(arg0); } @@ -5027,6 +5225,8 @@ CppSharp::Parser::AST::InlineContentComment::InlineContentComment(CppSharp::Pars : CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::InlineContentComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment(arg0); } @@ -5068,6 +5268,8 @@ CppSharp::Parser::AST::InlineContentComment^ CppSharp::Parser::AST::ParagraphCom void CppSharp::Parser::AST::ParagraphComment::addContent(CppSharp::Parser::AST::InlineContentComment^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto arg0 = (::CppSharp::CppParser::AST::InlineContentComment*)s->NativePtr; ((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->addContent(arg0); } @@ -5081,6 +5283,8 @@ CppSharp::Parser::AST::ParagraphComment::ParagraphComment(CppSharp::Parser::AST: : CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::ParagraphComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::ParagraphComment(arg0); } @@ -5134,6 +5338,8 @@ CppSharp::Parser::AST::InlineCommandComment::Argument::Argument() CppSharp::Parser::AST::InlineCommandComment::Argument::Argument(CppSharp::Parser::AST::InlineCommandComment::Argument^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::InlineCommandComment::Argument*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::InlineCommandComment::Argument(arg0); } @@ -5199,6 +5405,8 @@ CppSharp::Parser::AST::InlineCommandComment::Argument^ CppSharp::Parser::AST::In void CppSharp::Parser::AST::InlineCommandComment::addArguments(CppSharp::Parser::AST::InlineCommandComment::Argument^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::InlineCommandComment::Argument*)s->NativePtr; ((::CppSharp::CppParser::AST::InlineCommandComment*)NativePtr)->addArguments(arg0); } @@ -5212,6 +5420,8 @@ CppSharp::Parser::AST::InlineCommandComment::InlineCommandComment(CppSharp::Pars : CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::InlineCommandComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::InlineCommandComment(arg0); } @@ -5272,6 +5482,8 @@ CppSharp::Parser::AST::HTMLTagComment::HTMLTagComment(CppSharp::Parser::AST::HTM : CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::HTMLTagComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::HTMLTagComment(arg0); } @@ -5309,6 +5521,8 @@ CppSharp::Parser::AST::HTMLStartTagComment::Attribute::Attribute() CppSharp::Parser::AST::HTMLStartTagComment::Attribute::Attribute(CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute(arg0); } @@ -5388,6 +5602,8 @@ CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ CppSharp::Parser::AST::HT void CppSharp::Parser::AST::HTMLStartTagComment::addAttributes(CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute*)s->NativePtr; ((::CppSharp::CppParser::AST::HTMLStartTagComment*)NativePtr)->addAttributes(arg0); } @@ -5401,6 +5617,8 @@ CppSharp::Parser::AST::HTMLStartTagComment::HTMLStartTagComment(CppSharp::Parser : CppSharp::Parser::AST::HTMLTagComment((::CppSharp::CppParser::AST::HTMLTagComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::HTMLStartTagComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::HTMLStartTagComment(arg0); } @@ -5457,6 +5675,8 @@ CppSharp::Parser::AST::HTMLEndTagComment::HTMLEndTagComment(CppSharp::Parser::AS : CppSharp::Parser::AST::HTMLTagComment((::CppSharp::CppParser::AST::HTMLTagComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::HTMLEndTagComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::HTMLEndTagComment(arg0); } @@ -5507,6 +5727,8 @@ CppSharp::Parser::AST::TextComment::TextComment(CppSharp::Parser::AST::TextComme : CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*)nullptr) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::TextComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::TextComment(arg0); } @@ -5558,6 +5780,8 @@ CppSharp::Parser::AST::RawComment::RawComment() CppSharp::Parser::AST::RawComment::RawComment(CppSharp::Parser::AST::RawComment^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::AST::RawComment*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::AST::RawComment(arg0); } diff --git a/src/CppParser/Bindings/CLI/CppParser.cpp b/src/CppParser/Bindings/CLI/CppParser.cpp index bee61551..b854c1a6 100644 --- a/src/CppParser/Bindings/CLI/CppParser.cpp +++ b/src/CppParser/Bindings/CLI/CppParser.cpp @@ -152,6 +152,8 @@ void CppSharp::Parser::ParserOptions::clearLibraryDirs() CppSharp::Parser::ParserOptions::ParserOptions(CppSharp::Parser::ParserOptions^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::ParserOptions*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::ParserOptions(arg0); } @@ -353,6 +355,8 @@ CppSharp::Parser::ParserDiagnostic::ParserDiagnostic() CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(CppSharp::Parser::ParserDiagnostic^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::ParserDiagnostic*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::ParserDiagnostic(arg0); } @@ -458,6 +462,8 @@ CppSharp::Parser::ParserResult::ParserResult() CppSharp::Parser::ParserResult::ParserResult(CppSharp::Parser::ParserResult^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::ParserResult*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::ParserResult(arg0); } @@ -471,6 +477,8 @@ CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserResult::getDiagnosti void CppSharp::Parser::ParserResult::addDiagnostics(CppSharp::Parser::ParserDiagnostic^ s) { + if (ReferenceEquals(s, nullptr)) + throw gcnew ::System::ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::ParserDiagnostic*)s->NativePtr; ((::CppSharp::CppParser::ParserResult*)NativePtr)->addDiagnostics(arg0); } @@ -583,6 +591,8 @@ CppSharp::Parser::ClangParser::ClangParser() CppSharp::Parser::ClangParser::ClangParser(CppSharp::Parser::ClangParser^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::ClangParser*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::ClangParser(arg0); } diff --git a/src/CppParser/Bindings/CLI/Target.cpp b/src/CppParser/Bindings/CLI/Target.cpp index 9cd160f9..f41e0a28 100644 --- a/src/CppParser/Bindings/CLI/Target.cpp +++ b/src/CppParser/Bindings/CLI/Target.cpp @@ -36,6 +36,8 @@ CppSharp::Parser::ParserTargetInfo::ParserTargetInfo() CppSharp::Parser::ParserTargetInfo::ParserTargetInfo(CppSharp::Parser::ParserTargetInfo^ _0) { __ownsNativeInstance = true; + if (ReferenceEquals(_0, nullptr)) + throw gcnew ::System::ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); auto &arg0 = *(::CppSharp::CppParser::ParserTargetInfo*)_0->NativePtr; NativePtr = new ::CppSharp::CppParser::ParserTargetInfo(arg0); } diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs index 5846702f..370c19c7 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs @@ -319,7 +319,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -691,7 +693,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -804,7 +808,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -962,7 +968,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -979,7 +987,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -1108,7 +1118,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1212,7 +1224,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1303,7 +1317,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1402,7 +1418,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1512,7 +1530,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1825,7 +1845,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -1838,7 +1860,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -1985,7 +2009,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2151,7 +2177,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(36); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2281,7 +2309,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2375,7 +2405,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2486,7 +2518,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2561,7 +2595,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2639,7 +2675,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2890,7 +2928,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2919,7 +2959,9 @@ namespace CppSharp public void addComponents(CppSharp.Parser.AST.VTableComponent s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addComponents_0((__Instance + __PointerAdjustment), arg0); } @@ -3023,7 +3065,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3210,7 +3254,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -3239,7 +3285,9 @@ namespace CppSharp public void addVFTables(CppSharp.Parser.AST.VFTableInfo s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVFTables_0((__Instance + __PointerAdjustment), arg0); } @@ -3499,7 +3547,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(92); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3532,7 +3582,9 @@ namespace CppSharp public void addPreprocessedEntities(CppSharp.Parser.AST.PreprocessedEntity s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addPreprocessedEntities_0((__Instance + __PointerAdjustment), arg0); } @@ -4023,7 +4075,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(204); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4040,7 +4094,9 @@ namespace CppSharp public void addNamespaces(CppSharp.Parser.AST.Namespace s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addNamespaces_0((__Instance + __PointerAdjustment), arg0); } @@ -4062,7 +4118,9 @@ namespace CppSharp public void addEnums(CppSharp.Parser.AST.Enumeration s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addEnums_0((__Instance + __PointerAdjustment), arg0); } @@ -4084,7 +4142,9 @@ namespace CppSharp public void addFunctions(CppSharp.Parser.AST.Function s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFunctions_0((__Instance + __PointerAdjustment), arg0); } @@ -4106,7 +4166,9 @@ namespace CppSharp public void addClasses(CppSharp.Parser.AST.Class s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addClasses_0((__Instance + __PointerAdjustment), arg0); } @@ -4128,7 +4190,9 @@ namespace CppSharp public void addTemplates(CppSharp.Parser.AST.Template s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTemplates_0((__Instance + __PointerAdjustment), arg0); } @@ -4150,7 +4214,9 @@ namespace CppSharp public void addTypedefs(CppSharp.Parser.AST.TypedefDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTypedefs_0((__Instance + __PointerAdjustment), arg0); } @@ -4172,7 +4238,9 @@ namespace CppSharp public void addVariables(CppSharp.Parser.AST.Variable s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVariables_0((__Instance + __PointerAdjustment), arg0); } @@ -4194,7 +4262,9 @@ namespace CppSharp public void addFriends(CppSharp.Parser.AST.Friend s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFriends_0((__Instance + __PointerAdjustment), arg0); } @@ -4397,7 +4467,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(100); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4523,7 +4595,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(96); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4622,7 +4696,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4751,7 +4827,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -4776,7 +4854,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST14BinaryOperatorC2ERKS2_")] - internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, @@ -4807,7 +4885,7 @@ namespace CppSharp private static BinaryOperator.Internal* __CopyValue(BinaryOperator.Internal native) { var ret = Marshal.AllocHGlobal(40); - CppSharp.Parser.AST.BinaryOperator.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.BinaryOperator.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (BinaryOperator.Internal*) ret; } @@ -4833,8 +4911,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public string OpcodeStr @@ -4904,7 +4984,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST8CallExprC2ERKS2_")] - internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, @@ -4945,7 +5025,7 @@ namespace CppSharp private static CallExpr.Internal* __CopyValue(CallExpr.Internal native) { var ret = Marshal.AllocHGlobal(32); - CppSharp.Parser.AST.CallExpr.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.CallExpr.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (CallExpr.Internal*) ret; } @@ -4971,8 +5051,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public CppSharp.Parser.AST.Expression getArguments(uint i) @@ -4988,7 +5070,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5021,7 +5105,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST16CXXConstructExprC2ERKS2_")] - internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, @@ -5062,7 +5146,7 @@ namespace CppSharp private static CXXConstructExpr.Internal* __CopyValue(CXXConstructExpr.Internal native) { var ret = Marshal.AllocHGlobal(32); - CppSharp.Parser.AST.CXXConstructExpr.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.CXXConstructExpr.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (CXXConstructExpr.Internal*) ret; } @@ -5088,8 +5172,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public CppSharp.Parser.AST.Expression getArguments(uint i) @@ -5105,7 +5191,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5244,7 +5332,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(112); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -5494,7 +5584,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(156); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -5511,7 +5603,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -5868,7 +5962,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(184); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6249,7 +6345,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(112); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6331,7 +6429,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(228); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -6344,7 +6444,9 @@ namespace CppSharp public void addItems(CppSharp.Parser.AST.Enumeration.Item s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addItems_0((__Instance + __PointerAdjustment), arg0); } @@ -6530,7 +6632,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(112); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -6840,7 +6944,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(116); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -7020,7 +7126,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(92); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -7243,7 +7351,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(268); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -7260,7 +7370,9 @@ namespace CppSharp public void addBases(CppSharp.Parser.AST.BaseClassSpecifier s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBases_0((__Instance + __PointerAdjustment), arg0); } @@ -7282,7 +7394,9 @@ namespace CppSharp public void addFields(CppSharp.Parser.AST.Field s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFields_0((__Instance + __PointerAdjustment), arg0); } @@ -7304,7 +7418,9 @@ namespace CppSharp public void addMethods(CppSharp.Parser.AST.Method s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMethods_0((__Instance + __PointerAdjustment), arg0); } @@ -7326,7 +7442,9 @@ namespace CppSharp public void addSpecifiers(CppSharp.Parser.AST.AccessSpecifierDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecifiers_0((__Instance + __PointerAdjustment), arg0); } @@ -7650,7 +7768,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(108); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_3((__Instance + __PointerAdjustment), arg0); } @@ -7663,7 +7783,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.TemplateParameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -7828,7 +7950,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(120); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -7845,7 +7969,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.ClassTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8028,7 +8154,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(288); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8041,7 +8169,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8235,7 +8365,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(288); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -8368,7 +8500,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(120); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8385,7 +8519,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.FunctionTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8506,7 +8642,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8535,7 +8673,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8714,7 +8854,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(204); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -8840,7 +8982,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(96); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8976,7 +9120,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(108); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9118,7 +9264,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(112); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9301,7 +9449,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(232); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9318,7 +9468,9 @@ namespace CppSharp public void addMacros(CppSharp.Parser.AST.MacroDefinition s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMacros_0((__Instance + __PointerAdjustment), arg0); } @@ -9492,7 +9644,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9689,7 +9843,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9722,7 +9878,9 @@ namespace CppSharp public void addTranslationUnits(CppSharp.Parser.AST.TranslationUnit s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTranslationUnits_0((__Instance + __PointerAdjustment), arg0); } @@ -10023,7 +10181,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10040,7 +10200,9 @@ namespace CppSharp public void addBlocks(CppSharp.Parser.AST.BlockContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBlocks_0((__Instance + __PointerAdjustment), arg0); } @@ -10194,7 +10356,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10289,7 +10453,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_3((__Instance + __PointerAdjustment), arg0); } @@ -10302,7 +10468,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.BlockCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -10422,7 +10590,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -10548,7 +10718,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10664,7 +10836,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10780,7 +10954,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10797,7 +10973,9 @@ namespace CppSharp public void addLines(CppSharp.Parser.AST.VerbatimBlockLineComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addLines_0((__Instance + __PointerAdjustment), arg0); } @@ -10901,7 +11079,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11103,7 +11283,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11120,7 +11302,9 @@ namespace CppSharp public void addContent(CppSharp.Parser.AST.InlineContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addContent_0((__Instance + __PointerAdjustment), arg0); } @@ -11290,7 +11474,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11375,7 +11561,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11388,7 +11576,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.InlineCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -11653,7 +11843,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11754,7 +11946,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11767,7 +11961,9 @@ namespace CppSharp public void addAttributes(CppSharp.Parser.AST.HTMLStartTagComment.Attribute s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addAttributes_0((__Instance + __PointerAdjustment), arg0); } @@ -11884,7 +12080,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11987,7 +12185,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -12107,7 +12307,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs index 35a34e5d..60f98d5f 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs @@ -285,7 +285,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(120); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -729,7 +731,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(36); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -926,7 +930,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -955,7 +961,9 @@ namespace CppSharp public void addDiagnostics(CppSharp.Parser.ParserDiagnostic s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addDiagnostics_0((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs index fa095288..0d8c5fe0 100644 --- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs +++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs @@ -222,7 +222,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(164); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs index 2ced5dc9..fc8b9462 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs @@ -319,7 +319,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -691,7 +693,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -804,7 +808,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -962,7 +968,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -979,7 +987,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -1108,7 +1118,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1212,7 +1224,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1303,7 +1317,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1402,7 +1418,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1512,7 +1530,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1825,7 +1845,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -1838,7 +1860,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -1985,7 +2009,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2151,7 +2177,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2281,7 +2309,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2375,7 +2405,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2486,7 +2518,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2561,7 +2595,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2639,7 +2675,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2890,7 +2928,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2919,7 +2959,9 @@ namespace CppSharp public void addComponents(CppSharp.Parser.AST.VTableComponent s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addComponents_0((__Instance + __PointerAdjustment), arg0); } @@ -3023,7 +3065,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3210,7 +3254,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -3239,7 +3285,9 @@ namespace CppSharp public void addVFTables(CppSharp.Parser.AST.VFTableInfo s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVFTables_0((__Instance + __PointerAdjustment), arg0); } @@ -3499,7 +3547,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(128); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3532,7 +3582,9 @@ namespace CppSharp public void addPreprocessedEntities(CppSharp.Parser.AST.PreprocessedEntity s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addPreprocessedEntities_0((__Instance + __PointerAdjustment), arg0); } @@ -4023,7 +4075,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(236); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4040,7 +4094,9 @@ namespace CppSharp public void addNamespaces(CppSharp.Parser.AST.Namespace s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addNamespaces_0((__Instance + __PointerAdjustment), arg0); } @@ -4062,7 +4118,9 @@ namespace CppSharp public void addEnums(CppSharp.Parser.AST.Enumeration s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addEnums_0((__Instance + __PointerAdjustment), arg0); } @@ -4084,7 +4142,9 @@ namespace CppSharp public void addFunctions(CppSharp.Parser.AST.Function s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFunctions_0((__Instance + __PointerAdjustment), arg0); } @@ -4106,7 +4166,9 @@ namespace CppSharp public void addClasses(CppSharp.Parser.AST.Class s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addClasses_0((__Instance + __PointerAdjustment), arg0); } @@ -4128,7 +4190,9 @@ namespace CppSharp public void addTemplates(CppSharp.Parser.AST.Template s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTemplates_0((__Instance + __PointerAdjustment), arg0); } @@ -4150,7 +4214,9 @@ namespace CppSharp public void addTypedefs(CppSharp.Parser.AST.TypedefDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTypedefs_0((__Instance + __PointerAdjustment), arg0); } @@ -4172,7 +4238,9 @@ namespace CppSharp public void addVariables(CppSharp.Parser.AST.Variable s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVariables_0((__Instance + __PointerAdjustment), arg0); } @@ -4194,7 +4262,9 @@ namespace CppSharp public void addFriends(CppSharp.Parser.AST.Friend s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFriends_0((__Instance + __PointerAdjustment), arg0); } @@ -4397,7 +4467,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(136); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4523,7 +4595,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(132); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4622,7 +4696,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4751,7 +4827,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -4776,7 +4854,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, EntryPoint="??0BinaryOperator@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")] - internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, @@ -4807,7 +4885,7 @@ namespace CppSharp private static BinaryOperator.Internal* __CopyValue(BinaryOperator.Internal native) { var ret = Marshal.AllocHGlobal(64); - CppSharp.Parser.AST.BinaryOperator.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.BinaryOperator.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (BinaryOperator.Internal*) ret; } @@ -4833,8 +4911,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(64); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public string OpcodeStr @@ -4904,7 +4984,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, EntryPoint="??0CallExpr@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")] - internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, @@ -4945,7 +5025,7 @@ namespace CppSharp private static CallExpr.Internal* __CopyValue(CallExpr.Internal native) { var ret = Marshal.AllocHGlobal(44); - CppSharp.Parser.AST.CallExpr.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.CallExpr.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (CallExpr.Internal*) ret; } @@ -4971,8 +5051,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(44); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public CppSharp.Parser.AST.Expression getArguments(uint i) @@ -4988,7 +5070,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5021,7 +5105,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, EntryPoint="??0CXXConstructExpr@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")] - internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, @@ -5062,7 +5146,7 @@ namespace CppSharp private static CXXConstructExpr.Internal* __CopyValue(CXXConstructExpr.Internal native) { var ret = Marshal.AllocHGlobal(44); - CppSharp.Parser.AST.CXXConstructExpr.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.CXXConstructExpr.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (CXXConstructExpr.Internal*) ret; } @@ -5088,8 +5172,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(44); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public CppSharp.Parser.AST.Expression getArguments(uint i) @@ -5105,7 +5191,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5244,7 +5332,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(148); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -5494,7 +5584,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(216); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -5511,7 +5603,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -5868,7 +5962,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(244); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6249,7 +6345,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(160); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6331,7 +6429,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(260); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -6344,7 +6444,9 @@ namespace CppSharp public void addItems(CppSharp.Parser.AST.Enumeration.Item s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addItems_0((__Instance + __PointerAdjustment), arg0); } @@ -6530,7 +6632,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(160); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -6840,7 +6944,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(152); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -7020,7 +7126,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(128); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -7243,7 +7351,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(300); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -7260,7 +7370,9 @@ namespace CppSharp public void addBases(CppSharp.Parser.AST.BaseClassSpecifier s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBases_0((__Instance + __PointerAdjustment), arg0); } @@ -7282,7 +7394,9 @@ namespace CppSharp public void addFields(CppSharp.Parser.AST.Field s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFields_0((__Instance + __PointerAdjustment), arg0); } @@ -7304,7 +7418,9 @@ namespace CppSharp public void addMethods(CppSharp.Parser.AST.Method s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMethods_0((__Instance + __PointerAdjustment), arg0); } @@ -7326,7 +7442,9 @@ namespace CppSharp public void addSpecifiers(CppSharp.Parser.AST.AccessSpecifierDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecifiers_0((__Instance + __PointerAdjustment), arg0); } @@ -7650,7 +7768,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(144); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_3((__Instance + __PointerAdjustment), arg0); } @@ -7663,7 +7783,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.TemplateParameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -7828,7 +7950,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(156); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -7845,7 +7969,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.ClassTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8028,7 +8154,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(320); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8041,7 +8169,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8235,7 +8365,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(320); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -8368,7 +8500,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(156); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8385,7 +8519,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.FunctionTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8506,7 +8642,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8535,7 +8673,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8714,7 +8854,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(240); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -8840,7 +8982,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(132); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8976,7 +9120,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(156); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9118,7 +9264,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(160); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9301,7 +9449,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(280); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9318,7 +9468,9 @@ namespace CppSharp public void addMacros(CppSharp.Parser.AST.MacroDefinition s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMacros_0((__Instance + __PointerAdjustment), arg0); } @@ -9492,7 +9644,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(52); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9689,7 +9843,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9722,7 +9878,9 @@ namespace CppSharp public void addTranslationUnits(CppSharp.Parser.AST.TranslationUnit s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTranslationUnits_0((__Instance + __PointerAdjustment), arg0); } @@ -10023,7 +10181,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10040,7 +10200,9 @@ namespace CppSharp public void addBlocks(CppSharp.Parser.AST.BlockContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBlocks_0((__Instance + __PointerAdjustment), arg0); } @@ -10194,7 +10356,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10289,7 +10453,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_3((__Instance + __PointerAdjustment), arg0); } @@ -10302,7 +10468,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.BlockCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -10422,7 +10590,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -10548,7 +10718,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10664,7 +10836,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10780,7 +10954,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10797,7 +10973,9 @@ namespace CppSharp public void addLines(CppSharp.Parser.AST.VerbatimBlockLineComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addLines_0((__Instance + __PointerAdjustment), arg0); } @@ -10901,7 +11079,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(44); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11103,7 +11283,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11120,7 +11302,9 @@ namespace CppSharp public void addContent(CppSharp.Parser.AST.InlineContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addContent_0((__Instance + __PointerAdjustment), arg0); } @@ -11290,7 +11474,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11375,7 +11561,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(20); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11388,7 +11576,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.InlineCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -11653,7 +11843,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11754,7 +11946,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11767,7 +11961,9 @@ namespace CppSharp public void addAttributes(CppSharp.Parser.AST.HTMLStartTagComment.Attribute s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addAttributes_0((__Instance + __PointerAdjustment), arg0); } @@ -11884,7 +12080,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11987,7 +12185,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -12107,7 +12307,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs index 76226562..d2695da1 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs @@ -285,7 +285,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(144); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -729,7 +731,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(60); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -926,7 +930,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(28); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -955,7 +961,9 @@ namespace CppSharp public void addDiagnostics(CppSharp.Parser.ParserDiagnostic s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addDiagnostics_0((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs index 707a7abb..ed5537bb 100644 --- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs +++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs @@ -222,7 +222,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(176); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs index 7c9696d7..1f589c17 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs @@ -319,7 +319,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -691,7 +693,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -804,7 +808,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -962,7 +968,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -979,7 +987,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -1108,7 +1118,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1212,7 +1224,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1303,7 +1317,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1402,7 +1418,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1512,7 +1530,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1825,7 +1845,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -1838,7 +1860,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -1985,7 +2009,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2151,7 +2177,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2281,7 +2309,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2375,7 +2405,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2486,7 +2518,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2561,7 +2595,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2639,7 +2675,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2890,7 +2928,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2918,7 +2958,9 @@ namespace CppSharp public void addComponents(CppSharp.Parser.AST.VTableComponent s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addComponents_0((__Instance + __PointerAdjustment), arg0); } @@ -3022,7 +3064,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3209,7 +3253,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(88); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -3238,7 +3284,9 @@ namespace CppSharp public void addVFTables(CppSharp.Parser.AST.VFTableInfo s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVFTables_0((__Instance + __PointerAdjustment), arg0); } @@ -3498,7 +3546,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(168); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3531,7 +3581,9 @@ namespace CppSharp public void addPreprocessedEntities(CppSharp.Parser.AST.PreprocessedEntity s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addPreprocessedEntities_0((__Instance + __PointerAdjustment), arg0); } @@ -4022,7 +4074,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(392); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4039,7 +4093,9 @@ namespace CppSharp public void addNamespaces(CppSharp.Parser.AST.Namespace s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addNamespaces_0((__Instance + __PointerAdjustment), arg0); } @@ -4061,7 +4117,9 @@ namespace CppSharp public void addEnums(CppSharp.Parser.AST.Enumeration s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addEnums_0((__Instance + __PointerAdjustment), arg0); } @@ -4083,7 +4141,9 @@ namespace CppSharp public void addFunctions(CppSharp.Parser.AST.Function s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFunctions_0((__Instance + __PointerAdjustment), arg0); } @@ -4105,7 +4165,9 @@ namespace CppSharp public void addClasses(CppSharp.Parser.AST.Class s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addClasses_0((__Instance + __PointerAdjustment), arg0); } @@ -4127,7 +4189,9 @@ namespace CppSharp public void addTemplates(CppSharp.Parser.AST.Template s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTemplates_0((__Instance + __PointerAdjustment), arg0); } @@ -4149,7 +4213,9 @@ namespace CppSharp public void addTypedefs(CppSharp.Parser.AST.TypedefDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTypedefs_0((__Instance + __PointerAdjustment), arg0); } @@ -4171,7 +4237,9 @@ namespace CppSharp public void addVariables(CppSharp.Parser.AST.Variable s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVariables_0((__Instance + __PointerAdjustment), arg0); } @@ -4193,7 +4261,9 @@ namespace CppSharp public void addFriends(CppSharp.Parser.AST.Friend s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFriends_0((__Instance + __PointerAdjustment), arg0); } @@ -4396,7 +4466,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(184); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4522,7 +4594,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(176); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4621,7 +4695,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -4750,7 +4826,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -4775,7 +4853,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST14BinaryOperatorC2ERKS2_")] - internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, @@ -4806,7 +4884,7 @@ namespace CppSharp private static BinaryOperator.Internal* __CopyValue(BinaryOperator.Internal native) { var ret = Marshal.AllocHGlobal(80); - CppSharp.Parser.AST.BinaryOperator.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.BinaryOperator.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (BinaryOperator.Internal*) ret; } @@ -4832,8 +4910,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(80); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public string OpcodeStr @@ -4903,7 +4983,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST8CallExprC2ERKS2_")] - internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, @@ -4944,7 +5024,7 @@ namespace CppSharp private static CallExpr.Internal* __CopyValue(CallExpr.Internal native) { var ret = Marshal.AllocHGlobal(64); - CppSharp.Parser.AST.CallExpr.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.CallExpr.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (CallExpr.Internal*) ret; } @@ -4970,8 +5050,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(64); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public CppSharp.Parser.AST.Expression getArguments(uint i) @@ -4987,7 +5069,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5020,7 +5104,7 @@ namespace CppSharp [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST16CXXConstructExprC2ERKS2_")] - internal static extern void cctor_2(global::System.IntPtr instance, global::System.IntPtr _0); + internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0); [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, @@ -5061,7 +5145,7 @@ namespace CppSharp private static CXXConstructExpr.Internal* __CopyValue(CXXConstructExpr.Internal native) { var ret = Marshal.AllocHGlobal(64); - CppSharp.Parser.AST.CXXConstructExpr.Internal.cctor_2(ret, new global::System.IntPtr(&native)); + CppSharp.Parser.AST.CXXConstructExpr.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (CXXConstructExpr.Internal*) ret; } @@ -5087,8 +5171,10 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(64); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; - Internal.cctor_2((__Instance + __PointerAdjustment), arg0); + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; + Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } public CppSharp.Parser.AST.Expression getArguments(uint i) @@ -5104,7 +5190,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5243,7 +5331,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(200); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -5493,7 +5583,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(288); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -5510,7 +5602,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -5867,7 +5961,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(328); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6248,7 +6344,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(200); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6330,7 +6428,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(432); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -6343,7 +6443,9 @@ namespace CppSharp public void addItems(CppSharp.Parser.AST.Enumeration.Item s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addItems_0((__Instance + __PointerAdjustment), arg0); } @@ -6529,7 +6631,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(208); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -6839,7 +6943,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(208); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -7019,7 +7125,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(168); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -7242,7 +7350,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(512); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -7259,7 +7369,9 @@ namespace CppSharp public void addBases(CppSharp.Parser.AST.BaseClassSpecifier s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBases_0((__Instance + __PointerAdjustment), arg0); } @@ -7281,7 +7393,9 @@ namespace CppSharp public void addFields(CppSharp.Parser.AST.Field s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFields_0((__Instance + __PointerAdjustment), arg0); } @@ -7303,7 +7417,9 @@ namespace CppSharp public void addMethods(CppSharp.Parser.AST.Method s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMethods_0((__Instance + __PointerAdjustment), arg0); } @@ -7325,7 +7441,9 @@ namespace CppSharp public void addSpecifiers(CppSharp.Parser.AST.AccessSpecifierDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecifiers_0((__Instance + __PointerAdjustment), arg0); } @@ -7649,7 +7767,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(200); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_3((__Instance + __PointerAdjustment), arg0); } @@ -7662,7 +7782,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.TemplateParameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -7827,7 +7949,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(224); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -7844,7 +7968,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.ClassTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8027,7 +8153,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(552); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8040,7 +8168,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8234,7 +8364,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(552); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -8367,7 +8499,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(224); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8384,7 +8518,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.FunctionTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8505,7 +8641,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8534,7 +8672,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8713,7 +8853,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(392); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -8839,7 +8981,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(176); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8975,7 +9119,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(200); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9117,7 +9263,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(208); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9300,7 +9448,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(448); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9317,7 +9467,9 @@ namespace CppSharp public void addMacros(CppSharp.Parser.AST.MacroDefinition s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMacros_0((__Instance + __PointerAdjustment), arg0); } @@ -9491,7 +9643,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(80); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9688,7 +9842,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9721,7 +9877,9 @@ namespace CppSharp public void addTranslationUnits(CppSharp.Parser.AST.TranslationUnit s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTranslationUnits_0((__Instance + __PointerAdjustment), arg0); } @@ -10022,7 +10180,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10039,7 +10199,9 @@ namespace CppSharp public void addBlocks(CppSharp.Parser.AST.BlockContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBlocks_0((__Instance + __PointerAdjustment), arg0); } @@ -10193,7 +10355,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10288,7 +10452,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_3((__Instance + __PointerAdjustment), arg0); } @@ -10301,7 +10467,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.BlockCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -10421,7 +10589,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -10547,7 +10717,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10663,7 +10835,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10779,7 +10953,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10796,7 +10972,9 @@ namespace CppSharp public void addLines(CppSharp.Parser.AST.VerbatimBlockLineComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addLines_0((__Instance + __PointerAdjustment), arg0); } @@ -10900,7 +11078,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11102,7 +11282,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11119,7 +11301,9 @@ namespace CppSharp public void addContent(CppSharp.Parser.AST.InlineContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addContent_0((__Instance + __PointerAdjustment), arg0); } @@ -11289,7 +11473,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11374,7 +11560,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11387,7 +11575,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.InlineCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -11652,7 +11842,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11753,7 +11945,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11766,7 +11960,9 @@ namespace CppSharp public void addAttributes(CppSharp.Parser.AST.HTMLStartTagComment.Attribute s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addAttributes_0((__Instance + __PointerAdjustment), arg0); } @@ -11883,7 +12079,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11986,7 +12184,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -12106,7 +12306,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(64); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs index 1ffc7a7a..c52af50c 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs @@ -285,7 +285,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(232); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -729,7 +731,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(64); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -926,7 +930,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -955,7 +961,9 @@ namespace CppSharp public void addDiagnostics(CppSharp.Parser.ParserDiagnostic s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addDiagnostics_0((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs index dace0769..540ee9dd 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs @@ -222,7 +222,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(176); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs index f52bfb29..affa294a 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs @@ -319,7 +319,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -691,7 +693,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -804,7 +808,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -962,7 +968,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -979,7 +987,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -1108,7 +1118,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1212,7 +1224,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1303,7 +1317,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1402,7 +1418,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1512,7 +1530,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -1825,7 +1845,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -1838,7 +1860,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -1985,7 +2009,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2151,7 +2177,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2281,7 +2309,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2375,7 +2405,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2486,7 +2518,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2561,7 +2595,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } } @@ -2639,7 +2675,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(12); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -2890,7 +2928,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -2918,7 +2958,9 @@ namespace CppSharp public void addComponents(CppSharp.Parser.AST.VTableComponent s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addComponents_0((__Instance + __PointerAdjustment), arg0); } @@ -3022,7 +3064,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3209,7 +3253,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(88); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -3238,7 +3284,9 @@ namespace CppSharp public void addVFTables(CppSharp.Parser.AST.VFTableInfo s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVFTables_0((__Instance + __PointerAdjustment), arg0); } @@ -3498,7 +3546,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(120); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -3531,7 +3581,9 @@ namespace CppSharp public void addPreprocessedEntities(CppSharp.Parser.AST.PreprocessedEntity s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addPreprocessedEntities_0((__Instance + __PointerAdjustment), arg0); } @@ -4022,7 +4074,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(368); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -4039,7 +4093,9 @@ namespace CppSharp public void addNamespaces(CppSharp.Parser.AST.Namespace s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addNamespaces_0((__Instance + __PointerAdjustment), arg0); } @@ -4061,7 +4117,9 @@ namespace CppSharp public void addEnums(CppSharp.Parser.AST.Enumeration s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addEnums_0((__Instance + __PointerAdjustment), arg0); } @@ -4083,7 +4141,9 @@ namespace CppSharp public void addFunctions(CppSharp.Parser.AST.Function s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFunctions_0((__Instance + __PointerAdjustment), arg0); } @@ -4105,7 +4165,9 @@ namespace CppSharp public void addClasses(CppSharp.Parser.AST.Class s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addClasses_0((__Instance + __PointerAdjustment), arg0); } @@ -4127,7 +4189,9 @@ namespace CppSharp public void addTemplates(CppSharp.Parser.AST.Template s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTemplates_0((__Instance + __PointerAdjustment), arg0); } @@ -4149,7 +4213,9 @@ namespace CppSharp public void addTypedefs(CppSharp.Parser.AST.TypedefDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTypedefs_0((__Instance + __PointerAdjustment), arg0); } @@ -4171,7 +4237,9 @@ namespace CppSharp public void addVariables(CppSharp.Parser.AST.Variable s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addVariables_0((__Instance + __PointerAdjustment), arg0); } @@ -4193,7 +4261,9 @@ namespace CppSharp public void addFriends(CppSharp.Parser.AST.Friend s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFriends_0((__Instance + __PointerAdjustment), arg0); } @@ -4396,7 +4466,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(136); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -4522,7 +4594,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(128); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -4621,7 +4695,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -4750,7 +4826,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -4832,7 +4910,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -4970,7 +5050,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -4987,7 +5069,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5087,7 +5171,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -5104,7 +5190,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.Expression s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -5243,7 +5331,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(152); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -5493,7 +5583,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(208); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -5510,7 +5602,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.Parameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -5867,7 +5961,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(248); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6248,7 +6344,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(136); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6330,7 +6428,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(408); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6343,7 +6443,9 @@ namespace CppSharp public void addItems(CppSharp.Parser.AST.Enumeration.Item s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addItems_0((__Instance + __PointerAdjustment), arg0); } @@ -6529,7 +6631,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(144); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -6839,7 +6943,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(160); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -7019,7 +7125,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(120); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -7242,7 +7350,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(488); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -7259,7 +7369,9 @@ namespace CppSharp public void addBases(CppSharp.Parser.AST.BaseClassSpecifier s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBases_0((__Instance + __PointerAdjustment), arg0); } @@ -7281,7 +7393,9 @@ namespace CppSharp public void addFields(CppSharp.Parser.AST.Field s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addFields_0((__Instance + __PointerAdjustment), arg0); } @@ -7303,7 +7417,9 @@ namespace CppSharp public void addMethods(CppSharp.Parser.AST.Method s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMethods_0((__Instance + __PointerAdjustment), arg0); } @@ -7325,7 +7441,9 @@ namespace CppSharp public void addSpecifiers(CppSharp.Parser.AST.AccessSpecifierDecl s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecifiers_0((__Instance + __PointerAdjustment), arg0); } @@ -7649,7 +7767,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(152); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -7662,7 +7782,9 @@ namespace CppSharp public void addParameters(CppSharp.Parser.AST.TemplateParameter s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addParameters_0((__Instance + __PointerAdjustment), arg0); } @@ -7827,7 +7949,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(176); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -7844,7 +7968,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.ClassTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8027,7 +8153,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(528); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -8040,7 +8168,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8234,7 +8364,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(528); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } } @@ -8367,7 +8499,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(176); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -8384,7 +8518,9 @@ namespace CppSharp public void addSpecializations(CppSharp.Parser.AST.FunctionTemplateSpecialization s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addSpecializations_0((__Instance + __PointerAdjustment), arg0); } @@ -8505,7 +8641,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(48); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -8534,7 +8672,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.TemplateArgument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -8713,7 +8853,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(368); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -8839,7 +8981,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(128); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -8975,7 +9119,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(136); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -9117,7 +9263,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(144); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -9300,7 +9448,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(408); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -9317,7 +9467,9 @@ namespace CppSharp public void addMacros(CppSharp.Parser.AST.MacroDefinition s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addMacros_0((__Instance + __PointerAdjustment), arg0); } @@ -9491,7 +9643,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(64); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -9688,7 +9842,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(24); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -9721,7 +9877,9 @@ namespace CppSharp public void addTranslationUnits(CppSharp.Parser.AST.TranslationUnit s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addTranslationUnits_0((__Instance + __PointerAdjustment), arg0); } @@ -10022,7 +10180,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10039,7 +10199,9 @@ namespace CppSharp public void addBlocks(CppSharp.Parser.AST.BlockContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addBlocks_0((__Instance + __PointerAdjustment), arg0); } @@ -10193,7 +10355,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -10288,7 +10452,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_3((__Instance + __PointerAdjustment), arg0); } @@ -10301,7 +10467,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.BlockCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -10421,7 +10589,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -10547,7 +10717,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10663,7 +10835,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -10779,7 +10953,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -10796,7 +10972,9 @@ namespace CppSharp public void addLines(CppSharp.Parser.AST.VerbatimBlockLineComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addLines_0((__Instance + __PointerAdjustment), arg0); } @@ -10900,7 +11078,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -11102,7 +11282,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11119,7 +11301,9 @@ namespace CppSharp public void addContent(CppSharp.Parser.AST.InlineContentComment s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addContent_0((__Instance + __PointerAdjustment), arg0); } @@ -11289,7 +11473,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(8); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -11374,7 +11560,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_2((__Instance + __PointerAdjustment), arg0); } @@ -11387,7 +11575,9 @@ namespace CppSharp public void addArguments(CppSharp.Parser.AST.InlineCommandComment.Argument s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addArguments_0((__Instance + __PointerAdjustment), arg0); } @@ -11652,7 +11842,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -11753,7 +11945,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(40); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -11766,7 +11960,9 @@ namespace CppSharp public void addAttributes(CppSharp.Parser.AST.HTMLStartTagComment.Attribute s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addAttributes_0((__Instance + __PointerAdjustment), arg0); } @@ -11883,7 +12079,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -11986,7 +12184,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(16); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -12106,7 +12306,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs index cd91e42e..ce0c00d7 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs @@ -285,7 +285,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(200); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -729,7 +731,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(32); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -926,7 +930,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(56); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); } @@ -955,7 +961,9 @@ namespace CppSharp public void addDiagnostics(CppSharp.Parser.ParserDiagnostic s) { - var arg0 = ReferenceEquals(s, null) ? global::System.IntPtr.Zero : s.__Instance; + if (ReferenceEquals(s, null)) + throw new global::System.ArgumentNullException("s", "s cannot be null because it is a C++ reference (&)."); + var arg0 = s.__Instance; Internal.addDiagnostics_0((__Instance + __PointerAdjustment), arg0); } diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs index 377920b5..9056cc0f 100644 --- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs +++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs @@ -222,7 +222,9 @@ namespace CppSharp __Instance = Marshal.AllocHGlobal(160); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; - var arg0 = ReferenceEquals(_0, null) ? global::System.IntPtr.Zero : _0.__Instance; + if (ReferenceEquals(_0, null)) + throw new global::System.ArgumentNullException("_0", "_0 cannot be null because it is a C++ reference (&)."); + var arg0 = _0.__Instance; Internal.cctor_1((__Instance + __PointerAdjustment), arg0); }