From 75eb1457eb04ea5a118f021fabb6c9bc797234c9 Mon Sep 17 00:00:00 2001 From: triton Date: Mon, 14 Jul 2014 17:41:58 +0100 Subject: [PATCH] Added vector clearing overloads to the parser options. --- src/CppParser/Bindings/CLI/AST.cpp | 130 +++++++++ src/CppParser/Bindings/CLI/AST.h | 52 ++++ src/CppParser/Bindings/CLI/CppParser.cpp | 30 ++ src/CppParser/Bindings/CLI/CppParser.h | 12 + .../CSharp/i686-apple-darwin12.4.0/AST.cs | 260 ++++++++++++++++++ .../i686-apple-darwin12.4.0/CppParser.cs | 60 ++++ src/CppParser/Helpers.h | 12 +- 7 files changed, 552 insertions(+), 4 deletions(-) diff --git a/src/CppParser/Bindings/CLI/AST.cpp b/src/CppParser/Bindings/CLI/AST.cpp index 96a10aa1..1952d82c 100644 --- a/src/CppParser/Bindings/CLI/AST.cpp +++ b/src/CppParser/Bindings/CLI/AST.cpp @@ -256,6 +256,11 @@ void CppSharp::Parser::AST::FunctionType::addParameters(CppSharp::Parser::AST::P ((::CppSharp::CppParser::AST::FunctionType*)NativePtr)->addParameters(arg0); } +void CppSharp::Parser::AST::FunctionType::clearParameters() +{ + ((::CppSharp::CppParser::AST::FunctionType*)NativePtr)->clearParameters(); +} + unsigned int CppSharp::Parser::AST::FunctionType::ParametersCount::get() { auto __ret = ((::CppSharp::CppParser::AST::FunctionType*)NativePtr)->getParametersCount(); @@ -553,6 +558,11 @@ void CppSharp::Parser::AST::TemplateSpecializationType::addArguments(CppSharp::P ((::CppSharp::CppParser::AST::TemplateSpecializationType*)NativePtr)->addArguments(arg0); } +void CppSharp::Parser::AST::TemplateSpecializationType::clearArguments() +{ + ((::CppSharp::CppParser::AST::TemplateSpecializationType*)NativePtr)->clearArguments(); +} + unsigned int CppSharp::Parser::AST::TemplateSpecializationType::ArgumentsCount::get() { auto __ret = ((::CppSharp::CppParser::AST::TemplateSpecializationType*)NativePtr)->getArgumentsCount(); @@ -904,6 +914,11 @@ void CppSharp::Parser::AST::VTableLayout::addComponents(CppSharp::Parser::AST::V ((::CppSharp::CppParser::AST::VTableLayout*)NativePtr)->addComponents(arg0); } +void CppSharp::Parser::AST::VTableLayout::clearComponents() +{ + ((::CppSharp::CppParser::AST::VTableLayout*)NativePtr)->clearComponents(); +} + System::IntPtr CppSharp::Parser::AST::VTableLayout::__Instance::get() { return System::IntPtr(NativePtr); @@ -1015,6 +1030,11 @@ void CppSharp::Parser::AST::ClassLayout::addVFTables(CppSharp::Parser::AST::VFTa ((::CppSharp::CppParser::AST::ClassLayout*)NativePtr)->addVFTables(arg0); } +void CppSharp::Parser::AST::ClassLayout::clearVFTables() +{ + ((::CppSharp::CppParser::AST::ClassLayout*)NativePtr)->clearVFTables(); +} + System::IntPtr CppSharp::Parser::AST::ClassLayout::__Instance::get() { return System::IntPtr(NativePtr); @@ -1131,6 +1151,11 @@ void CppSharp::Parser::AST::Declaration::addPreprocessedEntities(CppSharp::Parse ((::CppSharp::CppParser::AST::Declaration*)NativePtr)->addPreprocessedEntities(arg0); } +void CppSharp::Parser::AST::Declaration::clearPreprocessedEntities() +{ + ((::CppSharp::CppParser::AST::Declaration*)NativePtr)->clearPreprocessedEntities(); +} + System::IntPtr CppSharp::Parser::AST::Declaration::__Instance::get() { return System::IntPtr(NativePtr); @@ -1308,6 +1333,11 @@ void CppSharp::Parser::AST::DeclarationContext::addNamespaces(CppSharp::Parser:: ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addNamespaces(arg0); } +void CppSharp::Parser::AST::DeclarationContext::clearNamespaces() +{ + ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearNamespaces(); +} + CppSharp::Parser::AST::Enumeration^ CppSharp::Parser::AST::DeclarationContext::getEnums(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getEnums(i); @@ -1321,6 +1351,11 @@ void CppSharp::Parser::AST::DeclarationContext::addEnums(CppSharp::Parser::AST:: ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addEnums(arg0); } +void CppSharp::Parser::AST::DeclarationContext::clearEnums() +{ + ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearEnums(); +} + CppSharp::Parser::AST::Function^ CppSharp::Parser::AST::DeclarationContext::getFunctions(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getFunctions(i); @@ -1334,6 +1369,11 @@ void CppSharp::Parser::AST::DeclarationContext::addFunctions(CppSharp::Parser::A ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addFunctions(arg0); } +void CppSharp::Parser::AST::DeclarationContext::clearFunctions() +{ + ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearFunctions(); +} + CppSharp::Parser::AST::Class^ CppSharp::Parser::AST::DeclarationContext::getClasses(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getClasses(i); @@ -1347,6 +1387,11 @@ void CppSharp::Parser::AST::DeclarationContext::addClasses(CppSharp::Parser::AST ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addClasses(arg0); } +void CppSharp::Parser::AST::DeclarationContext::clearClasses() +{ + ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearClasses(); +} + CppSharp::Parser::AST::Template^ CppSharp::Parser::AST::DeclarationContext::getTemplates(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getTemplates(i); @@ -1360,6 +1405,11 @@ void CppSharp::Parser::AST::DeclarationContext::addTemplates(CppSharp::Parser::A ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addTemplates(arg0); } +void CppSharp::Parser::AST::DeclarationContext::clearTemplates() +{ + ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearTemplates(); +} + CppSharp::Parser::AST::TypedefDecl^ CppSharp::Parser::AST::DeclarationContext::getTypedefs(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getTypedefs(i); @@ -1373,6 +1423,11 @@ void CppSharp::Parser::AST::DeclarationContext::addTypedefs(CppSharp::Parser::AS ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addTypedefs(arg0); } +void CppSharp::Parser::AST::DeclarationContext::clearTypedefs() +{ + ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearTypedefs(); +} + CppSharp::Parser::AST::Variable^ CppSharp::Parser::AST::DeclarationContext::getVariables(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getVariables(i); @@ -1386,6 +1441,11 @@ void CppSharp::Parser::AST::DeclarationContext::addVariables(CppSharp::Parser::A ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addVariables(arg0); } +void CppSharp::Parser::AST::DeclarationContext::clearVariables() +{ + ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearVariables(); +} + unsigned int CppSharp::Parser::AST::DeclarationContext::NamespacesCount::get() { auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getNamespacesCount(); @@ -1628,6 +1688,11 @@ void CppSharp::Parser::AST::Function::addParameters(CppSharp::Parser::AST::Param ((::CppSharp::CppParser::AST::Function*)NativePtr)->addParameters(arg0); } +void CppSharp::Parser::AST::Function::clearParameters() +{ + ((::CppSharp::CppParser::AST::Function*)NativePtr)->clearParameters(); +} + System::String^ CppSharp::Parser::AST::Function::Mangled::get() { auto __ret = ((::CppSharp::CppParser::AST::Function*)NativePtr)->getMangled(); @@ -1960,6 +2025,11 @@ void CppSharp::Parser::AST::Enumeration::addItems(CppSharp::Parser::AST::Enumera ((::CppSharp::CppParser::AST::Enumeration*)NativePtr)->addItems(arg0); } +void CppSharp::Parser::AST::Enumeration::clearItems() +{ + ((::CppSharp::CppParser::AST::Enumeration*)NativePtr)->clearItems(); +} + unsigned int CppSharp::Parser::AST::Enumeration::ItemsCount::get() { auto __ret = ((::CppSharp::CppParser::AST::Enumeration*)NativePtr)->getItemsCount(); @@ -2187,6 +2257,11 @@ void CppSharp::Parser::AST::Class::addBases(CppSharp::Parser::AST::BaseClassSpec ((::CppSharp::CppParser::AST::Class*)NativePtr)->addBases(arg0); } +void CppSharp::Parser::AST::Class::clearBases() +{ + ((::CppSharp::CppParser::AST::Class*)NativePtr)->clearBases(); +} + CppSharp::Parser::AST::Field^ CppSharp::Parser::AST::Class::getFields(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::Class*)NativePtr)->getFields(i); @@ -2200,6 +2275,11 @@ void CppSharp::Parser::AST::Class::addFields(CppSharp::Parser::AST::Field^ s) ((::CppSharp::CppParser::AST::Class*)NativePtr)->addFields(arg0); } +void CppSharp::Parser::AST::Class::clearFields() +{ + ((::CppSharp::CppParser::AST::Class*)NativePtr)->clearFields(); +} + CppSharp::Parser::AST::Method^ CppSharp::Parser::AST::Class::getMethods(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::Class*)NativePtr)->getMethods(i); @@ -2213,6 +2293,11 @@ void CppSharp::Parser::AST::Class::addMethods(CppSharp::Parser::AST::Method^ s) ((::CppSharp::CppParser::AST::Class*)NativePtr)->addMethods(arg0); } +void CppSharp::Parser::AST::Class::clearMethods() +{ + ((::CppSharp::CppParser::AST::Class*)NativePtr)->clearMethods(); +} + CppSharp::Parser::AST::AccessSpecifierDecl^ CppSharp::Parser::AST::Class::getSpecifiers(unsigned int i) { auto __ret = ((::CppSharp::CppParser::AST::Class*)NativePtr)->getSpecifiers(i); @@ -2226,6 +2311,11 @@ void CppSharp::Parser::AST::Class::addSpecifiers(CppSharp::Parser::AST::AccessSp ((::CppSharp::CppParser::AST::Class*)NativePtr)->addSpecifiers(arg0); } +void CppSharp::Parser::AST::Class::clearSpecifiers() +{ + ((::CppSharp::CppParser::AST::Class*)NativePtr)->clearSpecifiers(); +} + unsigned int CppSharp::Parser::AST::Class::BasesCount::get() { auto __ret = ((::CppSharp::CppParser::AST::Class*)NativePtr)->getBasesCount(); @@ -2387,6 +2477,11 @@ void CppSharp::Parser::AST::Template::addParameters(CppSharp::Parser::AST::Templ ((::CppSharp::CppParser::AST::Template*)NativePtr)->addParameters(arg0); } +void CppSharp::Parser::AST::Template::clearParameters() +{ + ((::CppSharp::CppParser::AST::Template*)NativePtr)->clearParameters(); +} + unsigned int CppSharp::Parser::AST::Template::ParametersCount::get() { auto __ret = ((::CppSharp::CppParser::AST::Template*)NativePtr)->getParametersCount(); @@ -2433,6 +2528,11 @@ void CppSharp::Parser::AST::ClassTemplate::addSpecializations(CppSharp::Parser:: ((::CppSharp::CppParser::AST::ClassTemplate*)NativePtr)->addSpecializations(arg0); } +void CppSharp::Parser::AST::ClassTemplate::clearSpecializations() +{ + ((::CppSharp::CppParser::AST::ClassTemplate*)NativePtr)->clearSpecializations(); +} + unsigned int CppSharp::Parser::AST::ClassTemplate::SpecializationsCount::get() { auto __ret = ((::CppSharp::CppParser::AST::ClassTemplate*)NativePtr)->getSpecializationsCount(); @@ -2469,6 +2569,11 @@ void CppSharp::Parser::AST::ClassTemplateSpecialization::addArguments(CppSharp:: ((::CppSharp::CppParser::AST::ClassTemplateSpecialization*)NativePtr)->addArguments(arg0); } +void CppSharp::Parser::AST::ClassTemplateSpecialization::clearArguments() +{ + ((::CppSharp::CppParser::AST::ClassTemplateSpecialization*)NativePtr)->clearArguments(); +} + unsigned int CppSharp::Parser::AST::ClassTemplateSpecialization::ArgumentsCount::get() { auto __ret = ((::CppSharp::CppParser::AST::ClassTemplateSpecialization*)NativePtr)->getArgumentsCount(); @@ -2542,6 +2647,11 @@ void CppSharp::Parser::AST::FunctionTemplate::addSpecializations(CppSharp::Parse ((::CppSharp::CppParser::AST::FunctionTemplate*)NativePtr)->addSpecializations(arg0); } +void CppSharp::Parser::AST::FunctionTemplate::clearSpecializations() +{ + ((::CppSharp::CppParser::AST::FunctionTemplate*)NativePtr)->clearSpecializations(); +} + unsigned int CppSharp::Parser::AST::FunctionTemplate::SpecializationsCount::get() { auto __ret = ((::CppSharp::CppParser::AST::FunctionTemplate*)NativePtr)->getSpecializationsCount(); @@ -2577,6 +2687,11 @@ void CppSharp::Parser::AST::FunctionTemplateSpecialization::addArguments(CppShar ((::CppSharp::CppParser::AST::FunctionTemplateSpecialization*)NativePtr)->addArguments(arg0); } +void CppSharp::Parser::AST::FunctionTemplateSpecialization::clearArguments() +{ + ((::CppSharp::CppParser::AST::FunctionTemplateSpecialization*)NativePtr)->clearArguments(); +} + System::IntPtr CppSharp::Parser::AST::FunctionTemplateSpecialization::__Instance::get() { return System::IntPtr(NativePtr); @@ -2779,6 +2894,11 @@ void CppSharp::Parser::AST::TranslationUnit::addMacros(CppSharp::Parser::AST::Ma ((::CppSharp::CppParser::AST::TranslationUnit*)NativePtr)->addMacros(arg0); } +void CppSharp::Parser::AST::TranslationUnit::clearMacros() +{ + ((::CppSharp::CppParser::AST::TranslationUnit*)NativePtr)->clearMacros(); +} + System::String^ CppSharp::Parser::AST::TranslationUnit::FileName::get() { auto __ret = ((::CppSharp::CppParser::AST::TranslationUnit*)NativePtr)->getFileName(); @@ -2834,6 +2954,11 @@ void CppSharp::Parser::AST::NativeLibrary::addSymbols(System::String^ s) ((::CppSharp::CppParser::AST::NativeLibrary*)NativePtr)->addSymbols(arg0); } +void CppSharp::Parser::AST::NativeLibrary::clearSymbols() +{ + ((::CppSharp::CppParser::AST::NativeLibrary*)NativePtr)->clearSymbols(); +} + CppSharp::Parser::AST::NativeLibrary::NativeLibrary() { NativePtr = new ::CppSharp::CppParser::AST::NativeLibrary(); @@ -2898,6 +3023,11 @@ void CppSharp::Parser::AST::ASTContext::addTranslationUnits(CppSharp::Parser::AS ((::CppSharp::CppParser::AST::ASTContext*)NativePtr)->addTranslationUnits(arg0); } +void CppSharp::Parser::AST::ASTContext::clearTranslationUnits() +{ + ((::CppSharp::CppParser::AST::ASTContext*)NativePtr)->clearTranslationUnits(); +} + System::IntPtr CppSharp::Parser::AST::ASTContext::__Instance::get() { return System::IntPtr(NativePtr); diff --git a/src/CppParser/Bindings/CLI/AST.h b/src/CppParser/Bindings/CLI/AST.h index 09486ce9..9a2d877a 100644 --- a/src/CppParser/Bindings/CLI/AST.h +++ b/src/CppParser/Bindings/CLI/AST.h @@ -458,6 +458,8 @@ namespace CppSharp CppSharp::Parser::AST::Parameter^ getParameters(unsigned int i); void addParameters(CppSharp::Parser::AST::Parameter^ s); + + void clearParameters(); }; public ref class PointerType : CppSharp::Parser::AST::Type @@ -647,6 +649,8 @@ namespace CppSharp CppSharp::Parser::AST::TemplateArgument^ getArguments(unsigned int i); void addArguments(CppSharp::Parser::AST::TemplateArgument^ s); + + void clearArguments(); }; public ref class TemplateParameter : ICppInstance @@ -838,6 +842,8 @@ namespace CppSharp CppSharp::Parser::AST::VTableComponent^ getComponents(unsigned int i); void addComponents(CppSharp::Parser::AST::VTableComponent^ s); + + void clearComponents(); }; public ref class VFTableInfo : ICppInstance @@ -945,6 +951,8 @@ namespace CppSharp CppSharp::Parser::AST::VFTableInfo^ getVFTables(unsigned int i); void addVFTables(CppSharp::Parser::AST::VFTableInfo^ s); + + void clearVFTables(); }; public ref class Declaration : ICppInstance @@ -1042,6 +1050,8 @@ namespace CppSharp CppSharp::Parser::AST::PreprocessedEntity^ getPreprocessedEntities(unsigned int i); void addPreprocessedEntities(CppSharp::Parser::AST::PreprocessedEntity^ s); + + void clearPreprocessedEntities(); }; public ref class DeclarationContext : CppSharp::Parser::AST::Declaration @@ -1097,29 +1107,43 @@ namespace CppSharp void addNamespaces(CppSharp::Parser::AST::Namespace^ s); + void clearNamespaces(); + CppSharp::Parser::AST::Enumeration^ getEnums(unsigned int i); void addEnums(CppSharp::Parser::AST::Enumeration^ s); + void clearEnums(); + CppSharp::Parser::AST::Function^ getFunctions(unsigned int i); void addFunctions(CppSharp::Parser::AST::Function^ s); + void clearFunctions(); + CppSharp::Parser::AST::Class^ getClasses(unsigned int i); void addClasses(CppSharp::Parser::AST::Class^ s); + void clearClasses(); + CppSharp::Parser::AST::Template^ getTemplates(unsigned int i); void addTemplates(CppSharp::Parser::AST::Template^ s); + void clearTemplates(); + CppSharp::Parser::AST::TypedefDecl^ getTypedefs(unsigned int i); void addTypedefs(CppSharp::Parser::AST::TypedefDecl^ s); + void clearTypedefs(); + CppSharp::Parser::AST::Variable^ getVariables(unsigned int i); void addVariables(CppSharp::Parser::AST::Variable^ s); + + void clearVariables(); }; public ref class TypedefDecl : CppSharp::Parser::AST::Declaration @@ -1298,6 +1322,8 @@ namespace CppSharp CppSharp::Parser::AST::Parameter^ getParameters(unsigned int i); void addParameters(CppSharp::Parser::AST::Parameter^ s); + + void clearParameters(); }; public ref class Method : CppSharp::Parser::AST::Function @@ -1444,6 +1470,8 @@ namespace CppSharp CppSharp::Parser::AST::Enumeration::Item^ getItems(unsigned int i); void addItems(CppSharp::Parser::AST::Enumeration::Item^ s); + + void clearItems(); }; public ref class Variable : CppSharp::Parser::AST::Declaration @@ -1629,17 +1657,25 @@ namespace CppSharp void addBases(CppSharp::Parser::AST::BaseClassSpecifier^ s); + void clearBases(); + CppSharp::Parser::AST::Field^ getFields(unsigned int i); void addFields(CppSharp::Parser::AST::Field^ s); + void clearFields(); + CppSharp::Parser::AST::Method^ getMethods(unsigned int i); void addMethods(CppSharp::Parser::AST::Method^ s); + void clearMethods(); + CppSharp::Parser::AST::AccessSpecifierDecl^ getSpecifiers(unsigned int i); void addSpecifiers(CppSharp::Parser::AST::AccessSpecifierDecl^ s); + + void clearSpecifiers(); }; public ref class Template : CppSharp::Parser::AST::Declaration @@ -1666,6 +1702,8 @@ namespace CppSharp CppSharp::Parser::AST::TemplateParameter^ getParameters(unsigned int i); void addParameters(CppSharp::Parser::AST::TemplateParameter^ s); + + void clearParameters(); }; public ref class ClassTemplate : CppSharp::Parser::AST::Template @@ -1684,6 +1722,8 @@ namespace CppSharp CppSharp::Parser::AST::ClassTemplateSpecialization^ getSpecializations(unsigned int i); void addSpecializations(CppSharp::Parser::AST::ClassTemplateSpecialization^ s); + + void clearSpecializations(); }; public ref class ClassTemplateSpecialization : CppSharp::Parser::AST::Class @@ -1714,6 +1754,8 @@ namespace CppSharp CppSharp::Parser::AST::TemplateArgument^ getArguments(unsigned int i); void addArguments(CppSharp::Parser::AST::TemplateArgument^ s); + + void clearArguments(); }; public ref class ClassTemplatePartialSpecialization : CppSharp::Parser::AST::ClassTemplateSpecialization @@ -1741,6 +1783,8 @@ namespace CppSharp CppSharp::Parser::AST::FunctionTemplateSpecialization^ getSpecializations(unsigned int i); void addSpecializations(CppSharp::Parser::AST::FunctionTemplateSpecialization^ s); + + void clearSpecializations(); }; public ref class FunctionTemplateSpecialization : ICppInstance @@ -1784,6 +1828,8 @@ namespace CppSharp CppSharp::Parser::AST::TemplateArgument^ getArguments(unsigned int i); void addArguments(CppSharp::Parser::AST::TemplateArgument^ s); + + void clearArguments(); }; public ref class Namespace : CppSharp::Parser::AST::DeclarationContext @@ -1880,6 +1926,8 @@ namespace CppSharp CppSharp::Parser::AST::MacroDefinition^ getMacros(unsigned int i); void addMacros(CppSharp::Parser::AST::MacroDefinition^ s); + + void clearMacros(); }; public ref class NativeLibrary : ICppInstance @@ -1911,6 +1959,8 @@ namespace CppSharp System::String^ getSymbols(unsigned int i); void addSymbols(System::String^ s); + + void clearSymbols(); }; public ref class ASTContext : ICppInstance @@ -1936,6 +1986,8 @@ namespace CppSharp CppSharp::Parser::AST::TranslationUnit^ getTranslationUnits(unsigned int i); void addTranslationUnits(CppSharp::Parser::AST::TranslationUnit^ s); + + void clearTranslationUnits(); }; public ref class Comment : ICppInstance diff --git a/src/CppParser/Bindings/CLI/CppParser.cpp b/src/CppParser/Bindings/CLI/CppParser.cpp index a2bb17fa..ca2fb915 100644 --- a/src/CppParser/Bindings/CLI/CppParser.cpp +++ b/src/CppParser/Bindings/CLI/CppParser.cpp @@ -35,6 +35,11 @@ void CppSharp::Parser::ParserOptions::addArguments(System::String^ s) ((::CppSharp::CppParser::ParserOptions*)NativePtr)->addArguments(arg0); } +void CppSharp::Parser::ParserOptions::clearArguments() +{ + ((::CppSharp::CppParser::ParserOptions*)NativePtr)->clearArguments(); +} + System::String^ CppSharp::Parser::ParserOptions::getIncludeDirs(unsigned int i) { auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getIncludeDirs(i); @@ -49,6 +54,11 @@ void CppSharp::Parser::ParserOptions::addIncludeDirs(System::String^ s) ((::CppSharp::CppParser::ParserOptions*)NativePtr)->addIncludeDirs(arg0); } +void CppSharp::Parser::ParserOptions::clearIncludeDirs() +{ + ((::CppSharp::CppParser::ParserOptions*)NativePtr)->clearIncludeDirs(); +} + System::String^ CppSharp::Parser::ParserOptions::getSystemIncludeDirs(unsigned int i) { auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getSystemIncludeDirs(i); @@ -63,6 +73,11 @@ void CppSharp::Parser::ParserOptions::addSystemIncludeDirs(System::String^ s) ((::CppSharp::CppParser::ParserOptions*)NativePtr)->addSystemIncludeDirs(arg0); } +void CppSharp::Parser::ParserOptions::clearSystemIncludeDirs() +{ + ((::CppSharp::CppParser::ParserOptions*)NativePtr)->clearSystemIncludeDirs(); +} + System::String^ CppSharp::Parser::ParserOptions::getDefines(unsigned int i) { auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getDefines(i); @@ -77,6 +92,11 @@ void CppSharp::Parser::ParserOptions::addDefines(System::String^ s) ((::CppSharp::CppParser::ParserOptions*)NativePtr)->addDefines(arg0); } +void CppSharp::Parser::ParserOptions::clearDefines() +{ + ((::CppSharp::CppParser::ParserOptions*)NativePtr)->clearDefines(); +} + System::String^ CppSharp::Parser::ParserOptions::getLibraryDirs(unsigned int i) { auto __ret = ((::CppSharp::CppParser::ParserOptions*)NativePtr)->getLibraryDirs(i); @@ -91,6 +111,11 @@ void CppSharp::Parser::ParserOptions::addLibraryDirs(System::String^ s) ((::CppSharp::CppParser::ParserOptions*)NativePtr)->addLibraryDirs(arg0); } +void CppSharp::Parser::ParserOptions::clearLibraryDirs() +{ + ((::CppSharp::CppParser::ParserOptions*)NativePtr)->clearLibraryDirs(); +} + System::IntPtr CppSharp::Parser::ParserOptions::__Instance::get() { return System::IntPtr(NativePtr); @@ -342,6 +367,11 @@ void CppSharp::Parser::ParserResult::addDiagnostics(CppSharp::Parser::ParserDiag ((::CppSharp::CppParser::ParserResult*)NativePtr)->addDiagnostics(arg0); } +void CppSharp::Parser::ParserResult::clearDiagnostics() +{ + ((::CppSharp::CppParser::ParserResult*)NativePtr)->clearDiagnostics(); +} + System::IntPtr CppSharp::Parser::ParserResult::__Instance::get() { return System::IntPtr(NativePtr); diff --git a/src/CppParser/Bindings/CLI/CppParser.h b/src/CppParser/Bindings/CLI/CppParser.h index e0f0f359..311c0fc1 100644 --- a/src/CppParser/Bindings/CLI/CppParser.h +++ b/src/CppParser/Bindings/CLI/CppParser.h @@ -152,21 +152,31 @@ namespace CppSharp void addArguments(System::String^ s); + void clearArguments(); + System::String^ getIncludeDirs(unsigned int i); void addIncludeDirs(System::String^ s); + void clearIncludeDirs(); + System::String^ getSystemIncludeDirs(unsigned int i); void addSystemIncludeDirs(System::String^ s); + void clearSystemIncludeDirs(); + System::String^ getDefines(unsigned int i); void addDefines(System::String^ s); + void clearDefines(); + System::String^ getLibraryDirs(unsigned int i); void addLibraryDirs(System::String^ s); + + void clearLibraryDirs(); }; public ref class ParserDiagnostic : ICppInstance @@ -256,6 +266,8 @@ namespace CppSharp CppSharp::Parser::ParserDiagnostic^ getDiagnostics(unsigned int i); void addDiagnostics(CppSharp::Parser::ParserDiagnostic^ s); + + void clearDiagnostics(); }; public ref class ClangParser : ICppInstance 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 c7eaf897..3a68e2d5 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 @@ -714,6 +714,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST12FunctionType13addParametersERPNS1_9ParameterE")] internal static extern void addParameters_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST12FunctionType15clearParametersEv")] + internal static extern void clearParameters_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST12FunctionType18getParametersCountEv")] @@ -760,6 +765,11 @@ namespace CppSharp Internal.addParameters_0(__Instance, arg0); } + public void clearParameters() + { + Internal.clearParameters_0(__Instance); + } + public uint ParametersCount { get @@ -1415,6 +1425,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST26TemplateSpecializationType12addArgumentsERNS1_16TemplateArgumentE")] internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST26TemplateSpecializationType14clearArgumentsEv")] + internal static extern void clearArguments_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST26TemplateSpecializationType17getArgumentsCountEv")] @@ -1463,6 +1478,11 @@ namespace CppSharp Internal.addArguments_0(__Instance, arg0); } + public void clearArguments() + { + Internal.clearArguments_0(__Instance); + } + public uint ArgumentsCount { get @@ -2212,6 +2232,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST12VTableLayout13addComponentsERNS1_15VTableComponentE")] internal static extern void addComponents_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST12VTableLayout15clearComponentsEv")] + internal static extern void clearComponents_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST12VTableLayout18getComponentsCountEv")] @@ -2268,6 +2293,11 @@ namespace CppSharp Internal.addComponents_0(__Instance, arg0); } + public void clearComponents() + { + Internal.clearComponents_0(__Instance); + } + public uint ComponentsCount { get @@ -2460,6 +2490,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST11ClassLayout11addVFTablesERNS1_11VFTableInfoE")] internal static extern void addVFTables_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST11ClassLayout13clearVFTablesEv")] + internal static extern void clearVFTables_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST11ClassLayout16getVFTablesCountEv")] @@ -2516,6 +2551,11 @@ namespace CppSharp Internal.addVFTables_0(__Instance, arg0); } + public void clearVFTables() + { + Internal.clearVFTables_0(__Instance); + } + public uint VFTablesCount { get @@ -2693,6 +2733,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST11Declaration23addPreprocessedEntitiesERPNS1_18PreprocessedEntityE")] internal static extern void addPreprocessedEntities_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST11Declaration25clearPreprocessedEntitiesEv")] + internal static extern void clearPreprocessedEntities_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST11Declaration7getNameEv")] @@ -2768,6 +2813,11 @@ namespace CppSharp Internal.addPreprocessedEntities_0(__Instance, arg0); } + public void clearPreprocessedEntities() + { + Internal.clearPreprocessedEntities_0(__Instance); + } + public string Name { get @@ -3025,6 +3075,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13addNamespacesERPNS1_9NamespaceE")] internal static extern void addNamespaces_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext15clearNamespacesEv")] + internal static extern void clearNamespaces_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext8getEnumsEj")] @@ -3035,6 +3090,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext8addEnumsERPNS1_11EnumerationE")] internal static extern void addEnums_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext10clearEnumsEv")] + internal static extern void clearEnums_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getFunctionsEj")] @@ -3045,6 +3105,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12addFunctionsERPNS1_8FunctionE")] internal static extern void addFunctions_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14clearFunctionsEv")] + internal static extern void clearFunctions_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext10getClassesEj")] @@ -3055,6 +3120,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext10addClassesERPNS1_5ClassE")] internal static extern void addClasses_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12clearClassesEv")] + internal static extern void clearClasses_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getTemplatesEj")] @@ -3065,6 +3135,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12addTemplatesERPNS1_8TemplateE")] internal static extern void addTemplates_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14clearTemplatesEv")] + internal static extern void clearTemplates_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext11getTypedefsEj")] @@ -3075,6 +3150,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext11addTypedefsERPNS1_11TypedefDeclE")] internal static extern void addTypedefs_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")] + internal static extern void clearTypedefs_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")] @@ -3085,6 +3165,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12addVariablesERPNS1_8VariableE")] internal static extern void addVariables_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14clearVariablesEv")] + internal static extern void clearVariables_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext18getNamespacesCountEv")] @@ -3162,6 +3247,11 @@ namespace CppSharp Internal.addNamespaces_0(__Instance, arg0); } + public void clearNamespaces() + { + Internal.clearNamespaces_0(__Instance); + } + public CppSharp.Parser.AST.Enumeration getEnums(uint i) { var __ret = Internal.getEnums_0(__Instance, i); @@ -3175,6 +3265,11 @@ namespace CppSharp Internal.addEnums_0(__Instance, arg0); } + public void clearEnums() + { + Internal.clearEnums_0(__Instance); + } + public CppSharp.Parser.AST.Function getFunctions(uint i) { var __ret = Internal.getFunctions_0(__Instance, i); @@ -3188,6 +3283,11 @@ namespace CppSharp Internal.addFunctions_0(__Instance, arg0); } + public void clearFunctions() + { + Internal.clearFunctions_0(__Instance); + } + public CppSharp.Parser.AST.Class getClasses(uint i) { var __ret = Internal.getClasses_0(__Instance, i); @@ -3201,6 +3301,11 @@ namespace CppSharp Internal.addClasses_0(__Instance, arg0); } + public void clearClasses() + { + Internal.clearClasses_0(__Instance); + } + public CppSharp.Parser.AST.Template getTemplates(uint i) { var __ret = Internal.getTemplates_0(__Instance, i); @@ -3214,6 +3319,11 @@ namespace CppSharp Internal.addTemplates_0(__Instance, arg0); } + public void clearTemplates() + { + Internal.clearTemplates_0(__Instance); + } + public CppSharp.Parser.AST.TypedefDecl getTypedefs(uint i) { var __ret = Internal.getTypedefs_0(__Instance, i); @@ -3227,6 +3337,11 @@ namespace CppSharp Internal.addTypedefs_0(__Instance, arg0); } + public void clearTypedefs() + { + Internal.clearTypedefs_0(__Instance); + } + public CppSharp.Parser.AST.Variable getVariables(uint i) { var __ret = Internal.getVariables_0(__Instance, i); @@ -3240,6 +3355,11 @@ namespace CppSharp Internal.addVariables_0(__Instance, arg0); } + public void clearVariables() + { + Internal.clearVariables_0(__Instance); + } + public uint NamespacesCount { get @@ -3838,6 +3958,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST8Function13addParametersERPNS1_9ParameterE")] internal static extern void addParameters_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST8Function15clearParametersEv")] + internal static extern void clearParameters_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST8Function10getMangledEv")] @@ -3904,6 +4029,11 @@ namespace CppSharp Internal.addParameters_0(__Instance, arg0); } + public void clearParameters() + { + Internal.clearParameters_0(__Instance); + } + public string Mangled { get @@ -4481,6 +4611,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST11Enumeration8addItemsERNS2_4ItemE")] internal static extern void addItems_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST11Enumeration10clearItemsEv")] + internal static extern void clearItems_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST11Enumeration13getItemsCountEv")] @@ -4661,6 +4796,11 @@ namespace CppSharp Internal.addItems_0(__Instance, arg0); } + public void clearItems() + { + Internal.clearItems_0(__Instance); + } + public uint ItemsCount { get @@ -5254,6 +5394,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST5Class8addBasesERPNS1_18BaseClassSpecifierE")] internal static extern void addBases_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST5Class10clearBasesEv")] + internal static extern void clearBases_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST5Class9getFieldsEj")] @@ -5264,6 +5409,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST5Class9addFieldsERPNS1_5FieldE")] internal static extern void addFields_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST5Class11clearFieldsEv")] + internal static extern void clearFields_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST5Class10getMethodsEj")] @@ -5274,6 +5424,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST5Class10addMethodsERPNS1_6MethodE")] internal static extern void addMethods_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST5Class12clearMethodsEv")] + internal static extern void clearMethods_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST5Class13getSpecifiersEj")] @@ -5284,6 +5439,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST5Class13addSpecifiersERPNS1_19AccessSpecifierDeclE")] internal static extern void addSpecifiers_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST5Class15clearSpecifiersEv")] + internal static extern void clearSpecifiers_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST5Class13getBasesCountEv")] @@ -5345,6 +5505,11 @@ namespace CppSharp Internal.addBases_0(__Instance, arg0); } + public void clearBases() + { + Internal.clearBases_0(__Instance); + } + public CppSharp.Parser.AST.Field getFields(uint i) { var __ret = Internal.getFields_0(__Instance, i); @@ -5358,6 +5523,11 @@ namespace CppSharp Internal.addFields_0(__Instance, arg0); } + public void clearFields() + { + Internal.clearFields_0(__Instance); + } + public CppSharp.Parser.AST.Method getMethods(uint i) { var __ret = Internal.getMethods_0(__Instance, i); @@ -5371,6 +5541,11 @@ namespace CppSharp Internal.addMethods_0(__Instance, arg0); } + public void clearMethods() + { + Internal.clearMethods_0(__Instance); + } + public CppSharp.Parser.AST.AccessSpecifierDecl getSpecifiers(uint i) { var __ret = Internal.getSpecifiers_0(__Instance, i); @@ -5384,6 +5559,11 @@ namespace CppSharp Internal.addSpecifiers_0(__Instance, arg0); } + public void clearSpecifiers() + { + Internal.clearSpecifiers_0(__Instance); + } + public uint BasesCount { get @@ -5639,6 +5819,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST8Template13addParametersERNS1_17TemplateParameterE")] internal static extern void addParameters_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST8Template15clearParametersEv")] + internal static extern void clearParameters_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST8Template18getParametersCountEv")] @@ -5695,6 +5880,11 @@ namespace CppSharp Internal.addParameters_0(__Instance, arg0); } + public void clearParameters() + { + Internal.clearParameters_0(__Instance); + } + public uint ParametersCount { get @@ -5783,6 +5973,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST13ClassTemplate18addSpecializationsERPNS1_27ClassTemplateSpecializationE")] internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST13ClassTemplate20clearSpecializationsEv")] + internal static extern void clearSpecializations_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST13ClassTemplate23getSpecializationsCountEv")] @@ -5829,6 +6024,11 @@ namespace CppSharp Internal.addSpecializations_0(__Instance, arg0); } + public void clearSpecializations() + { + Internal.clearSpecializations_0(__Instance); + } + public uint SpecializationsCount { get @@ -5938,6 +6138,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST27ClassTemplateSpecialization12addArgumentsERNS1_16TemplateArgumentE")] internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST27ClassTemplateSpecialization14clearArgumentsEv")] + internal static extern void clearArguments_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST27ClassTemplateSpecialization17getArgumentsCountEv")] @@ -5986,6 +6191,11 @@ namespace CppSharp Internal.addArguments_0(__Instance, arg0); } + public void clearArguments() + { + Internal.clearArguments_0(__Instance); + } + public uint ArgumentsCount { get @@ -6207,6 +6417,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST16FunctionTemplate18addSpecializationsERPNS1_30FunctionTemplateSpecializationE")] internal static extern void addSpecializations_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST16FunctionTemplate20clearSpecializationsEv")] + internal static extern void clearSpecializations_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST16FunctionTemplate23getSpecializationsCountEv")] @@ -6253,6 +6468,11 @@ namespace CppSharp Internal.addSpecializations_0(__Instance, arg0); } + public void clearSpecializations() + { + Internal.clearSpecializations_0(__Instance); + } + public uint SpecializationsCount { get @@ -6302,6 +6522,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST30FunctionTemplateSpecialization12addArgumentsERNS1_16TemplateArgumentE")] internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST30FunctionTemplateSpecialization14clearArgumentsEv")] + internal static extern void clearArguments_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST30FunctionTemplateSpecialization17getArgumentsCountEv")] @@ -6358,6 +6583,11 @@ namespace CppSharp Internal.addArguments_0(__Instance, arg0); } + public void clearArguments() + { + Internal.clearArguments_0(__Instance); + } + public uint ArgumentsCount { get @@ -6915,6 +7145,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST15TranslationUnit9addMacrosERPNS1_15MacroDefinitionE")] internal static extern void addMacros_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST15TranslationUnit11clearMacrosEv")] + internal static extern void clearMacros_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST15TranslationUnit11getFileNameEv")] @@ -6971,6 +7206,11 @@ namespace CppSharp Internal.addMacros_0(__Instance, arg0); } + public void clearMacros() + { + Internal.clearMacros_0(__Instance); + } + public string FileName { get @@ -7043,6 +7283,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST13NativeLibrary10addSymbolsEPKc")] internal static extern void addSymbols_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST13NativeLibrary12clearSymbolsEv")] + internal static extern void clearSymbols_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST13NativeLibrary11getFileNameEv")] @@ -7108,6 +7353,11 @@ namespace CppSharp Marshal.FreeHGlobal(arg0); } + public void clearSymbols() + { + Internal.clearSymbols_0(__Instance); + } + public string FileName { get @@ -7165,6 +7415,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser3AST10ASTContext19addTranslationUnitsERPNS1_15TranslationUnitE")] internal static extern void addTranslationUnits_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser3AST10ASTContext21clearTranslationUnitsEv")] + internal static extern void clearTranslationUnits_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser3AST10ASTContext24getTranslationUnitsCountEv")] @@ -7219,6 +7474,11 @@ namespace CppSharp Internal.addTranslationUnits_0(__Instance, arg0); } + public void clearTranslationUnits() + { + Internal.clearTranslationUnits_0(__Instance); + } + public uint TranslationUnitsCount { get 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 87237a6d..68c1a457 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 @@ -86,6 +86,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser13ParserOptions12addArgumentsEPKc")] internal static extern void addArguments_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14clearArgumentsEv")] + internal static extern void clearArguments_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14getIncludeDirsEj")] @@ -96,6 +101,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14addIncludeDirsEPKc")] internal static extern void addIncludeDirs_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser13ParserOptions16clearIncludeDirsEv")] + internal static extern void clearIncludeDirs_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser13ParserOptions20getSystemIncludeDirsEj")] @@ -106,6 +116,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser13ParserOptions20addSystemIncludeDirsEPKc")] internal static extern void addSystemIncludeDirs_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser13ParserOptions22clearSystemIncludeDirsEv")] + internal static extern void clearSystemIncludeDirs_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser13ParserOptions10getDefinesEj")] @@ -116,6 +131,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser13ParserOptions10addDefinesEPKc")] internal static extern void addDefines_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser13ParserOptions12clearDefinesEv")] + internal static extern void clearDefines_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14getLibraryDirsEj")] @@ -126,6 +146,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser13ParserOptions14addLibraryDirsEPKc")] internal static extern void addLibraryDirs_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser13ParserOptions16clearLibraryDirsEv")] + internal static extern void clearLibraryDirs_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser13ParserOptions17getArgumentsCountEv")] @@ -221,6 +246,11 @@ namespace CppSharp Marshal.FreeHGlobal(arg0); } + public void clearArguments() + { + Internal.clearArguments_0(__Instance); + } + public string getIncludeDirs(uint i) { var __ret = Internal.getIncludeDirs_0(__Instance, i); @@ -235,6 +265,11 @@ namespace CppSharp Marshal.FreeHGlobal(arg0); } + public void clearIncludeDirs() + { + Internal.clearIncludeDirs_0(__Instance); + } + public string getSystemIncludeDirs(uint i) { var __ret = Internal.getSystemIncludeDirs_0(__Instance, i); @@ -249,6 +284,11 @@ namespace CppSharp Marshal.FreeHGlobal(arg0); } + public void clearSystemIncludeDirs() + { + Internal.clearSystemIncludeDirs_0(__Instance); + } + public string getDefines(uint i) { var __ret = Internal.getDefines_0(__Instance, i); @@ -263,6 +303,11 @@ namespace CppSharp Marshal.FreeHGlobal(arg0); } + public void clearDefines() + { + Internal.clearDefines_0(__Instance); + } + public string getLibraryDirs(uint i) { var __ret = Internal.getLibraryDirs_0(__Instance, i); @@ -277,6 +322,11 @@ namespace CppSharp Marshal.FreeHGlobal(arg0); } + public void clearLibraryDirs() + { + Internal.clearLibraryDirs_0(__Instance); + } + public uint ArgumentsCount { get @@ -666,6 +716,11 @@ namespace CppSharp EntryPoint="_ZN8CppSharp9CppParser12ParserResult14addDiagnosticsERNS0_16ParserDiagnosticE")] internal static extern void addDiagnostics_0(global::System.IntPtr instance, global::System.IntPtr s); + [SuppressUnmanagedCodeSecurity] + [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, + EntryPoint="_ZN8CppSharp9CppParser12ParserResult16clearDiagnosticsEv")] + internal static extern void clearDiagnostics_0(global::System.IntPtr instance); + [SuppressUnmanagedCodeSecurity] [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, EntryPoint="_ZN8CppSharp9CppParser12ParserResult19getDiagnosticsCountEv")] @@ -722,6 +777,11 @@ namespace CppSharp Internal.addDiagnostics_0(__Instance, arg0); } + public void clearDiagnostics() + { + Internal.clearDiagnostics_0(__Instance); + } + public uint DiagnosticsCount { get diff --git a/src/CppParser/Helpers.h b/src/CppParser/Helpers.h index aa2264ae..20dee31d 100644 --- a/src/CppParser/Helpers.h +++ b/src/CppParser/Helpers.h @@ -32,23 +32,27 @@ std::vector name; \ type get##name (unsigned i); \ void add##name (type& s); \ - unsigned get##name##Count (); + unsigned get##name##Count (); \ + void clear##name(); #define DEF_VECTOR(klass, type, name) \ type klass::get##name (unsigned i) { return name[i]; } \ void klass::add##name (type& s) { return name.push_back(s); } \ - unsigned klass::get##name##Count () { return name.size(); } + unsigned klass::get##name##Count () { return name.size(); } \ + void klass::clear##name() { name.clear(); } #define VECTOR_STRING(name) \ std::vector name; \ const char* get##name (unsigned i); \ void add##name (const char* s); \ - unsigned get##name##Count (); + unsigned get##name##Count (); \ + void clear##name(); #define DEF_VECTOR_STRING(klass, name) \ const char* klass::get##name (unsigned i) { return name[i].c_str(); } \ void klass::add##name (const char* s) { return name.push_back(std::string(s)); } \ - unsigned klass::get##name##Count () { return name.size(); } + unsigned klass::get##name##Count () { return name.size(); } \ + void klass::clear##name() { name.clear(); } #define STRING(name) \ std::string name; \