Browse Source

Removed the memory leak in the AST converter.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/540/head
Dimitar Dobrev 10 years ago
parent
commit
6432d910fa
  1. 98
      src/Core/Parser/ASTConverter.cs
  2. 1
      src/CppParser/AST.cpp
  3. 1
      src/CppParser/AST.h
  4. 865
      src/CppParser/Bindings/CLI/AST.cpp
  5. 115
      src/CppParser/Bindings/CLI/AST.h
  6. 52
      src/CppParser/Bindings/CLI/CppParser.cpp
  7. 12
      src/CppParser/Bindings/CLI/CppParser.h
  8. 13
      src/CppParser/Bindings/CLI/Target.cpp
  9. 3
      src/CppParser/Bindings/CLI/Target.h
  10. 450
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
  11. 24
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs
  12. 6
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs
  13. 450
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
  14. 24
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs
  15. 6
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs
  16. 450
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
  17. 24
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs
  18. 6
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs
  19. 450
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
  20. 24
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs
  21. 6
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs
  22. 19
      src/Generator/Generators/CLI/CLIHeadersTemplate.cs
  23. 51
      src/Generator/Generators/CLI/CLISourcesTemplate.cs
  24. 12
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

98
src/Core/Parser/ASTConverter.cs

@ -36,77 +36,77 @@ namespace CppSharp @@ -36,77 +36,77 @@ namespace CppSharp
{
case TypeKind.Tag:
{
var _type = TagType.__CreateInstance(type.__Instance);
var _type = TagType.__CreateInstance(type.__Instance, true);
return VisitTag(_type);
}
case TypeKind.Array:
{
var _type = ArrayType.__CreateInstance(type.__Instance);
var _type = ArrayType.__CreateInstance(type.__Instance, true);
return VisitArray(_type);
}
case TypeKind.Function:
{
var _type = FunctionType.__CreateInstance(type.__Instance);
var _type = FunctionType.__CreateInstance(type.__Instance, true);
return VisitFunction(_type);
}
case TypeKind.Pointer:
{
var _type = PointerType.__CreateInstance(type.__Instance);
var _type = PointerType.__CreateInstance(type.__Instance, true);
return VisitPointer(_type);
}
case TypeKind.MemberPointer:
{
var _type = MemberPointerType.__CreateInstance(type.__Instance);
var _type = MemberPointerType.__CreateInstance(type.__Instance, true);
return VisitMemberPointer(_type);
}
case TypeKind.Typedef:
{
var _type = TypedefType.__CreateInstance(type.__Instance);
var _type = TypedefType.__CreateInstance(type.__Instance, true);
return VisitTypedef(_type);
}
case TypeKind.Attributed:
{
var _type = AttributedType.__CreateInstance(type.__Instance);
var _type = AttributedType.__CreateInstance(type.__Instance, true);
return VisitAttributed(_type);
}
case TypeKind.Decayed:
{
var _type = DecayedType.__CreateInstance(type.__Instance);
var _type = DecayedType.__CreateInstance(type.__Instance, true);
return VisitDecayed(_type);
}
case TypeKind.TemplateSpecialization:
{
var _type = TemplateSpecializationType.__CreateInstance(type.__Instance);
var _type = TemplateSpecializationType.__CreateInstance(type.__Instance, true);
return VisitTemplateSpecialization(_type);
}
case TypeKind.TemplateParameter:
{
var _type = TemplateParameterType.__CreateInstance(type.__Instance);
var _type = TemplateParameterType.__CreateInstance(type.__Instance, true);
return VisitTemplateParameter(_type);
}
case TypeKind.TemplateParameterSubstitution:
{
var _type = TemplateParameterSubstitutionType.__CreateInstance(type.__Instance);
var _type = TemplateParameterSubstitutionType.__CreateInstance(type.__Instance, true);
return VisitTemplateParameterSubstitution(_type);
}
case TypeKind.InjectedClassName:
{
var _type = InjectedClassNameType.__CreateInstance(type.__Instance);
var _type = InjectedClassNameType.__CreateInstance(type.__Instance, true);
return VisitInjectedClassName(_type);
}
case TypeKind.DependentName:
{
var _type = DependentNameType.__CreateInstance(type.__Instance);
var _type = DependentNameType.__CreateInstance(type.__Instance, true);
return VisitDependentName(_type);
}
case TypeKind.Builtin:
{
var _type = BuiltinType.__CreateInstance(type.__Instance);
var _type = BuiltinType.__CreateInstance(type.__Instance, true);
return VisitBuiltin(_type);
}
case TypeKind.PackExpansion:
{
var _type = PackExpansionType.__CreateInstance(type.__Instance);
var _type = PackExpansionType.__CreateInstance(type.__Instance, true);
return VisitPackExpansion(_type);
}
}
@ -148,97 +148,97 @@ namespace CppSharp @@ -148,97 +148,97 @@ namespace CppSharp
{
case DeclarationKind.TranslationUnit:
{
var _decl = TranslationUnit.__CreateInstance(decl.__Instance);
var _decl = TranslationUnit.__CreateInstance(decl.__Instance, true);
return VisitTranslationUnit(_decl);
}
case DeclarationKind.Namespace:
{
var _decl = Namespace.__CreateInstance(decl.__Instance);
var _decl = Namespace.__CreateInstance(decl.__Instance, true);
return VisitNamespace(_decl);
}
case DeclarationKind.Typedef:
{
var _decl = TypedefDecl.__CreateInstance(decl.__Instance);
var _decl = TypedefDecl.__CreateInstance(decl.__Instance, true);
return VisitTypedef(_decl);
}
case DeclarationKind.Parameter:
{
var _decl = Parameter.__CreateInstance(decl.__Instance);
var _decl = Parameter.__CreateInstance(decl.__Instance, true);
return VisitParameter(_decl);
}
case DeclarationKind.Function:
{
var _decl = Function.__CreateInstance(decl.__Instance);
var _decl = Function.__CreateInstance(decl.__Instance, true);
return VisitFunction(_decl);
}
case DeclarationKind.Method:
{
var _decl = Method.__CreateInstance(decl.__Instance);
var _decl = Method.__CreateInstance(decl.__Instance, true);
return VisitMethod(_decl);
}
case DeclarationKind.Enumeration:
{
var _decl = Enumeration.__CreateInstance(decl.__Instance);
var _decl = Enumeration.__CreateInstance(decl.__Instance, true);
return VisitEnumeration(_decl);
}
case DeclarationKind.EnumerationItem:
{
var _decl = Enumeration.Item.__CreateInstance(decl.__Instance);
var _decl = Enumeration.Item.__CreateInstance(decl.__Instance, true);
return VisitEnumerationItem(_decl);
}
case DeclarationKind.Variable:
{
var _decl = Variable.__CreateInstance(decl.__Instance);
var _decl = Variable.__CreateInstance(decl.__Instance, true);
return VisitVariable(_decl);
}
case DeclarationKind.Friend:
{
var _decl = Friend.__CreateInstance(decl.__Instance);
var _decl = Friend.__CreateInstance(decl.__Instance, true);
return VisitFriend(_decl);
}
case DeclarationKind.Field:
{
var _decl = Field.__CreateInstance(decl.__Instance);
var _decl = Field.__CreateInstance(decl.__Instance, true);
return VisitField(_decl);
}
case DeclarationKind.AccessSpecifier:
{
var _decl = AccessSpecifierDecl.__CreateInstance(decl.__Instance);
var _decl = AccessSpecifierDecl.__CreateInstance(decl.__Instance, true);
return VisitAccessSpecifier(_decl);
}
case DeclarationKind.Class:
{
var _decl = Class.__CreateInstance(decl.__Instance);
var _decl = Class.__CreateInstance(decl.__Instance, true);
return VisitClass(_decl);
}
case DeclarationKind.ClassTemplate:
{
var _decl = ClassTemplate.__CreateInstance(decl.__Instance);
var _decl = ClassTemplate.__CreateInstance(decl.__Instance, true);
return VisitClassTemplate(_decl);
}
case DeclarationKind.ClassTemplateSpecialization:
{
var _decl = ClassTemplateSpecialization.__CreateInstance(decl.__Instance);
var _decl = ClassTemplateSpecialization.__CreateInstance(decl.__Instance, true);
return VisitClassTemplateSpecialization(_decl);
}
case DeclarationKind.ClassTemplatePartialSpecialization:
{
var _decl = ClassTemplatePartialSpecialization.__CreateInstance(decl.__Instance);
var _decl = ClassTemplatePartialSpecialization.__CreateInstance(decl.__Instance, true);
return VisitClassTemplatePartialSpecialization(_decl);
}
case DeclarationKind.FunctionTemplate:
{
var _decl = FunctionTemplate.__CreateInstance(decl.__Instance);
var _decl = FunctionTemplate.__CreateInstance(decl.__Instance, true);
return VisitFunctionTemplate(_decl);
}
case DeclarationKind.MacroDefinition:
{
var _decl = MacroDefinition.__CreateInstance(decl.__Instance);
var _decl = MacroDefinition.__CreateInstance(decl.__Instance, true);
return VisitMacroDefinition(_decl);
}
case DeclarationKind.MacroExpansion:
{
var _decl = MacroExpansion.__CreateInstance(decl.__Instance);
var _decl = MacroExpansion.__CreateInstance(decl.__Instance, true);
return VisitMacroExpansion(_decl);
}
}
@ -345,6 +345,12 @@ namespace CppSharp @@ -345,6 +345,12 @@ namespace CppSharp
_ctx.TranslationUnits.Add(_unit);
}
foreach (var nativeObject in typeConverter.NativeObjects)
nativeObject.Dispose();
foreach (var nativeObject in declConverter.NativeObjects)
nativeObject.Dispose();
return _ctx;
}
}
@ -353,6 +359,13 @@ namespace CppSharp @@ -353,6 +359,13 @@ namespace CppSharp
{
internal DeclConverter declConverter;
public TypeConverter()
{
NativeObjects = new HashSet<IDisposable>();
}
public HashSet<IDisposable> NativeObjects { get; private set; }
public AST.QualifiedType VisitQualified(QualifiedType qualType)
{
var _qualType = new AST.QualifiedType
@ -389,6 +402,7 @@ namespace CppSharp @@ -389,6 +402,7 @@ namespace CppSharp
void VisitType(Parser.AST.Type origType, CppSharp.AST.Type type)
{
type.IsDependent = origType.IsDependent;
NativeObjects.Add(origType);
}
public override AST.Type VisitTag(TagType type)
@ -650,11 +664,14 @@ namespace CppSharp @@ -650,11 +664,14 @@ namespace CppSharp
public DeclConverter(TypeConverter type, CommentConverter comment)
{
NativeObjects = new HashSet<IDisposable>();
typeConverter = type;
commentConverter = comment;
Declarations = new Dictionary<IntPtr, AST.Declaration>();
}
public HashSet<IDisposable> NativeObjects { get; private set; }
public override AST.Declaration Visit(Parser.AST.Declaration decl)
{
if (decl == null)
@ -785,6 +802,8 @@ namespace CppSharp @@ -785,6 +802,8 @@ namespace CppSharp
}
_decl.OriginalPtr = originalPtr;
NativeObjects.Add(decl);
}
void VisitDeclContext(DeclarationContext ctx, AST.DeclarationContext _ctx)
@ -936,6 +955,9 @@ namespace CppSharp @@ -936,6 +955,9 @@ namespace CppSharp
}
expression.Declaration = typeConverter.declConverter.Visit(statement.Decl);
expression.String = statement.String;
NativeObjects.Add(statement);
return expression;
}
@ -1291,6 +1313,8 @@ namespace CppSharp @@ -1291,6 +1313,8 @@ namespace CppSharp
_layout.VFTables.Add(_vftableInfo);
}
NativeObjects.Add(layout);
return _layout;
}
@ -1323,6 +1347,8 @@ namespace CppSharp @@ -1323,6 +1347,8 @@ namespace CppSharp
Layout = VisitVTableLayout(vftableInfo.Layout)
};
NativeObjects.Add(vftableInfo);
return _vftableInfo;
}
@ -1337,6 +1363,8 @@ namespace CppSharp @@ -1337,6 +1363,8 @@ namespace CppSharp
_layout.Components.Add(_component);
}
NativeObjects.Add(layout);
return _layout;
}
@ -1349,6 +1377,8 @@ namespace CppSharp @@ -1349,6 +1377,8 @@ namespace CppSharp
Declaration = Visit(component.Declaration)
};
NativeObjects.Add(component);
return _component;
}

1
src/CppParser/AST.cpp

@ -129,6 +129,7 @@ VTableComponent::VTableComponent() : Offset(0), Declaration(0) {} @@ -129,6 +129,7 @@ VTableComponent::VTableComponent() : Offset(0), Declaration(0) {}
// VTableLayout
VTableLayout::VTableLayout() {}
VTableLayout::VTableLayout(const VTableLayout& rhs) : Components(rhs.Components) {}
VTableLayout::~VTableLayout() {}
DEF_VECTOR(VTableLayout, VTableComponent, Components)

1
src/CppParser/AST.h

@ -310,6 +310,7 @@ struct CS_API VTableLayout @@ -310,6 +310,7 @@ struct CS_API VTableLayout
{
VTableLayout();
VTableLayout(const VTableLayout&);
~VTableLayout();
VECTOR(VTableComponent, Components)
};

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

File diff suppressed because it is too large Load Diff

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

@ -349,6 +349,7 @@ namespace CppSharp @@ -349,6 +349,7 @@ namespace CppSharp
Type(::CppSharp::CppParser::AST::Type* native);
static Type^ __CreateInstance(::System::IntPtr native);
static Type^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Type(CppSharp::Parser::AST::TypeKind kind);
Type(CppSharp::Parser::AST::Type^ _0);
@ -367,7 +368,7 @@ namespace CppSharp @@ -367,7 +368,7 @@ namespace CppSharp
void set(bool);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -384,6 +385,7 @@ namespace CppSharp @@ -384,6 +385,7 @@ namespace CppSharp
TypeQualifiers(::CppSharp::CppParser::AST::TypeQualifiers* native);
static TypeQualifiers^ __CreateInstance(::System::IntPtr native);
static TypeQualifiers^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TypeQualifiers(CppSharp::Parser::AST::TypeQualifiers^ _0);
TypeQualifiers();
@ -408,7 +410,7 @@ namespace CppSharp @@ -408,7 +410,7 @@ namespace CppSharp
void set(bool);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -425,6 +427,7 @@ namespace CppSharp @@ -425,6 +427,7 @@ namespace CppSharp
QualifiedType(::CppSharp::CppParser::AST::QualifiedType* native);
static QualifiedType^ __CreateInstance(::System::IntPtr native);
static QualifiedType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
QualifiedType();
QualifiedType(CppSharp::Parser::AST::QualifiedType^ _0);
@ -443,7 +446,7 @@ namespace CppSharp @@ -443,7 +446,7 @@ namespace CppSharp
void set(CppSharp::Parser::AST::TypeQualifiers^);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -453,6 +456,7 @@ namespace CppSharp @@ -453,6 +456,7 @@ namespace CppSharp
TagType(::CppSharp::CppParser::AST::TagType* native);
static TagType^ __CreateInstance(::System::IntPtr native);
static TagType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TagType();
TagType(CppSharp::Parser::AST::TagType^ _0);
@ -480,6 +484,7 @@ namespace CppSharp @@ -480,6 +484,7 @@ namespace CppSharp
ArrayType(::CppSharp::CppParser::AST::ArrayType* native);
static ArrayType^ __CreateInstance(::System::IntPtr native);
static ArrayType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ArrayType();
ArrayType(CppSharp::Parser::AST::ArrayType^ _0);
@ -511,6 +516,7 @@ namespace CppSharp @@ -511,6 +516,7 @@ namespace CppSharp
FunctionType(::CppSharp::CppParser::AST::FunctionType* native);
static FunctionType^ __CreateInstance(::System::IntPtr native);
static FunctionType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
FunctionType();
FunctionType(CppSharp::Parser::AST::FunctionType^ _0);
@ -555,6 +561,7 @@ namespace CppSharp @@ -555,6 +561,7 @@ namespace CppSharp
PointerType(::CppSharp::CppParser::AST::PointerType* native);
static PointerType^ __CreateInstance(::System::IntPtr native);
static PointerType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
PointerType();
PointerType(CppSharp::Parser::AST::PointerType^ _0);
@ -580,6 +587,7 @@ namespace CppSharp @@ -580,6 +587,7 @@ namespace CppSharp
MemberPointerType(::CppSharp::CppParser::AST::MemberPointerType* native);
static MemberPointerType^ __CreateInstance(::System::IntPtr native);
static MemberPointerType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
MemberPointerType();
MemberPointerType(CppSharp::Parser::AST::MemberPointerType^ _0);
@ -599,6 +607,7 @@ namespace CppSharp @@ -599,6 +607,7 @@ namespace CppSharp
TypedefType(::CppSharp::CppParser::AST::TypedefType* native);
static TypedefType^ __CreateInstance(::System::IntPtr native);
static TypedefType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TypedefType();
TypedefType(CppSharp::Parser::AST::TypedefType^ _0);
@ -618,6 +627,7 @@ namespace CppSharp @@ -618,6 +627,7 @@ namespace CppSharp
AttributedType(::CppSharp::CppParser::AST::AttributedType* native);
static AttributedType^ __CreateInstance(::System::IntPtr native);
static AttributedType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
AttributedType();
AttributedType(CppSharp::Parser::AST::AttributedType^ _0);
@ -643,6 +653,7 @@ namespace CppSharp @@ -643,6 +653,7 @@ namespace CppSharp
DecayedType(::CppSharp::CppParser::AST::DecayedType* native);
static DecayedType^ __CreateInstance(::System::IntPtr native);
static DecayedType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
DecayedType();
DecayedType(CppSharp::Parser::AST::DecayedType^ _0);
@ -693,6 +704,7 @@ namespace CppSharp @@ -693,6 +704,7 @@ namespace CppSharp
TemplateArgument(::CppSharp::CppParser::AST::TemplateArgument* native);
static TemplateArgument^ __CreateInstance(::System::IntPtr native);
static TemplateArgument^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TemplateArgument();
TemplateArgument(CppSharp::Parser::AST::TemplateArgument^ _0);
@ -723,7 +735,7 @@ namespace CppSharp @@ -723,7 +735,7 @@ namespace CppSharp
void set(long);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -733,6 +745,7 @@ namespace CppSharp @@ -733,6 +745,7 @@ namespace CppSharp
TemplateSpecializationType(::CppSharp::CppParser::AST::TemplateSpecializationType* native);
static TemplateSpecializationType^ __CreateInstance(::System::IntPtr native);
static TemplateSpecializationType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TemplateSpecializationType();
TemplateSpecializationType(CppSharp::Parser::AST::TemplateSpecializationType^ _0);
@ -776,6 +789,7 @@ namespace CppSharp @@ -776,6 +789,7 @@ namespace CppSharp
TemplateParameter(::CppSharp::CppParser::AST::TemplateParameter* native);
static TemplateParameter^ __CreateInstance(::System::IntPtr native);
static TemplateParameter^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TemplateParameter();
TemplateParameter(CppSharp::Parser::AST::TemplateParameter^ _0);
@ -798,7 +812,7 @@ namespace CppSharp @@ -798,7 +812,7 @@ namespace CppSharp
virtual bool Equals(::System::Object^ obj) override;
private:
protected:
bool __ownsNativeInstance;
};
@ -808,6 +822,7 @@ namespace CppSharp @@ -808,6 +822,7 @@ namespace CppSharp
TemplateParameterType(::CppSharp::CppParser::AST::TemplateParameterType* native);
static TemplateParameterType^ __CreateInstance(::System::IntPtr native);
static TemplateParameterType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TemplateParameterType();
TemplateParameterType(CppSharp::Parser::AST::TemplateParameterType^ _0);
@ -845,6 +860,7 @@ namespace CppSharp @@ -845,6 +860,7 @@ namespace CppSharp
TemplateParameterSubstitutionType(::CppSharp::CppParser::AST::TemplateParameterSubstitutionType* native);
static TemplateParameterSubstitutionType^ __CreateInstance(::System::IntPtr native);
static TemplateParameterSubstitutionType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TemplateParameterSubstitutionType();
TemplateParameterSubstitutionType(CppSharp::Parser::AST::TemplateParameterSubstitutionType^ _0);
@ -864,6 +880,7 @@ namespace CppSharp @@ -864,6 +880,7 @@ namespace CppSharp
InjectedClassNameType(::CppSharp::CppParser::AST::InjectedClassNameType* native);
static InjectedClassNameType^ __CreateInstance(::System::IntPtr native);
static InjectedClassNameType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
InjectedClassNameType();
InjectedClassNameType(CppSharp::Parser::AST::InjectedClassNameType^ _0);
@ -889,6 +906,7 @@ namespace CppSharp @@ -889,6 +906,7 @@ namespace CppSharp
DependentNameType(::CppSharp::CppParser::AST::DependentNameType* native);
static DependentNameType^ __CreateInstance(::System::IntPtr native);
static DependentNameType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
DependentNameType();
DependentNameType(CppSharp::Parser::AST::DependentNameType^ _0);
@ -902,6 +920,7 @@ namespace CppSharp @@ -902,6 +920,7 @@ namespace CppSharp
PackExpansionType(::CppSharp::CppParser::AST::PackExpansionType* native);
static PackExpansionType^ __CreateInstance(::System::IntPtr native);
static PackExpansionType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
PackExpansionType();
PackExpansionType(CppSharp::Parser::AST::PackExpansionType^ _0);
@ -915,6 +934,7 @@ namespace CppSharp @@ -915,6 +934,7 @@ namespace CppSharp
BuiltinType(::CppSharp::CppParser::AST::BuiltinType* native);
static BuiltinType^ __CreateInstance(::System::IntPtr native);
static BuiltinType^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
BuiltinType();
BuiltinType(CppSharp::Parser::AST::BuiltinType^ _0);
@ -941,6 +961,7 @@ namespace CppSharp @@ -941,6 +961,7 @@ namespace CppSharp
VTableComponent(::CppSharp::CppParser::AST::VTableComponent* native);
static VTableComponent^ __CreateInstance(::System::IntPtr native);
static VTableComponent^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
VTableComponent();
VTableComponent(CppSharp::Parser::AST::VTableComponent^ _0);
@ -965,7 +986,7 @@ namespace CppSharp @@ -965,7 +986,7 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Declaration^);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -982,6 +1003,7 @@ namespace CppSharp @@ -982,6 +1003,7 @@ namespace CppSharp
VTableLayout(::CppSharp::CppParser::AST::VTableLayout* native);
static VTableLayout^ __CreateInstance(::System::IntPtr native);
static VTableLayout^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
VTableLayout();
VTableLayout(CppSharp::Parser::AST::VTableLayout^ _0);
@ -999,7 +1021,7 @@ namespace CppSharp @@ -999,7 +1021,7 @@ namespace CppSharp
void clearComponents();
private:
protected:
bool __ownsNativeInstance;
};
@ -1016,6 +1038,7 @@ namespace CppSharp @@ -1016,6 +1038,7 @@ namespace CppSharp
VFTableInfo(::CppSharp::CppParser::AST::VFTableInfo* native);
static VFTableInfo^ __CreateInstance(::System::IntPtr native);
static VFTableInfo^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
VFTableInfo();
VFTableInfo(CppSharp::Parser::AST::VFTableInfo^ _0);
@ -1046,7 +1069,7 @@ namespace CppSharp @@ -1046,7 +1069,7 @@ namespace CppSharp
void set(CppSharp::Parser::AST::VTableLayout^);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -1063,6 +1086,7 @@ namespace CppSharp @@ -1063,6 +1086,7 @@ namespace CppSharp
ClassLayout(::CppSharp::CppParser::AST::ClassLayout* native);
static ClassLayout^ __CreateInstance(::System::IntPtr native);
static ClassLayout^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ClassLayout();
ClassLayout(CppSharp::Parser::AST::ClassLayout^ _0);
@ -1122,7 +1146,7 @@ namespace CppSharp @@ -1122,7 +1146,7 @@ namespace CppSharp
void clearVFTables();
private:
protected:
bool __ownsNativeInstance;
};
@ -1139,6 +1163,7 @@ namespace CppSharp @@ -1139,6 +1163,7 @@ namespace CppSharp
Declaration(::CppSharp::CppParser::AST::Declaration* native);
static Declaration^ __CreateInstance(::System::IntPtr native);
static Declaration^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Declaration(CppSharp::Parser::AST::DeclarationKind kind);
Declaration(CppSharp::Parser::AST::Declaration^ _0);
@ -1240,7 +1265,7 @@ namespace CppSharp @@ -1240,7 +1265,7 @@ namespace CppSharp
void clearPreprocessedEntities();
private:
protected:
bool __ownsNativeInstance;
};
@ -1250,6 +1275,7 @@ namespace CppSharp @@ -1250,6 +1275,7 @@ namespace CppSharp
DeclarationContext(::CppSharp::CppParser::AST::DeclarationContext* native);
static DeclarationContext^ __CreateInstance(::System::IntPtr native);
static DeclarationContext^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
DeclarationContext(CppSharp::Parser::AST::DeclarationKind kind);
DeclarationContext(CppSharp::Parser::AST::DeclarationContext^ _0);
@ -1357,6 +1383,7 @@ namespace CppSharp @@ -1357,6 +1383,7 @@ namespace CppSharp
TypedefDecl(::CppSharp::CppParser::AST::TypedefDecl* native);
static TypedefDecl^ __CreateInstance(::System::IntPtr native);
static TypedefDecl^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TypedefDecl();
TypedefDecl(CppSharp::Parser::AST::TypedefDecl^ _0);
@ -1376,6 +1403,7 @@ namespace CppSharp @@ -1376,6 +1403,7 @@ namespace CppSharp
Friend(::CppSharp::CppParser::AST::Friend* native);
static Friend^ __CreateInstance(::System::IntPtr native);
static Friend^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Friend();
Friend(CppSharp::Parser::AST::Friend^ _0);
@ -1402,6 +1430,7 @@ namespace CppSharp @@ -1402,6 +1430,7 @@ namespace CppSharp
Statement(::CppSharp::CppParser::AST::Statement* native);
static Statement^ __CreateInstance(::System::IntPtr native);
static Statement^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Statement(CppSharp::Parser::AST::Statement^ _0);
~Statement();
@ -1424,7 +1453,7 @@ namespace CppSharp @@ -1424,7 +1453,7 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Declaration^);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -1434,6 +1463,7 @@ namespace CppSharp @@ -1434,6 +1463,7 @@ namespace CppSharp
Expression(::CppSharp::CppParser::AST::Expression* native);
static Expression^ __CreateInstance(::System::IntPtr native);
static Expression^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Expression(CppSharp::Parser::AST::Expression^ _0);
~Expression();
@ -1445,6 +1475,7 @@ namespace CppSharp @@ -1445,6 +1475,7 @@ namespace CppSharp
BinaryOperator(::CppSharp::CppParser::AST::BinaryOperator* native);
static BinaryOperator^ __CreateInstance(::System::IntPtr native);
static BinaryOperator^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
BinaryOperator(CppSharp::Parser::AST::BinaryOperator^ _0);
~BinaryOperator();
@ -1474,6 +1505,7 @@ namespace CppSharp @@ -1474,6 +1505,7 @@ namespace CppSharp
CXXConstructExpr(::CppSharp::CppParser::AST::CXXConstructExpr* native);
static CXXConstructExpr^ __CreateInstance(::System::IntPtr native);
static CXXConstructExpr^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
CXXConstructExpr(CppSharp::Parser::AST::CXXConstructExpr^ _0);
~CXXConstructExpr();
@ -1496,6 +1528,7 @@ namespace CppSharp @@ -1496,6 +1528,7 @@ namespace CppSharp
Parameter(::CppSharp::CppParser::AST::Parameter* native);
static Parameter^ __CreateInstance(::System::IntPtr native);
static Parameter^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Parameter();
Parameter(CppSharp::Parser::AST::Parameter^ _0);
@ -1539,6 +1572,7 @@ namespace CppSharp @@ -1539,6 +1572,7 @@ namespace CppSharp
Function(::CppSharp::CppParser::AST::Function* native);
static Function^ __CreateInstance(::System::IntPtr native);
static Function^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Function();
Function(CppSharp::Parser::AST::Function^ _0);
@ -1635,6 +1669,7 @@ namespace CppSharp @@ -1635,6 +1669,7 @@ namespace CppSharp
Method(::CppSharp::CppParser::AST::Method* native);
static Method^ __CreateInstance(::System::IntPtr native);
static Method^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Method();
Method(CppSharp::Parser::AST::Method^ _0);
@ -1732,6 +1767,7 @@ namespace CppSharp @@ -1732,6 +1767,7 @@ namespace CppSharp
Item(::CppSharp::CppParser::AST::Enumeration::Item* native);
static Item^ __CreateInstance(::System::IntPtr native);
static Item^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Item();
Item(CppSharp::Parser::AST::Enumeration::Item^ _0);
@ -1753,6 +1789,7 @@ namespace CppSharp @@ -1753,6 +1789,7 @@ namespace CppSharp
Enumeration(::CppSharp::CppParser::AST::Enumeration* native);
static Enumeration^ __CreateInstance(::System::IntPtr native);
static Enumeration^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Enumeration();
Enumeration(CppSharp::Parser::AST::Enumeration^ _0);
@ -1795,6 +1832,7 @@ namespace CppSharp @@ -1795,6 +1832,7 @@ namespace CppSharp
Variable(::CppSharp::CppParser::AST::Variable* native);
static Variable^ __CreateInstance(::System::IntPtr native);
static Variable^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Variable();
Variable(CppSharp::Parser::AST::Variable^ _0);
@ -1827,6 +1865,7 @@ namespace CppSharp @@ -1827,6 +1865,7 @@ namespace CppSharp
BaseClassSpecifier(::CppSharp::CppParser::AST::BaseClassSpecifier* native);
static BaseClassSpecifier^ __CreateInstance(::System::IntPtr native);
static BaseClassSpecifier^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
BaseClassSpecifier();
BaseClassSpecifier(CppSharp::Parser::AST::BaseClassSpecifier^ _0);
@ -1857,7 +1896,7 @@ namespace CppSharp @@ -1857,7 +1896,7 @@ namespace CppSharp
void set(int);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -1867,6 +1906,7 @@ namespace CppSharp @@ -1867,6 +1906,7 @@ namespace CppSharp
Field(::CppSharp::CppParser::AST::Field* native);
static Field^ __CreateInstance(::System::IntPtr native);
static Field^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Field();
Field(CppSharp::Parser::AST::Field^ _0);
@ -1910,6 +1950,7 @@ namespace CppSharp @@ -1910,6 +1950,7 @@ namespace CppSharp
AccessSpecifierDecl(::CppSharp::CppParser::AST::AccessSpecifierDecl* native);
static AccessSpecifierDecl^ __CreateInstance(::System::IntPtr native);
static AccessSpecifierDecl^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
AccessSpecifierDecl();
AccessSpecifierDecl(CppSharp::Parser::AST::AccessSpecifierDecl^ _0);
@ -1923,6 +1964,7 @@ namespace CppSharp @@ -1923,6 +1964,7 @@ namespace CppSharp
Class(::CppSharp::CppParser::AST::Class* native);
static Class^ __CreateInstance(::System::IntPtr native);
static Class^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Class();
Class(CppSharp::Parser::AST::Class^ _0);
@ -2040,6 +2082,7 @@ namespace CppSharp @@ -2040,6 +2082,7 @@ namespace CppSharp
Template(::CppSharp::CppParser::AST::Template* native);
static Template^ __CreateInstance(::System::IntPtr native);
static Template^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Template(CppSharp::Parser::AST::DeclarationKind kind);
Template();
@ -2072,6 +2115,7 @@ namespace CppSharp @@ -2072,6 +2115,7 @@ namespace CppSharp
ClassTemplate(::CppSharp::CppParser::AST::ClassTemplate* native);
static ClassTemplate^ __CreateInstance(::System::IntPtr native);
static ClassTemplate^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ClassTemplate();
ClassTemplate(CppSharp::Parser::AST::ClassTemplate^ _0);
@ -2096,6 +2140,7 @@ namespace CppSharp @@ -2096,6 +2140,7 @@ namespace CppSharp
ClassTemplateSpecialization(::CppSharp::CppParser::AST::ClassTemplateSpecialization* native);
static ClassTemplateSpecialization^ __CreateInstance(::System::IntPtr native);
static ClassTemplateSpecialization^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ClassTemplateSpecialization();
ClassTemplateSpecialization(CppSharp::Parser::AST::ClassTemplateSpecialization^ _0);
@ -2132,6 +2177,7 @@ namespace CppSharp @@ -2132,6 +2177,7 @@ namespace CppSharp
ClassTemplatePartialSpecialization(::CppSharp::CppParser::AST::ClassTemplatePartialSpecialization* native);
static ClassTemplatePartialSpecialization^ __CreateInstance(::System::IntPtr native);
static ClassTemplatePartialSpecialization^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ClassTemplatePartialSpecialization();
ClassTemplatePartialSpecialization(CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ _0);
@ -2145,6 +2191,7 @@ namespace CppSharp @@ -2145,6 +2191,7 @@ namespace CppSharp
FunctionTemplate(::CppSharp::CppParser::AST::FunctionTemplate* native);
static FunctionTemplate^ __CreateInstance(::System::IntPtr native);
static FunctionTemplate^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
FunctionTemplate();
FunctionTemplate(CppSharp::Parser::AST::FunctionTemplate^ _0);
@ -2176,6 +2223,7 @@ namespace CppSharp @@ -2176,6 +2223,7 @@ namespace CppSharp
FunctionTemplateSpecialization(::CppSharp::CppParser::AST::FunctionTemplateSpecialization* native);
static FunctionTemplateSpecialization^ __CreateInstance(::System::IntPtr native);
static FunctionTemplateSpecialization^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
FunctionTemplateSpecialization();
FunctionTemplateSpecialization(CppSharp::Parser::AST::FunctionTemplateSpecialization^ _0);
@ -2211,7 +2259,7 @@ namespace CppSharp @@ -2211,7 +2259,7 @@ namespace CppSharp
void clearArguments();
private:
protected:
bool __ownsNativeInstance;
};
@ -2221,6 +2269,7 @@ namespace CppSharp @@ -2221,6 +2269,7 @@ namespace CppSharp
Namespace(::CppSharp::CppParser::AST::Namespace* native);
static Namespace^ __CreateInstance(::System::IntPtr native);
static Namespace^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Namespace();
Namespace(CppSharp::Parser::AST::Namespace^ _0);
@ -2240,6 +2289,7 @@ namespace CppSharp @@ -2240,6 +2289,7 @@ namespace CppSharp
PreprocessedEntity(::CppSharp::CppParser::AST::PreprocessedEntity* native);
static PreprocessedEntity^ __CreateInstance(::System::IntPtr native);
static PreprocessedEntity^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
PreprocessedEntity();
PreprocessedEntity(CppSharp::Parser::AST::PreprocessedEntity^ _0);
@ -2259,6 +2309,7 @@ namespace CppSharp @@ -2259,6 +2309,7 @@ namespace CppSharp
MacroDefinition(::CppSharp::CppParser::AST::MacroDefinition* native);
static MacroDefinition^ __CreateInstance(::System::IntPtr native);
static MacroDefinition^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
MacroDefinition();
MacroDefinition(CppSharp::Parser::AST::MacroDefinition^ _0);
@ -2278,6 +2329,7 @@ namespace CppSharp @@ -2278,6 +2329,7 @@ namespace CppSharp
MacroExpansion(::CppSharp::CppParser::AST::MacroExpansion* native);
static MacroExpansion^ __CreateInstance(::System::IntPtr native);
static MacroExpansion^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
MacroExpansion();
MacroExpansion(CppSharp::Parser::AST::MacroExpansion^ _0);
@ -2303,6 +2355,7 @@ namespace CppSharp @@ -2303,6 +2355,7 @@ namespace CppSharp
TranslationUnit(::CppSharp::CppParser::AST::TranslationUnit* native);
static TranslationUnit^ __CreateInstance(::System::IntPtr native);
static TranslationUnit^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TranslationUnit();
TranslationUnit(CppSharp::Parser::AST::TranslationUnit^ _0);
@ -2346,6 +2399,7 @@ namespace CppSharp @@ -2346,6 +2399,7 @@ namespace CppSharp
NativeLibrary(::CppSharp::CppParser::AST::NativeLibrary* native);
static NativeLibrary^ __CreateInstance(::System::IntPtr native);
static NativeLibrary^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
NativeLibrary();
NativeLibrary(CppSharp::Parser::AST::NativeLibrary^ _0);
@ -2386,7 +2440,7 @@ namespace CppSharp @@ -2386,7 +2440,7 @@ namespace CppSharp
void clearDependencies();
private:
protected:
bool __ownsNativeInstance;
};
@ -2403,6 +2457,7 @@ namespace CppSharp @@ -2403,6 +2457,7 @@ namespace CppSharp
ASTContext(::CppSharp::CppParser::AST::ASTContext* native);
static ASTContext^ __CreateInstance(::System::IntPtr native);
static ASTContext^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ASTContext();
ASTContext(CppSharp::Parser::AST::ASTContext^ _0);
@ -2420,7 +2475,7 @@ namespace CppSharp @@ -2420,7 +2475,7 @@ namespace CppSharp
void clearTranslationUnits();
private:
protected:
bool __ownsNativeInstance;
};
@ -2437,6 +2492,7 @@ namespace CppSharp @@ -2437,6 +2492,7 @@ namespace CppSharp
Comment(::CppSharp::CppParser::AST::Comment* native);
static Comment^ __CreateInstance(::System::IntPtr native);
static Comment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Comment(CppSharp::Parser::AST::CommentKind kind);
Comment(CppSharp::Parser::AST::Comment^ _0);
@ -2449,7 +2505,7 @@ namespace CppSharp @@ -2449,7 +2505,7 @@ namespace CppSharp
void set(CppSharp::Parser::AST::CommentKind);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -2459,6 +2515,7 @@ namespace CppSharp @@ -2459,6 +2515,7 @@ namespace CppSharp
BlockContentComment(::CppSharp::CppParser::AST::BlockContentComment* native);
static BlockContentComment^ __CreateInstance(::System::IntPtr native);
static BlockContentComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
BlockContentComment();
BlockContentComment(CppSharp::Parser::AST::CommentKind Kind);
@ -2474,6 +2531,7 @@ namespace CppSharp @@ -2474,6 +2531,7 @@ namespace CppSharp
FullComment(::CppSharp::CppParser::AST::FullComment* native);
static FullComment^ __CreateInstance(::System::IntPtr native);
static FullComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
FullComment();
FullComment(CppSharp::Parser::AST::FullComment^ _0);
@ -2509,6 +2567,7 @@ namespace CppSharp @@ -2509,6 +2567,7 @@ namespace CppSharp
Argument(::CppSharp::CppParser::AST::BlockCommandComment::Argument* native);
static Argument^ __CreateInstance(::System::IntPtr native);
static Argument^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Argument();
Argument(CppSharp::Parser::AST::BlockCommandComment::Argument^ _0);
@ -2521,12 +2580,13 @@ namespace CppSharp @@ -2521,12 +2580,13 @@ namespace CppSharp
void set(System::String^);
}
private:
protected:
bool __ownsNativeInstance;
};
BlockCommandComment(::CppSharp::CppParser::AST::BlockCommandComment* native);
static BlockCommandComment^ __CreateInstance(::System::IntPtr native);
static BlockCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
BlockCommandComment();
BlockCommandComment(CppSharp::Parser::AST::CommentKind Kind);
@ -2566,6 +2626,7 @@ namespace CppSharp @@ -2566,6 +2626,7 @@ namespace CppSharp
ParamCommandComment(::CppSharp::CppParser::AST::ParamCommandComment* native);
static ParamCommandComment^ __CreateInstance(::System::IntPtr native);
static ParamCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ParamCommandComment();
ParamCommandComment(CppSharp::Parser::AST::ParamCommandComment^ _0);
@ -2591,6 +2652,7 @@ namespace CppSharp @@ -2591,6 +2652,7 @@ namespace CppSharp
TParamCommandComment(::CppSharp::CppParser::AST::TParamCommandComment* native);
static TParamCommandComment^ __CreateInstance(::System::IntPtr native);
static TParamCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TParamCommandComment();
TParamCommandComment(CppSharp::Parser::AST::TParamCommandComment^ _0);
@ -2615,6 +2677,7 @@ namespace CppSharp @@ -2615,6 +2677,7 @@ namespace CppSharp
VerbatimBlockLineComment(::CppSharp::CppParser::AST::VerbatimBlockLineComment* native);
static VerbatimBlockLineComment^ __CreateInstance(::System::IntPtr native);
static VerbatimBlockLineComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
VerbatimBlockLineComment();
VerbatimBlockLineComment(CppSharp::Parser::AST::VerbatimBlockLineComment^ _0);
@ -2634,6 +2697,7 @@ namespace CppSharp @@ -2634,6 +2697,7 @@ namespace CppSharp
VerbatimBlockComment(::CppSharp::CppParser::AST::VerbatimBlockComment* native);
static VerbatimBlockComment^ __CreateInstance(::System::IntPtr native);
static VerbatimBlockComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
VerbatimBlockComment();
VerbatimBlockComment(CppSharp::Parser::AST::VerbatimBlockComment^ _0);
@ -2658,6 +2722,7 @@ namespace CppSharp @@ -2658,6 +2722,7 @@ namespace CppSharp
VerbatimLineComment(::CppSharp::CppParser::AST::VerbatimLineComment* native);
static VerbatimLineComment^ __CreateInstance(::System::IntPtr native);
static VerbatimLineComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
VerbatimLineComment();
VerbatimLineComment(CppSharp::Parser::AST::VerbatimLineComment^ _0);
@ -2677,6 +2742,7 @@ namespace CppSharp @@ -2677,6 +2742,7 @@ namespace CppSharp
InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native);
static InlineContentComment^ __CreateInstance(::System::IntPtr native);
static InlineContentComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
InlineContentComment();
InlineContentComment(CppSharp::Parser::AST::CommentKind Kind);
@ -2692,6 +2758,7 @@ namespace CppSharp @@ -2692,6 +2758,7 @@ namespace CppSharp
ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native);
static ParagraphComment^ __CreateInstance(::System::IntPtr native);
static ParagraphComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ParagraphComment();
ParagraphComment(CppSharp::Parser::AST::ParagraphComment^ _0);
@ -2741,6 +2808,7 @@ namespace CppSharp @@ -2741,6 +2808,7 @@ namespace CppSharp
Argument(::CppSharp::CppParser::AST::InlineCommandComment::Argument* native);
static Argument^ __CreateInstance(::System::IntPtr native);
static Argument^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Argument();
Argument(CppSharp::Parser::AST::InlineCommandComment::Argument^ _0);
@ -2753,12 +2821,13 @@ namespace CppSharp @@ -2753,12 +2821,13 @@ namespace CppSharp
void set(System::String^);
}
private:
protected:
bool __ownsNativeInstance;
};
InlineCommandComment(::CppSharp::CppParser::AST::InlineCommandComment* native);
static InlineCommandComment^ __CreateInstance(::System::IntPtr native);
static InlineCommandComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
InlineCommandComment();
InlineCommandComment(CppSharp::Parser::AST::InlineCommandComment^ _0);
@ -2789,6 +2858,7 @@ namespace CppSharp @@ -2789,6 +2858,7 @@ namespace CppSharp
HTMLTagComment(::CppSharp::CppParser::AST::HTMLTagComment* native);
static HTMLTagComment^ __CreateInstance(::System::IntPtr native);
static HTMLTagComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
HTMLTagComment();
HTMLTagComment(CppSharp::Parser::AST::CommentKind Kind);
@ -2815,6 +2885,7 @@ namespace CppSharp @@ -2815,6 +2885,7 @@ namespace CppSharp
Attribute(::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute* native);
static Attribute^ __CreateInstance(::System::IntPtr native);
static Attribute^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
Attribute();
Attribute(CppSharp::Parser::AST::HTMLStartTagComment::Attribute^ _0);
@ -2833,12 +2904,13 @@ namespace CppSharp @@ -2833,12 +2904,13 @@ namespace CppSharp
void set(System::String^);
}
private:
protected:
bool __ownsNativeInstance;
};
HTMLStartTagComment(::CppSharp::CppParser::AST::HTMLStartTagComment* native);
static HTMLStartTagComment^ __CreateInstance(::System::IntPtr native);
static HTMLStartTagComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
HTMLStartTagComment();
HTMLStartTagComment(CppSharp::Parser::AST::HTMLStartTagComment^ _0);
@ -2869,6 +2941,7 @@ namespace CppSharp @@ -2869,6 +2941,7 @@ namespace CppSharp
HTMLEndTagComment(::CppSharp::CppParser::AST::HTMLEndTagComment* native);
static HTMLEndTagComment^ __CreateInstance(::System::IntPtr native);
static HTMLEndTagComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
HTMLEndTagComment();
HTMLEndTagComment(CppSharp::Parser::AST::HTMLEndTagComment^ _0);
@ -2888,6 +2961,7 @@ namespace CppSharp @@ -2888,6 +2961,7 @@ namespace CppSharp
TextComment(::CppSharp::CppParser::AST::TextComment* native);
static TextComment^ __CreateInstance(::System::IntPtr native);
static TextComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
TextComment();
TextComment(CppSharp::Parser::AST::TextComment^ _0);
@ -2914,6 +2988,7 @@ namespace CppSharp @@ -2914,6 +2988,7 @@ namespace CppSharp
RawComment(::CppSharp::CppParser::AST::RawComment* native);
static RawComment^ __CreateInstance(::System::IntPtr native);
static RawComment^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
RawComment();
RawComment(CppSharp::Parser::AST::RawComment^ _0);
@ -2944,7 +3019,7 @@ namespace CppSharp @@ -2944,7 +3019,7 @@ namespace CppSharp
void set(CppSharp::Parser::AST::FullComment^);
}
private:
protected:
bool __ownsNativeInstance;
};
}

52
src/CppParser/Bindings/CLI/CppParser.cpp

@ -13,7 +13,14 @@ CppSharp::Parser::ParserOptions::ParserOptions(::CppSharp::CppParser::ParserOpti @@ -13,7 +13,14 @@ CppSharp::Parser::ParserOptions::ParserOptions(::CppSharp::CppParser::ParserOpti
CppSharp::Parser::ParserOptions^ CppSharp::Parser::ParserOptions::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::ParserOptions((::CppSharp::CppParser::ParserOptions*) native.ToPointer());
return ::CppSharp::Parser::ParserOptions::__CreateInstance(native, false);
}
CppSharp::Parser::ParserOptions^ CppSharp::Parser::ParserOptions::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
{
::CppSharp::Parser::ParserOptions^ result = gcnew ::CppSharp::Parser::ParserOptions((::CppSharp::CppParser::ParserOptions*) native.ToPointer());
result->__ownsNativeInstance = __ownsNativeInstance;
return result;
}
CppSharp::Parser::ParserOptions::~ParserOptions()
@ -23,8 +30,8 @@ CppSharp::Parser::ParserOptions::~ParserOptions() @@ -23,8 +30,8 @@ CppSharp::Parser::ParserOptions::~ParserOptions()
}
CppSharp::Parser::ParserOptions::ParserOptions()
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::ParserOptions();
}
@ -143,8 +150,8 @@ void CppSharp::Parser::ParserOptions::clearLibraryDirs() @@ -143,8 +150,8 @@ void CppSharp::Parser::ParserOptions::clearLibraryDirs()
}
CppSharp::Parser::ParserOptions::ParserOptions(CppSharp::Parser::ParserOptions^ _0)
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
auto &arg0 = *(::CppSharp::CppParser::ParserOptions*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::ParserOptions(arg0);
}
@ -311,7 +318,14 @@ CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(::CppSharp::CppParser::Pars @@ -311,7 +318,14 @@ CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(::CppSharp::CppParser::Pars
CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserDiagnostic::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*) native.ToPointer());
return ::CppSharp::Parser::ParserDiagnostic::__CreateInstance(native, false);
}
CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserDiagnostic::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
{
::CppSharp::Parser::ParserDiagnostic^ result = gcnew ::CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*) native.ToPointer());
result->__ownsNativeInstance = __ownsNativeInstance;
return result;
}
CppSharp::Parser::ParserDiagnostic::~ParserDiagnostic()
@ -321,14 +335,14 @@ CppSharp::Parser::ParserDiagnostic::~ParserDiagnostic() @@ -321,14 +335,14 @@ CppSharp::Parser::ParserDiagnostic::~ParserDiagnostic()
}
CppSharp::Parser::ParserDiagnostic::ParserDiagnostic()
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::ParserDiagnostic();
}
CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(CppSharp::Parser::ParserDiagnostic^ _0)
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
auto &arg0 = *(::CppSharp::CppParser::ParserDiagnostic*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::ParserDiagnostic(arg0);
}
@ -409,7 +423,14 @@ CppSharp::Parser::ParserResult::ParserResult(::CppSharp::CppParser::ParserResult @@ -409,7 +423,14 @@ CppSharp::Parser::ParserResult::ParserResult(::CppSharp::CppParser::ParserResult
CppSharp::Parser::ParserResult^ CppSharp::Parser::ParserResult::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::ParserResult((::CppSharp::CppParser::ParserResult*) native.ToPointer());
return ::CppSharp::Parser::ParserResult::__CreateInstance(native, false);
}
CppSharp::Parser::ParserResult^ CppSharp::Parser::ParserResult::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
{
::CppSharp::Parser::ParserResult^ result = gcnew ::CppSharp::Parser::ParserResult((::CppSharp::CppParser::ParserResult*) native.ToPointer());
result->__ownsNativeInstance = __ownsNativeInstance;
return result;
}
CppSharp::Parser::ParserResult::~ParserResult()
@ -419,14 +440,14 @@ CppSharp::Parser::ParserResult::~ParserResult() @@ -419,14 +440,14 @@ CppSharp::Parser::ParserResult::~ParserResult()
}
CppSharp::Parser::ParserResult::ParserResult()
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::ParserResult();
}
CppSharp::Parser::ParserResult::ParserResult(CppSharp::Parser::ParserResult^ _0)
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
auto &arg0 = *(::CppSharp::CppParser::ParserResult*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::ParserResult(arg0);
}
@ -503,7 +524,14 @@ CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* n @@ -503,7 +524,14 @@ CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* n
CppSharp::Parser::ClangParser^ CppSharp::Parser::ClangParser::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::ClangParser((::CppSharp::CppParser::ClangParser*) native.ToPointer());
return ::CppSharp::Parser::ClangParser::__CreateInstance(native, false);
}
CppSharp::Parser::ClangParser^ CppSharp::Parser::ClangParser::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
{
::CppSharp::Parser::ClangParser^ result = gcnew ::CppSharp::Parser::ClangParser((::CppSharp::CppParser::ClangParser*) native.ToPointer());
result->__ownsNativeInstance = __ownsNativeInstance;
return result;
}
CppSharp::Parser::ClangParser::~ClangParser()
@ -537,14 +565,14 @@ CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ClangParser::GetTargetInfo @@ -537,14 +565,14 @@ CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ClangParser::GetTargetInfo
}
CppSharp::Parser::ClangParser::ClangParser()
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::ClangParser();
}
CppSharp::Parser::ClangParser::ClangParser(CppSharp::Parser::ClangParser^ _0)
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
auto &arg0 = *(::CppSharp::CppParser::ClangParser*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::ClangParser(arg0);
}

12
src/CppParser/Bindings/CLI/CppParser.h

@ -78,6 +78,7 @@ namespace CppSharp @@ -78,6 +78,7 @@ namespace CppSharp
ParserOptions(::CppSharp::CppParser::ParserOptions* native);
static ParserOptions^ __CreateInstance(::System::IntPtr native);
static ParserOptions^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ParserOptions();
ParserOptions(CppSharp::Parser::ParserOptions^ _0);
@ -210,7 +211,7 @@ namespace CppSharp @@ -210,7 +211,7 @@ namespace CppSharp
void clearLibraryDirs();
private:
protected:
bool __ownsNativeInstance;
};
@ -227,6 +228,7 @@ namespace CppSharp @@ -227,6 +228,7 @@ namespace CppSharp
ParserDiagnostic(::CppSharp::CppParser::ParserDiagnostic* native);
static ParserDiagnostic^ __CreateInstance(::System::IntPtr native);
static ParserDiagnostic^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ParserDiagnostic();
ParserDiagnostic(CppSharp::Parser::ParserDiagnostic^ _0);
@ -263,7 +265,7 @@ namespace CppSharp @@ -263,7 +265,7 @@ namespace CppSharp
void set(int);
}
private:
protected:
bool __ownsNativeInstance;
};
@ -280,6 +282,7 @@ namespace CppSharp @@ -280,6 +282,7 @@ namespace CppSharp
ParserResult(::CppSharp::CppParser::ParserResult* native);
static ParserResult^ __CreateInstance(::System::IntPtr native);
static ParserResult^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ParserResult();
ParserResult(CppSharp::Parser::ParserResult^ _0);
@ -315,7 +318,7 @@ namespace CppSharp @@ -315,7 +318,7 @@ namespace CppSharp
void clearDiagnostics();
private:
protected:
bool __ownsNativeInstance;
};
@ -332,6 +335,7 @@ namespace CppSharp @@ -332,6 +335,7 @@ namespace CppSharp
ClangParser(::CppSharp::CppParser::ClangParser* native);
static ClangParser^ __CreateInstance(::System::IntPtr native);
static ClangParser^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ClangParser();
ClangParser(CppSharp::Parser::ClangParser^ _0);
@ -344,7 +348,7 @@ namespace CppSharp @@ -344,7 +348,7 @@ namespace CppSharp
static CppSharp::Parser::ParserTargetInfo^ GetTargetInfo(CppSharp::Parser::ParserOptions^ Opts);
private:
protected:
bool __ownsNativeInstance;
};
}

13
src/CppParser/Bindings/CLI/Target.cpp

@ -11,7 +11,14 @@ CppSharp::Parser::ParserTargetInfo::ParserTargetInfo(::CppSharp::CppParser::Pars @@ -11,7 +11,14 @@ CppSharp::Parser::ParserTargetInfo::ParserTargetInfo(::CppSharp::CppParser::Pars
CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserTargetInfo::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer());
return ::CppSharp::Parser::ParserTargetInfo::__CreateInstance(native, false);
}
CppSharp::Parser::ParserTargetInfo^ CppSharp::Parser::ParserTargetInfo::__CreateInstance(::System::IntPtr native, bool __ownsNativeInstance)
{
::CppSharp::Parser::ParserTargetInfo^ result = gcnew ::CppSharp::Parser::ParserTargetInfo((::CppSharp::CppParser::ParserTargetInfo*) native.ToPointer());
result->__ownsNativeInstance = __ownsNativeInstance;
return result;
}
CppSharp::Parser::ParserTargetInfo::~ParserTargetInfo()
@ -21,14 +28,14 @@ CppSharp::Parser::ParserTargetInfo::~ParserTargetInfo() @@ -21,14 +28,14 @@ CppSharp::Parser::ParserTargetInfo::~ParserTargetInfo()
}
CppSharp::Parser::ParserTargetInfo::ParserTargetInfo()
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::ParserTargetInfo();
}
CppSharp::Parser::ParserTargetInfo::ParserTargetInfo(CppSharp::Parser::ParserTargetInfo^ _0)
: __ownsNativeInstance(true)
{
__ownsNativeInstance = true;
auto &arg0 = *(::CppSharp::CppParser::ParserTargetInfo*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::ParserTargetInfo(arg0);
}

3
src/CppParser/Bindings/CLI/Target.h

@ -44,6 +44,7 @@ namespace CppSharp @@ -44,6 +44,7 @@ namespace CppSharp
ParserTargetInfo(::CppSharp::CppParser::ParserTargetInfo* native);
static ParserTargetInfo^ __CreateInstance(::System::IntPtr native);
static ParserTargetInfo^ __CreateInstance(::System::IntPtr native, bool __ownsNativeInstance);
ParserTargetInfo();
ParserTargetInfo(CppSharp::Parser::ParserTargetInfo^ _0);
@ -284,7 +285,7 @@ namespace CppSharp @@ -284,7 +285,7 @@ namespace CppSharp
void set(unsigned int);
}
private:
protected:
bool __ownsNativeInstance;
};
}

450
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs

File diff suppressed because it is too large Load Diff

24
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppParser.cs

@ -233,11 +233,11 @@ namespace CppSharp @@ -233,11 +233,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserOptions __CreateInstance(global::System.IntPtr native)
public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserOptions((ParserOptions.Internal*) native);
return new ParserOptions((ParserOptions.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserOptions __CreateInstance(ParserOptions.Internal native)
@ -663,11 +663,11 @@ namespace CppSharp @@ -663,11 +663,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native)
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserDiagnostic((ParserDiagnostic.Internal*) native);
return new ParserDiagnostic((ParserDiagnostic.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native)
@ -864,11 +864,11 @@ namespace CppSharp @@ -864,11 +864,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserResult __CreateInstance(global::System.IntPtr native)
public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserResult((ParserResult.Internal*) native);
return new ParserResult((ParserResult.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserResult __CreateInstance(ParserResult.Internal native)
@ -1043,11 +1043,11 @@ namespace CppSharp @@ -1043,11 +1043,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ClangParser __CreateInstance(global::System.IntPtr native)
public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ClangParser((ClangParser.Internal*) native);
return new ClangParser((ClangParser.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ClangParser __CreateInstance(ClangParser.Internal native)

6
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Target.cs

@ -173,11 +173,11 @@ namespace CppSharp @@ -173,11 +173,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native)
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserTargetInfo((ParserTargetInfo.Internal*) native);
return new ParserTargetInfo((ParserTargetInfo.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native)

450
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs

File diff suppressed because it is too large Load Diff

24
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppParser.cs

@ -233,11 +233,11 @@ namespace CppSharp @@ -233,11 +233,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserOptions __CreateInstance(global::System.IntPtr native)
public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserOptions((ParserOptions.Internal*) native);
return new ParserOptions((ParserOptions.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserOptions __CreateInstance(ParserOptions.Internal native)
@ -663,11 +663,11 @@ namespace CppSharp @@ -663,11 +663,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native)
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserDiagnostic((ParserDiagnostic.Internal*) native);
return new ParserDiagnostic((ParserDiagnostic.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native)
@ -864,11 +864,11 @@ namespace CppSharp @@ -864,11 +864,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserResult __CreateInstance(global::System.IntPtr native)
public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserResult((ParserResult.Internal*) native);
return new ParserResult((ParserResult.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserResult __CreateInstance(ParserResult.Internal native)
@ -1043,11 +1043,11 @@ namespace CppSharp @@ -1043,11 +1043,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ClangParser __CreateInstance(global::System.IntPtr native)
public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ClangParser((ClangParser.Internal*) native);
return new ClangParser((ClangParser.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ClangParser __CreateInstance(ClangParser.Internal native)

6
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Target.cs

@ -173,11 +173,11 @@ namespace CppSharp @@ -173,11 +173,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native)
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserTargetInfo((ParserTargetInfo.Internal*) native);
return new ParserTargetInfo((ParserTargetInfo.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native)

450
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs

File diff suppressed because it is too large Load Diff

24
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppParser.cs

@ -233,11 +233,11 @@ namespace CppSharp @@ -233,11 +233,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserOptions __CreateInstance(global::System.IntPtr native)
public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserOptions((ParserOptions.Internal*) native);
return new ParserOptions((ParserOptions.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserOptions __CreateInstance(ParserOptions.Internal native)
@ -663,11 +663,11 @@ namespace CppSharp @@ -663,11 +663,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native)
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserDiagnostic((ParserDiagnostic.Internal*) native);
return new ParserDiagnostic((ParserDiagnostic.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native)
@ -864,11 +864,11 @@ namespace CppSharp @@ -864,11 +864,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserResult __CreateInstance(global::System.IntPtr native)
public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserResult((ParserResult.Internal*) native);
return new ParserResult((ParserResult.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserResult __CreateInstance(ParserResult.Internal native)
@ -1043,11 +1043,11 @@ namespace CppSharp @@ -1043,11 +1043,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ClangParser __CreateInstance(global::System.IntPtr native)
public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ClangParser((ClangParser.Internal*) native);
return new ClangParser((ClangParser.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ClangParser __CreateInstance(ClangParser.Internal native)

6
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Target.cs

@ -173,11 +173,11 @@ namespace CppSharp @@ -173,11 +173,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native)
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserTargetInfo((ParserTargetInfo.Internal*) native);
return new ParserTargetInfo((ParserTargetInfo.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native)

450
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs

File diff suppressed because it is too large Load Diff

24
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppParser.cs

@ -233,11 +233,11 @@ namespace CppSharp @@ -233,11 +233,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserOptions>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserOptions __CreateInstance(global::System.IntPtr native)
public static ParserOptions __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserOptions((ParserOptions.Internal*) native);
return new ParserOptions((ParserOptions.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserOptions __CreateInstance(ParserOptions.Internal native)
@ -663,11 +663,11 @@ namespace CppSharp @@ -663,11 +663,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserDiagnostic>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native)
public static ParserDiagnostic __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserDiagnostic((ParserDiagnostic.Internal*) native);
return new ParserDiagnostic((ParserDiagnostic.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserDiagnostic __CreateInstance(ParserDiagnostic.Internal native)
@ -864,11 +864,11 @@ namespace CppSharp @@ -864,11 +864,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserResult>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserResult __CreateInstance(global::System.IntPtr native)
public static ParserResult __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserResult((ParserResult.Internal*) native);
return new ParserResult((ParserResult.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserResult __CreateInstance(ParserResult.Internal native)
@ -1043,11 +1043,11 @@ namespace CppSharp @@ -1043,11 +1043,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ClangParser>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ClangParser __CreateInstance(global::System.IntPtr native)
public static ClangParser __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ClangParser((ClangParser.Internal*) native);
return new ClangParser((ClangParser.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ClangParser __CreateInstance(ClangParser.Internal native)

6
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Target.cs

@ -173,11 +173,11 @@ namespace CppSharp @@ -173,11 +173,11 @@ namespace CppSharp
public global::System.IntPtr __Instance { get; protected set; }
public static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, ParserTargetInfo>();
private readonly bool __ownsNativeInstance;
private bool __ownsNativeInstance;
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native)
public static ParserTargetInfo __CreateInstance(global::System.IntPtr native, bool ownsNativeInstance = false)
{
return new ParserTargetInfo((ParserTargetInfo.Internal*) native);
return new ParserTargetInfo((ParserTargetInfo.Internal*) native) { __ownsNativeInstance = ownsNativeInstance };
}
public static ParserTargetInfo __CreateInstance(ParserTargetInfo.Internal native)

19
src/Generator/Generators/CLI/CLIHeadersTemplate.cs

@ -270,14 +270,23 @@ namespace CppSharp.Generators.CLI @@ -270,14 +270,23 @@ namespace CppSharp.Generators.CLI
GenerateClassVariables(@class);
if (CLIGenerator.ShouldGenerateClassNativeField(@class))
{
PushBlock(CLIBlockKind.AccessSpecifier);
WriteLine("protected:");
PopBlock(NewLineKind.IfNotEmpty);
PushBlock(CLIBlockKind.Fields);
WriteLineIndent("bool {0};", Helpers.OwnsNativeInstanceIdentifier);
PopBlock();
}
PushBlock(CLIBlockKind.AccessSpecifier);
WriteLine("private:");
var accBlock = PopBlock(NewLineKind.IfNotEmpty);
PushBlock(CLIBlockKind.Fields);
GenerateClassFields(@class);
if (CLIGenerator.ShouldGenerateClassNativeField(@class))
WriteLineIndent("bool {0};", Helpers.OwnsNativeInstanceIdentifier);
var fieldsBlock = PopBlock();
accBlock.CheckGenerate = () => !fieldsBlock.IsEmpty;
@ -370,7 +379,11 @@ namespace CppSharp.Generators.CLI @@ -370,7 +379,11 @@ namespace CppSharp.Generators.CLI
// Output a default constructor that takes the native pointer.
WriteLine("{0}({1} native);", @class.Name, nativeType);
WriteLine("static {0}^ {1}(::System::IntPtr native);", @class.Name, Helpers.CreateInstanceIdentifier);
WriteLine("static {0}^ {1}(::System::IntPtr native);",
@class.Name, Helpers.CreateInstanceIdentifier);
if (@class.IsRefType)
WriteLine("static {0}^ {1}(::System::IntPtr native, bool {2});",
@class.Name, Helpers.CreateInstanceIdentifier, Helpers.OwnsNativeInstanceIdentifier);
foreach (var ctor in @class.Constructors)
{

51
src/Generator/Generators/CLI/CLISourcesTemplate.cs

@ -638,7 +638,14 @@ namespace CppSharp.Generators.CLI @@ -638,7 +638,14 @@ namespace CppSharp.Generators.CLI
var hasBase = GenerateClassConstructorBase(@class);
InitialiseOwnsNativeInstance(@class, hasBase, false);
if (CLIGenerator.ShouldGenerateClassNativeField(@class))
{
PushIndent();
Write(hasBase ? "," : ":");
PopIndent();
WriteLine(" {0}(false)", Helpers.OwnsNativeInstanceIdentifier);
}
WriteStartBraceIndent();
@ -658,25 +665,33 @@ namespace CppSharp.Generators.CLI @@ -658,25 +665,33 @@ namespace CppSharp.Generators.CLI
WriteCloseBraceIndent();
NewLine();
WriteLine("{0}^ {0}::{1}(::System::IntPtr native)", qualifiedIdentifier, Helpers.CreateInstanceIdentifier);
WriteStartBraceIndent();
WriteLine("return gcnew ::{0}(({1}) native.ToPointer());", qualifiedIdentifier, nativeType);
WriteCloseBraceIndent();
NewLine();
}
private void InitialiseOwnsNativeInstance(Class @class, bool hasBase, bool ownsNativeInstance)
{
if (!CLIGenerator.ShouldGenerateClassNativeField(@class)) return;
if (@class.IsRefType)
{
WriteLine("return ::{0}::{1}(native, false);",
qualifiedIdentifier, Helpers.CreateInstanceIdentifier);
WriteCloseBraceIndent();
NewLine();
PushIndent();
Write(hasBase ? "," : ":");
PopIndent();
WriteLine("{0}^ {0}::{1}(::System::IntPtr native, bool {2})",
qualifiedIdentifier, Helpers.CreateInstanceIdentifier, Helpers.OwnsNativeInstanceIdentifier);
WriteLine(" {0}({1})", Helpers.OwnsNativeInstanceIdentifier,
ownsNativeInstance ? "true" : "false");
WriteStartBraceIndent();
WriteLine("::{0}^ result = gcnew ::{0}(({1}) native.ToPointer());", qualifiedIdentifier, nativeType);
if (@class.IsRefType)
WriteLine("result->{0} = {0};", Helpers.OwnsNativeInstanceIdentifier);
WriteLine("return result;");
}
else
{
WriteLine("return gcnew ::{0}(({1}) native.ToPointer());", qualifiedIdentifier, nativeType);
}
WriteCloseBraceIndent();
NewLine();
}
private void GenerateStructMarshaling(Class @class, string nativeVar)
@ -758,15 +773,15 @@ namespace CppSharp.Generators.CLI @@ -758,15 +773,15 @@ namespace CppSharp.Generators.CLI
WriteLine(")");
if (method.IsConstructor)
{
var hasBase = GenerateClassConstructorBase(@class, method: method);
InitialiseOwnsNativeInstance(@class, hasBase, true);
}
GenerateClassConstructorBase(@class, method: method);
WriteStartBraceIndent();
PushBlock(CLIBlockKind.MethodBody, method);
if (method.IsConstructor && @class.IsRefType)
WriteLine("{0} = true;", Helpers.OwnsNativeInstanceIdentifier);
if (method.IsProxy)
goto SkipImpl;

12
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -1864,7 +1864,7 @@ namespace CppSharp.Generators.CSharp @@ -1864,7 +1864,7 @@ namespace CppSharp.Generators.CSharp
if (@class.IsRefType)
{
PushBlock(CSharpBlockKind.Field);
WriteLine("private readonly bool {0};", Helpers.OwnsNativeInstanceIdentifier);
WriteLine("private bool {0};", Helpers.OwnsNativeInstanceIdentifier);
PopBlock(NewLineKind.BeforeNextBlock);
}
@ -1874,11 +1874,15 @@ namespace CppSharp.Generators.CSharp @@ -1874,11 +1874,15 @@ namespace CppSharp.Generators.CSharp
if (!@class.IsAbstractImpl)
{
PushBlock(CSharpBlockKind.Method);
WriteLine("public static {0}{1} {2}(global::System.IntPtr native)",
WriteLine("public static {0}{1} {2}(global::System.IntPtr native{3})",
@class.HasNonIgnoredBase && !@class.BaseClass.IsAbstract ? "new " : string.Empty,
@class.Name, Helpers.CreateInstanceIdentifier);
@class.Name, Helpers.CreateInstanceIdentifier,
@class.IsRefType ? ", bool ownsNativeInstance = false" : string.Empty);
WriteStartBraceIndent();
WriteLine("return new {0}(({1}.Internal*) native);", ctorCall, className);
WriteLine("return new {0}(({1}.Internal*) native){2};", ctorCall, className,
@class.IsRefType
? string.Format(" {{ {0} = ownsNativeInstance }}", Helpers.OwnsNativeInstanceIdentifier)
: string.Empty);
WriteCloseBraceIndent();
PopBlock(NewLineKind.BeforeNextBlock);
}

Loading…
Cancel
Save