Browse Source

Completed the exposing of type aliases in our AST.

Fixes https://github.com/mono/CppSharp/issues/670.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/661/head
Dimitar Dobrev 10 years ago
parent
commit
6abdb764e6
  1. 11
      src/AST/ASTVisitor.cs
  2. 24
      src/AST/Declaration.cs
  3. 2
      src/AST/Type.cs
  4. 28
      src/Core/Parser/ASTConverter.cs
  5. 30
      src/CppParser/AST.cpp
  6. 28
      src/CppParser/AST.h
  7. 133
      src/CppParser/Bindings/CLI/AST.cpp
  8. 108
      src/CppParser/Bindings/CLI/AST.h
  9. 546
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
  10. 546
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
  11. 546
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
  12. 546
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
  13. 546
      src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs
  14. 38
      src/CppParser/Parser.cpp
  15. 1
      src/CppParser/Parser.h
  16. 5
      src/Generator.Tests/AST/TestAST.cs
  17. 5
      src/Generator/Generators/CLI/CLITypePrinter.cs
  18. 5
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs
  19. 5
      src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs
  20. 5
      src/Generator/Types/CppTypePrinter.cs
  21. 2
      tests/Common/Common.h

11
src/AST/ASTVisitor.cs

@ -348,6 +348,17 @@ namespace CppSharp.AST
return typedef.Type.Visit(this, typedef.QualifiedType.Qualifiers); return typedef.Type.Visit(this, typedef.QualifiedType.Qualifiers);
} }
public bool VisitTypeAliasDecl(TypeAlias typeAlias)
{
if (!VisitDeclaration(typeAlias))
return false;
if (typeAlias.Type == null)
return false;
return typeAlias.Type.Visit(this, typeAlias.QualifiedType.Qualifiers);
}
public virtual bool VisitEnumDecl(Enumeration @enum) public virtual bool VisitEnumDecl(Enumeration @enum)
{ {
if (!VisitDeclaration(@enum)) if (!VisitDeclaration(@enum))

24
src/AST/Declaration.cs

@ -354,20 +354,39 @@ namespace CppSharp.AST
} }
/// <summary> /// <summary>
/// Represents a type definition in C++. /// Base class for declarations which introduce a typedef-name.
/// </summary> /// </summary>
public class TypedefDecl : Declaration, ITypedDecl public abstract class TypedefNameDecl : Declaration, ITypedDecl
{ {
public Type Type { get { return QualifiedType.Type; } } public Type Type { get { return QualifiedType.Type; } }
public QualifiedType QualifiedType { get; set; } public QualifiedType QualifiedType { get; set; }
public bool IsSynthetized { get; set; } public bool IsSynthetized { get; set; }
}
/// <summary>
/// Represents a type definition in C++.
/// </summary>
public class TypedefDecl : TypedefNameDecl
{
public override T Visit<T>(IDeclVisitor<T> visitor) public override T Visit<T>(IDeclVisitor<T> visitor)
{ {
return visitor.VisitTypedefDecl(this); return visitor.VisitTypedefDecl(this);
} }
} }
/// <summary>
/// Represents a type alias in C++.
/// </summary>
public class TypeAlias : TypedefNameDecl
{
public TypeAliasTemplate DescribedAliasTemplate { get; set; }
public override T Visit<T>(IDeclVisitor<T> visitor)
{
return visitor.VisitTypeAliasDecl(this);
}
}
public interface IDeclVisitor<out T> public interface IDeclVisitor<out T>
{ {
T VisitDeclaration(Declaration decl); T VisitDeclaration(Declaration decl);
@ -377,6 +396,7 @@ namespace CppSharp.AST
T VisitMethodDecl(Method method); T VisitMethodDecl(Method method);
T VisitParameterDecl(Parameter parameter); T VisitParameterDecl(Parameter parameter);
T VisitTypedefDecl(TypedefDecl typedef); T VisitTypedefDecl(TypedefDecl typedef);
T VisitTypeAliasDecl(TypeAlias typeAlias);
T VisitEnumDecl(Enumeration @enum); T VisitEnumDecl(Enumeration @enum);
T VisitVariableDecl(Variable variable); T VisitVariableDecl(Variable variable);
T VisitClassTemplateDecl(ClassTemplate template); T VisitClassTemplateDecl(ClassTemplate template);

2
src/AST/Type.cs

@ -393,7 +393,7 @@ namespace CppSharp.AST
/// </summary> /// </summary>
public class TypedefType : Type public class TypedefType : Type
{ {
public TypedefDecl Declaration; public TypedefNameDecl Declaration { get; set; }
public TypedefType() public TypedefType()
{ {

28
src/Core/Parser/ASTConverter.cs

@ -123,6 +123,7 @@ namespace CppSharp
public abstract TRet VisitTranslationUnit(TranslationUnit decl); public abstract TRet VisitTranslationUnit(TranslationUnit decl);
public abstract TRet VisitNamespace(Namespace decl); public abstract TRet VisitNamespace(Namespace decl);
public abstract TRet VisitTypedef(TypedefDecl decl); public abstract TRet VisitTypedef(TypedefDecl decl);
public abstract TRet VisitTypeAlias(TypeAlias decl);
public abstract TRet VisitParameter(Parameter decl); public abstract TRet VisitParameter(Parameter decl);
public abstract TRet VisitFunction(Function decl); public abstract TRet VisitFunction(Function decl);
public abstract TRet VisitMethod(Method decl); public abstract TRet VisitMethod(Method decl);
@ -163,6 +164,11 @@ namespace CppSharp
var _decl = TypedefDecl.__CreateInstance(decl.__Instance); var _decl = TypedefDecl.__CreateInstance(decl.__Instance);
return VisitTypedef(_decl); return VisitTypedef(_decl);
} }
case DeclarationKind.TypeAlias:
{
var _decl = TypeAlias.__CreateInstance(decl.__Instance);
return VisitTypeAlias(_decl);
}
case DeclarationKind.Parameter: case DeclarationKind.Parameter:
{ {
var _decl = Parameter.__CreateInstance(decl.__Instance); var _decl = Parameter.__CreateInstance(decl.__Instance);
@ -487,7 +493,7 @@ namespace CppSharp
public override AST.Type VisitMemberPointer(MemberPointerType type) public override AST.Type VisitMemberPointer(MemberPointerType type)
{ {
var _type = new CppSharp.AST.MemberPointerType(); var _type = new AST.MemberPointerType();
VisitType(type, _type); VisitType(type, _type);
_type.QualifiedPointee = VisitQualified(type.Pointee); _type.QualifiedPointee = VisitQualified(type.Pointee);
return _type; return _type;
@ -495,16 +501,15 @@ namespace CppSharp
public override AST.Type VisitTypedef(TypedefType type) public override AST.Type VisitTypedef(TypedefType type)
{ {
var _type = new CppSharp.AST.TypedefType(); var _type = new AST.TypedefType();
VisitType(type, _type); VisitType(type, _type);
_type.Declaration = declConverter.Visit(type.Declaration) _type.Declaration = (AST.TypedefNameDecl) declConverter.Visit(type.Declaration);
as AST.TypedefDecl;
return _type; return _type;
} }
public override AST.Type VisitAttributed(AttributedType type) public override AST.Type VisitAttributed(AttributedType type)
{ {
var _type = new CppSharp.AST.AttributedType(); var _type = new AST.AttributedType();
VisitType(type, _type); VisitType(type, _type);
_type.Modified = VisitQualified(type.Modified); _type.Modified = VisitQualified(type.Modified);
_type.Equivalent = VisitQualified(type.Equivalent); _type.Equivalent = VisitQualified(type.Equivalent);
@ -513,7 +518,7 @@ namespace CppSharp
public override AST.Type VisitDecayed(DecayedType type) public override AST.Type VisitDecayed(DecayedType type)
{ {
var _type = new CppSharp.AST.DecayedType(); var _type = new AST.DecayedType();
_type.Decayed = VisitQualified(type.Decayed); _type.Decayed = VisitQualified(type.Decayed);
_type.Original = VisitQualified(type.Original); _type.Original = VisitQualified(type.Original);
_type.Pointee = VisitQualified(type.Pointee); _type.Pointee = VisitQualified(type.Pointee);
@ -932,6 +937,17 @@ namespace CppSharp
return _typedef; return _typedef;
} }
public override AST.Declaration VisitTypeAlias(TypeAlias decl)
{
var _typeAlias = new AST.TypeAlias();
VisitDeclaration(decl, _typeAlias);
_typeAlias.QualifiedType = typeConverter.VisitQualified(decl.QualifiedType);
if (decl.DescribedAliasTemplate != null)
_typeAlias.DescribedAliasTemplate = (AST.TypeAliasTemplate) Visit(decl.DescribedAliasTemplate);
return _typeAlias;
}
public override AST.Declaration VisitParameter(Parameter decl) public override AST.Declaration VisitParameter(Parameter decl)
{ {
var _param = new AST.Parameter(); var _param = new AST.Parameter();

30
src/CppParser/AST.cpp

@ -273,6 +273,7 @@ DEF_VECTOR(DeclarationContext, Function*, Functions)
DEF_VECTOR(DeclarationContext, Class*, Classes) DEF_VECTOR(DeclarationContext, Class*, Classes)
DEF_VECTOR(DeclarationContext, Template*, Templates) DEF_VECTOR(DeclarationContext, Template*, Templates)
DEF_VECTOR(DeclarationContext, TypedefDecl*, Typedefs) DEF_VECTOR(DeclarationContext, TypedefDecl*, Typedefs)
DEF_VECTOR(DeclarationContext, TypeAlias*, TypeAliases)
DEF_VECTOR(DeclarationContext, Variable*, Variables) DEF_VECTOR(DeclarationContext, Variable*, Variables)
DEF_VECTOR(DeclarationContext, Friend*, Friends) DEF_VECTOR(DeclarationContext, Friend*, Friends)
@ -523,6 +524,25 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat
return tdef; return tdef;
} }
TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Create)
{
auto foundTypeAlias = std::find_if(TypeAliases.begin(), TypeAliases.end(),
[&](TypeAlias* talias) { return talias->Name == Name; });
if (foundTypeAlias != TypeAliases.end())
return *foundTypeAlias;
if (!Create)
return nullptr;
auto talias = new TypeAlias();
talias->Name = Name;
talias->_Namespace = this;
TypeAliases.push_back(talias);
return talias;
}
Variable* DeclarationContext::FindVariable(const std::string& USR) Variable* DeclarationContext::FindVariable(const std::string& USR)
{ {
auto found = std::find_if(Variables.begin(), Variables.end(), auto found = std::find_if(Variables.begin(), Variables.end(),
@ -545,10 +565,18 @@ Friend* DeclarationContext::FindFriend(const std::string& USR)
return nullptr; return nullptr;
} }
TypedefDecl::TypedefDecl() : Declaration(DeclarationKind::Typedef) {} TypedefNameDecl::TypedefNameDecl(DeclarationKind Kind) : Declaration(Kind) {}
TypedefNameDecl::~TypedefNameDecl() {}
TypedefDecl::TypedefDecl() : TypedefNameDecl(DeclarationKind::Typedef) {}
TypedefDecl::~TypedefDecl() {} TypedefDecl::~TypedefDecl() {}
TypeAlias::TypeAlias() : TypedefNameDecl(DeclarationKind::TypeAlias), DescribedAliasTemplate(0) {}
TypeAlias::~TypeAlias() {}
Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), Declaration(0) {} Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), Declaration(0) {}
Friend::~Friend() {} Friend::~Friend() {}

28
src/CppParser/AST.h

@ -132,13 +132,13 @@ public:
QualifiedType Pointee; QualifiedType Pointee;
}; };
class TypedefDecl; class TypedefNameDecl;
class CS_API TypedefType : public Type class CS_API TypedefType : public Type
{ {
public: public:
TypedefType(); TypedefType();
TypedefDecl* Declaration; TypedefNameDecl* Declaration;
}; };
class CS_API AttributedType : public Type class CS_API AttributedType : public Type
@ -362,6 +362,7 @@ enum class DeclarationKind
{ {
DeclarationContext, DeclarationContext,
Typedef, Typedef,
TypeAlias,
Parameter, Parameter,
Function, Function,
Method, Method,
@ -432,6 +433,7 @@ class Class;
class Enumeration; class Enumeration;
class Function; class Function;
class TypedefDecl; class TypedefDecl;
class TypeAlias;
class Namespace; class Namespace;
class Template; class Template;
class TypeAliasTemplate; class TypeAliasTemplate;
@ -468,6 +470,8 @@ public:
CS_IGNORE TypedefDecl* FindTypedef(const std::string& Name, bool Create = false); CS_IGNORE TypedefDecl* FindTypedef(const std::string& Name, bool Create = false);
CS_IGNORE TypeAlias* FindTypeAlias(const std::string& Name, bool Create = false);
CS_IGNORE Variable* FindVariable(const std::string& USR); CS_IGNORE Variable* FindVariable(const std::string& USR);
CS_IGNORE Friend* FindFriend(const std::string& USR); CS_IGNORE Friend* FindFriend(const std::string& USR);
@ -478,6 +482,7 @@ public:
VECTOR(Class*, Classes) VECTOR(Class*, Classes)
VECTOR(Template*, Templates) VECTOR(Template*, Templates)
VECTOR(TypedefDecl*, Typedefs) VECTOR(TypedefDecl*, Typedefs)
VECTOR(TypeAlias*, TypeAliases)
VECTOR(Variable*, Variables) VECTOR(Variable*, Variables)
VECTOR(Friend*, Friends) VECTOR(Friend*, Friends)
@ -486,12 +491,27 @@ public:
bool IsAnonymous; bool IsAnonymous;
}; };
class CS_API TypedefDecl : public Declaration class CS_API TypedefNameDecl : public Declaration
{
public:
TypedefNameDecl(DeclarationKind kind);
~TypedefNameDecl();
CppSharp::CppParser::AST::QualifiedType QualifiedType;
};
class CS_API TypedefDecl : public TypedefNameDecl
{ {
public: public:
DECLARE_DECL_KIND(TypedefDecl, Typedef) DECLARE_DECL_KIND(TypedefDecl, Typedef)
~TypedefDecl(); ~TypedefDecl();
CppSharp::CppParser::AST::QualifiedType QualifiedType; };
class CS_API TypeAlias : public TypedefNameDecl
{
public:
TypeAlias();
~TypeAlias();
TypeAliasTemplate* DescribedAliasTemplate;
}; };
class CS_API Friend : public Declaration class CS_API Friend : public Declaration

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

@ -515,14 +515,14 @@ CppSharp::Parser::AST::TypedefType::TypedefType(CppSharp::Parser::AST::TypedefTy
NativePtr = new ::CppSharp::CppParser::AST::TypedefType(__arg0); NativePtr = new ::CppSharp::CppParser::AST::TypedefType(__arg0);
} }
CppSharp::Parser::AST::TypedefDecl^ CppSharp::Parser::AST::TypedefType::Declaration::get() CppSharp::Parser::AST::TypedefNameDecl^ CppSharp::Parser::AST::TypedefType::Declaration::get()
{ {
return (((::CppSharp::CppParser::AST::TypedefType*)NativePtr)->Declaration == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::TypedefDecl((::CppSharp::CppParser::AST::TypedefDecl*)((::CppSharp::CppParser::AST::TypedefType*)NativePtr)->Declaration); return (((::CppSharp::CppParser::AST::TypedefType*)NativePtr)->Declaration == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)((::CppSharp::CppParser::AST::TypedefType*)NativePtr)->Declaration);
} }
void CppSharp::Parser::AST::TypedefType::Declaration::set(CppSharp::Parser::AST::TypedefDecl^ value) void CppSharp::Parser::AST::TypedefType::Declaration::set(CppSharp::Parser::AST::TypedefNameDecl^ value)
{ {
((::CppSharp::CppParser::AST::TypedefType*)NativePtr)->Declaration = (::CppSharp::CppParser::AST::TypedefDecl*)value->NativePtr; ((::CppSharp::CppParser::AST::TypedefType*)NativePtr)->Declaration = (::CppSharp::CppParser::AST::TypedefNameDecl*)value->NativePtr;
} }
CppSharp::Parser::AST::AttributedType::AttributedType(::CppSharp::CppParser::AST::AttributedType* native) CppSharp::Parser::AST::AttributedType::AttributedType(::CppSharp::CppParser::AST::AttributedType* native)
@ -2017,6 +2017,26 @@ void CppSharp::Parser::AST::DeclarationContext::clearTypedefs()
((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearTypedefs(); ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearTypedefs();
} }
CppSharp::Parser::AST::TypeAlias^ CppSharp::Parser::AST::DeclarationContext::getTypeAliases(unsigned int i)
{
auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getTypeAliases(i);
if (__ret == nullptr) return nullptr;
return (__ret == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::TypeAlias((::CppSharp::CppParser::AST::TypeAlias*)__ret);
}
void CppSharp::Parser::AST::DeclarationContext::addTypeAliases(CppSharp::Parser::AST::TypeAlias^ s)
{
if (ReferenceEquals(s, nullptr))
throw gcnew ::System::ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
auto __arg0 = (::CppSharp::CppParser::AST::TypeAlias*)s->NativePtr;
((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->addTypeAliases(__arg0);
}
void CppSharp::Parser::AST::DeclarationContext::clearTypeAliases()
{
((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->clearTypeAliases();
}
CppSharp::Parser::AST::Variable^ CppSharp::Parser::AST::DeclarationContext::getVariables(unsigned int i) CppSharp::Parser::AST::Variable^ CppSharp::Parser::AST::DeclarationContext::getVariables(unsigned int i)
{ {
auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getVariables(i); auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getVariables(i);
@ -2103,6 +2123,12 @@ unsigned int CppSharp::Parser::AST::DeclarationContext::TypedefsCount::get()
return __ret; return __ret;
} }
unsigned int CppSharp::Parser::AST::DeclarationContext::TypeAliasesCount::get()
{
auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getTypeAliasesCount();
return __ret;
}
unsigned int CppSharp::Parser::AST::DeclarationContext::VariablesCount::get() unsigned int CppSharp::Parser::AST::DeclarationContext::VariablesCount::get()
{ {
auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getVariablesCount(); auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getVariablesCount();
@ -2125,11 +2151,59 @@ void CppSharp::Parser::AST::DeclarationContext::IsAnonymous::set(bool value)
((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->IsAnonymous = value; ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->IsAnonymous = value;
} }
CppSharp::Parser::AST::TypedefDecl::TypedefDecl(::CppSharp::CppParser::AST::TypedefDecl* native) CppSharp::Parser::AST::TypedefNameDecl::TypedefNameDecl(::CppSharp::CppParser::AST::TypedefNameDecl* native)
: CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)native) : CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)native)
{ {
} }
CppSharp::Parser::AST::TypedefNameDecl^ CppSharp::Parser::AST::TypedefNameDecl::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*) native.ToPointer());
}
CppSharp::Parser::AST::TypedefNameDecl::~TypedefNameDecl()
{
if (NativePtr)
{
auto __nativePtr = NativePtr;
NativePtr = 0;
delete (::CppSharp::CppParser::AST::TypedefNameDecl*) __nativePtr;
}
}
CppSharp::Parser::AST::TypedefNameDecl::TypedefNameDecl(CppSharp::Parser::AST::DeclarationKind kind)
: CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr)
{
__ownsNativeInstance = true;
auto __arg0 = (::CppSharp::CppParser::AST::DeclarationKind)kind;
NativePtr = new ::CppSharp::CppParser::AST::TypedefNameDecl(__arg0);
}
CppSharp::Parser::AST::TypedefNameDecl::TypedefNameDecl(CppSharp::Parser::AST::TypedefNameDecl^ _0)
: CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr)
{
__ownsNativeInstance = true;
if (ReferenceEquals(_0, nullptr))
throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
auto &__arg0 = *(::CppSharp::CppParser::AST::TypedefNameDecl*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::AST::TypedefNameDecl(__arg0);
}
CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::TypedefNameDecl::QualifiedType::get()
{
return (&((::CppSharp::CppParser::AST::TypedefNameDecl*)NativePtr)->QualifiedType == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::TypedefNameDecl*)NativePtr)->QualifiedType);
}
void CppSharp::Parser::AST::TypedefNameDecl::QualifiedType::set(CppSharp::Parser::AST::QualifiedType^ value)
{
((::CppSharp::CppParser::AST::TypedefNameDecl*)NativePtr)->QualifiedType = *(::CppSharp::CppParser::AST::QualifiedType*)value->NativePtr;
}
CppSharp::Parser::AST::TypedefDecl::TypedefDecl(::CppSharp::CppParser::AST::TypedefDecl* native)
: CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)native)
{
}
CppSharp::Parser::AST::TypedefDecl^ CppSharp::Parser::AST::TypedefDecl::__CreateInstance(::System::IntPtr native) CppSharp::Parser::AST::TypedefDecl^ CppSharp::Parser::AST::TypedefDecl::__CreateInstance(::System::IntPtr native)
{ {
return gcnew ::CppSharp::Parser::AST::TypedefDecl((::CppSharp::CppParser::AST::TypedefDecl*) native.ToPointer()); return gcnew ::CppSharp::Parser::AST::TypedefDecl((::CppSharp::CppParser::AST::TypedefDecl*) native.ToPointer());
@ -2146,14 +2220,14 @@ CppSharp::Parser::AST::TypedefDecl::~TypedefDecl()
} }
CppSharp::Parser::AST::TypedefDecl::TypedefDecl() CppSharp::Parser::AST::TypedefDecl::TypedefDecl()
: CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) : CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)nullptr)
{ {
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::AST::TypedefDecl(); NativePtr = new ::CppSharp::CppParser::AST::TypedefDecl();
} }
CppSharp::Parser::AST::TypedefDecl::TypedefDecl(CppSharp::Parser::AST::TypedefDecl^ _0) CppSharp::Parser::AST::TypedefDecl::TypedefDecl(CppSharp::Parser::AST::TypedefDecl^ _0)
: CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr) : CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)nullptr)
{ {
__ownsNativeInstance = true; __ownsNativeInstance = true;
if (ReferenceEquals(_0, nullptr)) if (ReferenceEquals(_0, nullptr))
@ -2162,14 +2236,51 @@ CppSharp::Parser::AST::TypedefDecl::TypedefDecl(CppSharp::Parser::AST::TypedefDe
NativePtr = new ::CppSharp::CppParser::AST::TypedefDecl(__arg0); NativePtr = new ::CppSharp::CppParser::AST::TypedefDecl(__arg0);
} }
CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::TypedefDecl::QualifiedType::get() CppSharp::Parser::AST::TypeAlias::TypeAlias(::CppSharp::CppParser::AST::TypeAlias* native)
: CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)native)
{
}
CppSharp::Parser::AST::TypeAlias^ CppSharp::Parser::AST::TypeAlias::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::AST::TypeAlias((::CppSharp::CppParser::AST::TypeAlias*) native.ToPointer());
}
CppSharp::Parser::AST::TypeAlias::~TypeAlias()
{
if (NativePtr)
{
auto __nativePtr = NativePtr;
NativePtr = 0;
delete (::CppSharp::CppParser::AST::TypeAlias*) __nativePtr;
}
}
CppSharp::Parser::AST::TypeAlias::TypeAlias()
: CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)nullptr)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::AST::TypeAlias();
}
CppSharp::Parser::AST::TypeAlias::TypeAlias(CppSharp::Parser::AST::TypeAlias^ _0)
: CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)nullptr)
{
__ownsNativeInstance = true;
if (ReferenceEquals(_0, nullptr))
throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
auto &__arg0 = *(::CppSharp::CppParser::AST::TypeAlias*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::AST::TypeAlias(__arg0);
}
CppSharp::Parser::AST::TypeAliasTemplate^ CppSharp::Parser::AST::TypeAlias::DescribedAliasTemplate::get()
{ {
return (&((::CppSharp::CppParser::AST::TypedefDecl*)NativePtr)->QualifiedType == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::TypedefDecl*)NativePtr)->QualifiedType); return (((::CppSharp::CppParser::AST::TypeAlias*)NativePtr)->DescribedAliasTemplate == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::TypeAliasTemplate((::CppSharp::CppParser::AST::TypeAliasTemplate*)((::CppSharp::CppParser::AST::TypeAlias*)NativePtr)->DescribedAliasTemplate);
} }
void CppSharp::Parser::AST::TypedefDecl::QualifiedType::set(CppSharp::Parser::AST::QualifiedType^ value) void CppSharp::Parser::AST::TypeAlias::DescribedAliasTemplate::set(CppSharp::Parser::AST::TypeAliasTemplate^ value)
{ {
((::CppSharp::CppParser::AST::TypedefDecl*)NativePtr)->QualifiedType = *(::CppSharp::CppParser::AST::QualifiedType*)value->NativePtr; ((::CppSharp::CppParser::AST::TypeAlias*)NativePtr)->DescribedAliasTemplate = (::CppSharp::CppParser::AST::TypeAliasTemplate*)value->NativePtr;
} }
CppSharp::Parser::AST::Friend::Friend(::CppSharp::CppParser::AST::Friend* native) CppSharp::Parser::AST::Friend::Friend(::CppSharp::CppParser::AST::Friend* native)

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

@ -91,10 +91,12 @@ namespace CppSharp
ref class TextComment; ref class TextComment;
ref class TranslationUnit; ref class TranslationUnit;
ref class Type; ref class Type;
ref class TypeAlias;
ref class TypeAliasTemplate; ref class TypeAliasTemplate;
ref class TypeQualifiers; ref class TypeQualifiers;
ref class TypeTemplateParameter; ref class TypeTemplateParameter;
ref class TypedefDecl; ref class TypedefDecl;
ref class TypedefNameDecl;
ref class TypedefType; ref class TypedefType;
ref class VFTableInfo; ref class VFTableInfo;
ref class VTableComponent; ref class VTableComponent;
@ -136,30 +138,31 @@ namespace CppSharp
{ {
DeclarationContext = 0, DeclarationContext = 0,
Typedef = 1, Typedef = 1,
Parameter = 2, TypeAlias = 2,
Function = 3, Parameter = 3,
Method = 4, Function = 4,
Enumeration = 5, Method = 5,
EnumerationItem = 6, Enumeration = 6,
Variable = 7, EnumerationItem = 7,
Field = 8, Variable = 8,
AccessSpecifier = 9, Field = 9,
Class = 10, AccessSpecifier = 10,
Template = 11, Class = 11,
TypeAliasTemplate = 12, Template = 12,
ClassTemplate = 13, TypeAliasTemplate = 13,
ClassTemplateSpecialization = 14, ClassTemplate = 14,
ClassTemplatePartialSpecialization = 15, ClassTemplateSpecialization = 15,
FunctionTemplate = 16, ClassTemplatePartialSpecialization = 16,
Namespace = 17, FunctionTemplate = 17,
PreprocessedEntity = 18, Namespace = 18,
MacroDefinition = 19, PreprocessedEntity = 19,
MacroExpansion = 20, MacroDefinition = 20,
TranslationUnit = 21, MacroExpansion = 21,
Friend = 22, TranslationUnit = 22,
TemplateTemplateParm = 23, Friend = 23,
TemplateTypeParm = 24, TemplateTemplateParm = 24,
NonTypeTemplateParm = 25 TemplateTypeParm = 25,
NonTypeTemplateParm = 26
}; };
public enum struct AccessSpecifier public enum struct AccessSpecifier
@ -624,10 +627,10 @@ namespace CppSharp
~TypedefType(); ~TypedefType();
property CppSharp::Parser::AST::TypedefDecl^ Declaration property CppSharp::Parser::AST::TypedefNameDecl^ Declaration
{ {
CppSharp::Parser::AST::TypedefDecl^ get(); CppSharp::Parser::AST::TypedefNameDecl^ get();
void set(CppSharp::Parser::AST::TypedefDecl^); void set(CppSharp::Parser::AST::TypedefNameDecl^);
} }
}; };
@ -1382,6 +1385,11 @@ namespace CppSharp
unsigned int get(); unsigned int get();
} }
property unsigned int TypeAliasesCount
{
unsigned int get();
}
property unsigned int VariablesCount property unsigned int VariablesCount
{ {
unsigned int get(); unsigned int get();
@ -1434,6 +1442,12 @@ namespace CppSharp
void clearTypedefs(); void clearTypedefs();
CppSharp::Parser::AST::TypeAlias^ getTypeAliases(unsigned int i);
void addTypeAliases(CppSharp::Parser::AST::TypeAlias^ s);
void clearTypeAliases();
CppSharp::Parser::AST::Variable^ getVariables(unsigned int i); CppSharp::Parser::AST::Variable^ getVariables(unsigned int i);
void addVariables(CppSharp::Parser::AST::Variable^ s); void addVariables(CppSharp::Parser::AST::Variable^ s);
@ -1447,7 +1461,26 @@ namespace CppSharp
void clearFriends(); void clearFriends();
}; };
public ref class TypedefDecl : CppSharp::Parser::AST::Declaration public ref class TypedefNameDecl : CppSharp::Parser::AST::Declaration
{
public:
TypedefNameDecl(::CppSharp::CppParser::AST::TypedefNameDecl* native);
static TypedefNameDecl^ __CreateInstance(::System::IntPtr native);
TypedefNameDecl(CppSharp::Parser::AST::DeclarationKind kind);
TypedefNameDecl(CppSharp::Parser::AST::TypedefNameDecl^ _0);
~TypedefNameDecl();
property CppSharp::Parser::AST::QualifiedType^ QualifiedType
{
CppSharp::Parser::AST::QualifiedType^ get();
void set(CppSharp::Parser::AST::QualifiedType^);
}
};
public ref class TypedefDecl : CppSharp::Parser::AST::TypedefNameDecl
{ {
public: public:
@ -1458,11 +1491,24 @@ namespace CppSharp
TypedefDecl(CppSharp::Parser::AST::TypedefDecl^ _0); TypedefDecl(CppSharp::Parser::AST::TypedefDecl^ _0);
~TypedefDecl(); ~TypedefDecl();
};
property CppSharp::Parser::AST::QualifiedType^ QualifiedType public ref class TypeAlias : CppSharp::Parser::AST::TypedefNameDecl
{ {
CppSharp::Parser::AST::QualifiedType^ get(); public:
void set(CppSharp::Parser::AST::QualifiedType^);
TypeAlias(::CppSharp::CppParser::AST::TypeAlias* native);
static TypeAlias^ __CreateInstance(::System::IntPtr native);
TypeAlias();
TypeAlias(CppSharp::Parser::AST::TypeAlias^ _0);
~TypeAlias();
property CppSharp::Parser::AST::TypeAliasTemplate^ DescribedAliasTemplate
{
CppSharp::Parser::AST::TypeAliasTemplate^ get();
void set(CppSharp::Parser::AST::TypeAliasTemplate^);
} }
}; };

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

@ -37,30 +37,31 @@ namespace CppSharp
{ {
DeclarationContext = 0, DeclarationContext = 0,
Typedef = 1, Typedef = 1,
Parameter = 2, TypeAlias = 2,
Function = 3, Parameter = 3,
Method = 4, Function = 4,
Enumeration = 5, Method = 5,
EnumerationItem = 6, Enumeration = 6,
Variable = 7, EnumerationItem = 7,
Field = 8, Variable = 8,
AccessSpecifier = 9, Field = 9,
Class = 10, AccessSpecifier = 10,
Template = 11, Class = 11,
TypeAliasTemplate = 12, Template = 12,
ClassTemplate = 13, TypeAliasTemplate = 13,
ClassTemplateSpecialization = 14, ClassTemplate = 14,
ClassTemplatePartialSpecialization = 15, ClassTemplateSpecialization = 15,
FunctionTemplate = 16, ClassTemplatePartialSpecialization = 16,
Namespace = 17, FunctionTemplate = 17,
PreprocessedEntity = 18, Namespace = 18,
MacroDefinition = 19, PreprocessedEntity = 19,
MacroExpansion = 20, MacroDefinition = 20,
TranslationUnit = 21, MacroExpansion = 21,
Friend = 22, TranslationUnit = 22,
TemplateTemplateParm = 23, Friend = 23,
TemplateTypeParm = 24, TemplateTemplateParm = 24,
NonTypeTemplateParm = 25 TemplateTypeParm = 25,
NonTypeTemplateParm = 26
} }
public enum AccessSpecifier public enum AccessSpecifier
@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0); Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
} }
public CppSharp.Parser.AST.TypedefDecl Declaration public CppSharp.Parser.AST.TypedefNameDecl Declaration
{ {
get get
{ {
CppSharp.Parser.AST.TypedefDecl __result0; CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null; if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration)) else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
__result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration]; __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration); else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0; return __result0;
} }
@ -4089,7 +4090,7 @@ namespace CppSharp
public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 204)] [StructLayout(LayoutKind.Explicit, Size = 216)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -4131,7 +4132,7 @@ namespace CppSharp
[FieldOffset(88)] [FieldOffset(88)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(200)] [FieldOffset(212)]
public byte IsAnonymous; public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -4239,6 +4240,21 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance); internal static extern void clearTypedefs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14getTypeAliasesEj")]
internal static extern global::System.IntPtr getTypeAliases_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14addTypeAliasesERPNS1_9TypeAliasE")]
internal static extern void addTypeAliases_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16clearTypeAliasesEv")]
internal static extern void clearTypeAliases_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")]
@ -4299,6 +4315,11 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")]
internal static extern uint getTypedefsCount_0(global::System.IntPtr instance); internal static extern uint getTypedefsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext19getTypeAliasesCountEv")]
internal static extern uint getTypeAliasesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")]
@ -4322,7 +4343,7 @@ namespace CppSharp
private static void* __CopyValue(DeclarationContext.Internal native) private static void* __CopyValue(DeclarationContext.Internal native)
{ {
var ret = Marshal.AllocHGlobal(204); var ret = Marshal.AllocHGlobal(216);
CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -4346,7 +4367,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind) public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(204); __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
var __arg0 = kind; var __arg0 = kind;
@ -4356,7 +4377,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0) public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(204); __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -4518,6 +4539,30 @@ namespace CppSharp
Internal.clearTypedefs_0((__Instance + __PointerAdjustment)); Internal.clearTypedefs_0((__Instance + __PointerAdjustment));
} }
public CppSharp.Parser.AST.TypeAlias getTypeAliases(uint i)
{
var __ret = Internal.getTypeAliases_0((__Instance + __PointerAdjustment), i);
CppSharp.Parser.AST.TypeAlias __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAlias.NativeToManagedMap.ContainsKey(__ret))
__result0 = (CppSharp.Parser.AST.TypeAlias) CppSharp.Parser.AST.TypeAlias.NativeToManagedMap[__ret];
else __result0 = CppSharp.Parser.AST.TypeAlias.__CreateInstance(__ret);
return __result0;
}
public void addTypeAliases(CppSharp.Parser.AST.TypeAlias s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
Internal.addTypeAliases_0((__Instance + __PointerAdjustment), __arg0);
}
public void clearTypeAliases()
{
Internal.clearTypeAliases_0((__Instance + __PointerAdjustment));
}
public CppSharp.Parser.AST.Variable getVariables(uint i) public CppSharp.Parser.AST.Variable getVariables(uint i)
{ {
var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i); var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i);
@ -4620,6 +4665,15 @@ namespace CppSharp
} }
} }
public uint TypeAliasesCount
{
get
{
var __ret = Internal.getTypeAliasesCount_0((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint VariablesCount public uint VariablesCount
{ {
get get
@ -4652,7 +4706,148 @@ namespace CppSharp
} }
} }
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class TypedefNameDecl : CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 100)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(12)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(16)]
public int LineNumberStart;
[FieldOffset(20)]
public int LineNumberEnd;
[FieldOffset(60)]
public byte IsIncomplete;
[FieldOffset(61)]
public byte IsDependent;
[FieldOffset(62)]
public byte IsImplicit;
[FieldOffset(64)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(68)]
public uint DefinitionOrder;
[FieldOffset(84)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(88)]
public global::System.IntPtr Comment;
[FieldOffset(92)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclC2ENS1_15DeclarationKindE")]
internal static extern void ctor_0(global::System.IntPtr instance, CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclC2ERKS2_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public static new TypedefNameDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypedefNameDecl(native.ToPointer(), skipVTables);
}
public static TypedefNameDecl __CreateInstance(TypedefNameDecl.Internal native, bool skipVTables = false)
{
return new TypedefNameDecl(native, skipVTables);
}
private static void* __CopyValue(TypedefNameDecl.Internal native)
{
var ret = Marshal.AllocHGlobal(100);
CppSharp.Parser.AST.TypedefNameDecl.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefNameDecl(TypedefNameDecl.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefNameDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefNameDecl(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(100);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
Internal.ctor_0((__Instance + __PointerAdjustment), __arg0);
}
public TypedefNameDecl(CppSharp.Parser.AST.TypedefNameDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(100);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType);
}
set
{
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance);
}
}
}
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 100)] [StructLayout(LayoutKind.Explicit, Size = 100)]
public new partial struct Internal public new partial struct Internal
@ -4777,17 +4972,152 @@ namespace CppSharp
if (__ownsNativeInstance) if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
}
public CppSharp.Parser.AST.QualifiedType QualifiedType public unsafe partial class TypeAlias : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 104)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(12)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(16)]
public int LineNumberStart;
[FieldOffset(20)]
public int LineNumberEnd;
[FieldOffset(60)]
public byte IsIncomplete;
[FieldOffset(61)]
public byte IsDependent;
[FieldOffset(62)]
public byte IsImplicit;
[FieldOffset(64)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(68)]
public uint DefinitionOrder;
[FieldOffset(84)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(88)]
public global::System.IntPtr Comment;
[FieldOffset(92)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[FieldOffset(100)]
public global::System.IntPtr DescribedAliasTemplate;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasC2ERKS2_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public static new TypeAlias __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypeAlias(native.ToPointer(), skipVTables);
}
public static TypeAlias __CreateInstance(TypeAlias.Internal native, bool skipVTables = false)
{
return new TypeAlias(native, skipVTables);
}
private static void* __CopyValue(TypeAlias.Internal native)
{
var ret = Marshal.AllocHGlobal(104);
CppSharp.Parser.AST.TypeAlias.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeAlias(TypeAlias.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeAlias(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeAlias()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(104);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public TypeAlias(CppSharp.Parser.AST.TypeAlias _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(104);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.TypeAliasTemplate DescribedAliasTemplate
{ {
get get
{ {
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType); CppSharp.Parser.AST.TypeAliasTemplate __result0;
if (((Internal*) __Instance)->DescribedAliasTemplate == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->DescribedAliasTemplate))
__result0 = (CppSharp.Parser.AST.TypeAliasTemplate) CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap[((Internal*) __Instance)->DescribedAliasTemplate];
else __result0 = CppSharp.Parser.AST.TypeAliasTemplate.__CreateInstance(((Internal*) __Instance)->DescribedAliasTemplate);
return __result0;
} }
set set
{ {
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance); ((Internal*) __Instance)->DescribedAliasTemplate = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
} }
} }
} }
@ -6506,7 +6836,7 @@ namespace CppSharp
public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 228)] [StructLayout(LayoutKind.Explicit, Size = 240)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -6548,16 +6878,16 @@ namespace CppSharp
[FieldOffset(88)] [FieldOffset(88)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(200)] [FieldOffset(212)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(204)] [FieldOffset(216)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers; public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
[FieldOffset(208)] [FieldOffset(220)]
public global::System.IntPtr Type; public global::System.IntPtr Type;
[FieldOffset(212)] [FieldOffset(224)]
public global::System.IntPtr BuiltinType; public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6782,7 +7112,7 @@ namespace CppSharp
private static void* __CopyValue(Enumeration.Internal native) private static void* __CopyValue(Enumeration.Internal native)
{ {
var ret = Marshal.AllocHGlobal(228); var ret = Marshal.AllocHGlobal(240);
CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -6806,7 +7136,7 @@ namespace CppSharp
public Enumeration() public Enumeration()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(228); __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6815,7 +7145,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0) public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(228); __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -7555,7 +7885,7 @@ namespace CppSharp
public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 268)] [StructLayout(LayoutKind.Explicit, Size = 280)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -7597,37 +7927,37 @@ namespace CppSharp
[FieldOffset(88)] [FieldOffset(88)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(200)] [FieldOffset(212)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(252)] [FieldOffset(264)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(253)] [FieldOffset(265)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(254)] [FieldOffset(266)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(255)] [FieldOffset(267)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(256)] [FieldOffset(268)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(257)] [FieldOffset(269)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(258)] [FieldOffset(270)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(259)] [FieldOffset(271)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(260)] [FieldOffset(272)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(264)] [FieldOffset(276)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -7738,7 +8068,7 @@ namespace CppSharp
private static void* __CopyValue(Class.Internal native) private static void* __CopyValue(Class.Internal native)
{ {
var ret = Marshal.AllocHGlobal(268); var ret = Marshal.AllocHGlobal(280);
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -7762,7 +8092,7 @@ namespace CppSharp
public Class() public Class()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(268); __Instance = Marshal.AllocHGlobal(280);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -7771,7 +8101,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0) public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(268); __Instance = Marshal.AllocHGlobal(280);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9278,7 +9608,7 @@ namespace CppSharp
public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 288)] [StructLayout(LayoutKind.Explicit, Size = 300)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9320,43 +9650,43 @@ namespace CppSharp
[FieldOffset(88)] [FieldOffset(88)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(200)] [FieldOffset(212)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(252)] [FieldOffset(264)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(253)] [FieldOffset(265)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(254)] [FieldOffset(266)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(255)] [FieldOffset(267)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(256)] [FieldOffset(268)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(257)] [FieldOffset(269)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(258)] [FieldOffset(270)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(259)] [FieldOffset(271)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(260)] [FieldOffset(272)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(264)] [FieldOffset(276)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(268)] [FieldOffset(280)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(284)] [FieldOffset(296)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9407,7 +9737,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplateSpecialization.Internal native) private static void* __CopyValue(ClassTemplateSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(288); var ret = Marshal.AllocHGlobal(300);
CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9431,7 +9761,7 @@ namespace CppSharp
public ClassTemplateSpecialization() public ClassTemplateSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(288); __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9440,7 +9770,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0) public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(288); __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9521,7 +9851,7 @@ namespace CppSharp
public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 288)] [StructLayout(LayoutKind.Explicit, Size = 300)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9563,43 +9893,43 @@ namespace CppSharp
[FieldOffset(88)] [FieldOffset(88)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(200)] [FieldOffset(212)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(252)] [FieldOffset(264)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(253)] [FieldOffset(265)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(254)] [FieldOffset(266)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(255)] [FieldOffset(267)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(256)] [FieldOffset(268)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(257)] [FieldOffset(269)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(258)] [FieldOffset(270)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(259)] [FieldOffset(271)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(260)] [FieldOffset(272)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(264)] [FieldOffset(276)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(268)] [FieldOffset(280)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(284)] [FieldOffset(296)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9630,7 +9960,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native) private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(288); var ret = Marshal.AllocHGlobal(300);
CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9654,7 +9984,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization() public ClassTemplatePartialSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(288); __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9663,7 +9993,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0) public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(288); __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10065,7 +10395,7 @@ namespace CppSharp
public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 204)] [StructLayout(LayoutKind.Explicit, Size = 216)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10107,10 +10437,10 @@ namespace CppSharp
[FieldOffset(88)] [FieldOffset(88)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(200)] [FieldOffset(212)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(201)] [FieldOffset(213)]
public byte IsInline; public byte IsInline;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10141,7 +10471,7 @@ namespace CppSharp
private static void* __CopyValue(Namespace.Internal native) private static void* __CopyValue(Namespace.Internal native)
{ {
var ret = Marshal.AllocHGlobal(204); var ret = Marshal.AllocHGlobal(216);
CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10165,7 +10495,7 @@ namespace CppSharp
public Namespace() public Namespace()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(204); __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10174,7 +10504,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0) public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(204); __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10686,7 +11016,7 @@ namespace CppSharp
public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 232)] [StructLayout(LayoutKind.Explicit, Size = 244)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10728,13 +11058,13 @@ namespace CppSharp
[FieldOffset(88)] [FieldOffset(88)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(200)] [FieldOffset(212)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(201)] [FieldOffset(213)]
public byte IsInline; public byte IsInline;
[FieldOffset(216)] [FieldOffset(228)]
public byte IsSystemHeader; public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10795,7 +11125,7 @@ namespace CppSharp
private static void* __CopyValue(TranslationUnit.Internal native) private static void* __CopyValue(TranslationUnit.Internal native)
{ {
var ret = Marshal.AllocHGlobal(232); var ret = Marshal.AllocHGlobal(244);
CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10819,7 +11149,7 @@ namespace CppSharp
public TranslationUnit() public TranslationUnit()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(232); __Instance = Marshal.AllocHGlobal(244);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10828,7 +11158,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0) public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(232); __Instance = Marshal.AllocHGlobal(244);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))

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

@ -37,30 +37,31 @@ namespace CppSharp
{ {
DeclarationContext = 0, DeclarationContext = 0,
Typedef = 1, Typedef = 1,
Parameter = 2, TypeAlias = 2,
Function = 3, Parameter = 3,
Method = 4, Function = 4,
Enumeration = 5, Method = 5,
EnumerationItem = 6, Enumeration = 6,
Variable = 7, EnumerationItem = 7,
Field = 8, Variable = 8,
AccessSpecifier = 9, Field = 9,
Class = 10, AccessSpecifier = 10,
Template = 11, Class = 11,
TypeAliasTemplate = 12, Template = 12,
ClassTemplate = 13, TypeAliasTemplate = 13,
ClassTemplateSpecialization = 14, ClassTemplate = 14,
ClassTemplatePartialSpecialization = 15, ClassTemplateSpecialization = 15,
FunctionTemplate = 16, ClassTemplatePartialSpecialization = 16,
Namespace = 17, FunctionTemplate = 17,
PreprocessedEntity = 18, Namespace = 18,
MacroDefinition = 19, PreprocessedEntity = 19,
MacroExpansion = 20, MacroDefinition = 20,
TranslationUnit = 21, MacroExpansion = 21,
Friend = 22, TranslationUnit = 22,
TemplateTemplateParm = 23, Friend = 23,
TemplateTypeParm = 24, TemplateTemplateParm = 24,
NonTypeTemplateParm = 25 TemplateTypeParm = 25,
NonTypeTemplateParm = 26
} }
public enum AccessSpecifier public enum AccessSpecifier
@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0); Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
} }
public CppSharp.Parser.AST.TypedefDecl Declaration public CppSharp.Parser.AST.TypedefNameDecl Declaration
{ {
get get
{ {
CppSharp.Parser.AST.TypedefDecl __result0; CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null; if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration)) else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
__result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration]; __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration); else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0; return __result0;
} }
@ -4089,7 +4090,7 @@ namespace CppSharp
public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 236)] [StructLayout(LayoutKind.Explicit, Size = 248)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -4131,7 +4132,7 @@ namespace CppSharp
[FieldOffset(124)] [FieldOffset(124)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(232)] [FieldOffset(244)]
public byte IsAnonymous; public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -4239,6 +4240,21 @@ namespace CppSharp
EntryPoint="?clearTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QAEXXZ")] EntryPoint="?clearTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance); internal static extern void clearTypedefs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QAEPAVTypeAlias@234@I@Z")]
internal static extern global::System.IntPtr getTypeAliases_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?addTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QAEXAAPAVTypeAlias@234@@Z")]
internal static extern void addTypeAliases_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearTypeAliases_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getVariables@DeclarationContext@AST@CppParser@CppSharp@@QAEPAVVariable@234@I@Z")] EntryPoint="?getVariables@DeclarationContext@AST@CppParser@CppSharp@@QAEPAVVariable@234@I@Z")]
@ -4299,6 +4315,11 @@ namespace CppSharp
EntryPoint="?getTypedefsCount@DeclarationContext@AST@CppParser@CppSharp@@QAEIXZ")] EntryPoint="?getTypedefsCount@DeclarationContext@AST@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getTypedefsCount_0(global::System.IntPtr instance); internal static extern uint getTypedefsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getTypeAliasesCount@DeclarationContext@AST@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getTypeAliasesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getVariablesCount@DeclarationContext@AST@CppParser@CppSharp@@QAEIXZ")] EntryPoint="?getVariablesCount@DeclarationContext@AST@CppParser@CppSharp@@QAEIXZ")]
@ -4322,7 +4343,7 @@ namespace CppSharp
private static void* __CopyValue(DeclarationContext.Internal native) private static void* __CopyValue(DeclarationContext.Internal native)
{ {
var ret = Marshal.AllocHGlobal(236); var ret = Marshal.AllocHGlobal(248);
CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -4346,7 +4367,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind) public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(236); __Instance = Marshal.AllocHGlobal(248);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
var __arg0 = kind; var __arg0 = kind;
@ -4356,7 +4377,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0) public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(236); __Instance = Marshal.AllocHGlobal(248);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -4518,6 +4539,30 @@ namespace CppSharp
Internal.clearTypedefs_0((__Instance + __PointerAdjustment)); Internal.clearTypedefs_0((__Instance + __PointerAdjustment));
} }
public CppSharp.Parser.AST.TypeAlias getTypeAliases(uint i)
{
var __ret = Internal.getTypeAliases_0((__Instance + __PointerAdjustment), i);
CppSharp.Parser.AST.TypeAlias __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAlias.NativeToManagedMap.ContainsKey(__ret))
__result0 = (CppSharp.Parser.AST.TypeAlias) CppSharp.Parser.AST.TypeAlias.NativeToManagedMap[__ret];
else __result0 = CppSharp.Parser.AST.TypeAlias.__CreateInstance(__ret);
return __result0;
}
public void addTypeAliases(CppSharp.Parser.AST.TypeAlias s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
Internal.addTypeAliases_0((__Instance + __PointerAdjustment), __arg0);
}
public void clearTypeAliases()
{
Internal.clearTypeAliases_0((__Instance + __PointerAdjustment));
}
public CppSharp.Parser.AST.Variable getVariables(uint i) public CppSharp.Parser.AST.Variable getVariables(uint i)
{ {
var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i); var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i);
@ -4620,6 +4665,15 @@ namespace CppSharp
} }
} }
public uint TypeAliasesCount
{
get
{
var __ret = Internal.getTypeAliasesCount_0((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint VariablesCount public uint VariablesCount
{ {
get get
@ -4652,7 +4706,148 @@ namespace CppSharp
} }
} }
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class TypedefNameDecl : CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 136)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(12)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(16)]
public int LineNumberStart;
[FieldOffset(20)]
public int LineNumberEnd;
[FieldOffset(96)]
public byte IsIncomplete;
[FieldOffset(97)]
public byte IsDependent;
[FieldOffset(98)]
public byte IsImplicit;
[FieldOffset(100)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(104)]
public uint DefinitionOrder;
[FieldOffset(120)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(124)]
public global::System.IntPtr Comment;
[FieldOffset(128)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0TypedefNameDecl@AST@CppParser@CppSharp@@QAE@W4DeclarationKind@123@@Z")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance, CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0TypedefNameDecl@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??1TypedefNameDecl@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern void dtor_0(global::System.IntPtr instance, int delete);
}
public static new TypedefNameDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypedefNameDecl(native.ToPointer(), skipVTables);
}
public static TypedefNameDecl __CreateInstance(TypedefNameDecl.Internal native, bool skipVTables = false)
{
return new TypedefNameDecl(native, skipVTables);
}
private static void* __CopyValue(TypedefNameDecl.Internal native)
{
var ret = Marshal.AllocHGlobal(136);
CppSharp.Parser.AST.TypedefNameDecl.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefNameDecl(TypedefNameDecl.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefNameDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefNameDecl(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(136);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
Internal.ctor_0((__Instance + __PointerAdjustment), __arg0);
}
public TypedefNameDecl(CppSharp.Parser.AST.TypedefNameDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(136);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType);
}
set
{
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance);
}
}
}
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 136)] [StructLayout(LayoutKind.Explicit, Size = 136)]
public new partial struct Internal public new partial struct Internal
@ -4777,17 +4972,152 @@ namespace CppSharp
if (__ownsNativeInstance) if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
}
public CppSharp.Parser.AST.QualifiedType QualifiedType public unsafe partial class TypeAlias : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 140)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(12)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(16)]
public int LineNumberStart;
[FieldOffset(20)]
public int LineNumberEnd;
[FieldOffset(96)]
public byte IsIncomplete;
[FieldOffset(97)]
public byte IsDependent;
[FieldOffset(98)]
public byte IsImplicit;
[FieldOffset(100)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(104)]
public uint DefinitionOrder;
[FieldOffset(120)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(124)]
public global::System.IntPtr Comment;
[FieldOffset(128)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[FieldOffset(136)]
public global::System.IntPtr DescribedAliasTemplate;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0TypeAlias@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0TypeAlias@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??1TypeAlias@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern void dtor_0(global::System.IntPtr instance, int delete);
}
public static new TypeAlias __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypeAlias(native.ToPointer(), skipVTables);
}
public static TypeAlias __CreateInstance(TypeAlias.Internal native, bool skipVTables = false)
{
return new TypeAlias(native, skipVTables);
}
private static void* __CopyValue(TypeAlias.Internal native)
{
var ret = Marshal.AllocHGlobal(140);
CppSharp.Parser.AST.TypeAlias.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeAlias(TypeAlias.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeAlias(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeAlias()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(140);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public TypeAlias(CppSharp.Parser.AST.TypeAlias _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(140);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.TypeAliasTemplate DescribedAliasTemplate
{ {
get get
{ {
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType); CppSharp.Parser.AST.TypeAliasTemplate __result0;
if (((Internal*) __Instance)->DescribedAliasTemplate == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->DescribedAliasTemplate))
__result0 = (CppSharp.Parser.AST.TypeAliasTemplate) CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap[((Internal*) __Instance)->DescribedAliasTemplate];
else __result0 = CppSharp.Parser.AST.TypeAliasTemplate.__CreateInstance(((Internal*) __Instance)->DescribedAliasTemplate);
return __result0;
} }
set set
{ {
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance); ((Internal*) __Instance)->DescribedAliasTemplate = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
} }
} }
} }
@ -6506,7 +6836,7 @@ namespace CppSharp
public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 260)] [StructLayout(LayoutKind.Explicit, Size = 272)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -6548,16 +6878,16 @@ namespace CppSharp
[FieldOffset(124)] [FieldOffset(124)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(232)] [FieldOffset(244)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(236)] [FieldOffset(248)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers; public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
[FieldOffset(240)] [FieldOffset(252)]
public global::System.IntPtr Type; public global::System.IntPtr Type;
[FieldOffset(244)] [FieldOffset(256)]
public global::System.IntPtr BuiltinType; public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6782,7 +7112,7 @@ namespace CppSharp
private static void* __CopyValue(Enumeration.Internal native) private static void* __CopyValue(Enumeration.Internal native)
{ {
var ret = Marshal.AllocHGlobal(260); var ret = Marshal.AllocHGlobal(272);
CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -6806,7 +7136,7 @@ namespace CppSharp
public Enumeration() public Enumeration()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(260); __Instance = Marshal.AllocHGlobal(272);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6815,7 +7145,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0) public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(260); __Instance = Marshal.AllocHGlobal(272);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -7555,7 +7885,7 @@ namespace CppSharp
public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 300)] [StructLayout(LayoutKind.Explicit, Size = 312)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -7597,37 +7927,37 @@ namespace CppSharp
[FieldOffset(124)] [FieldOffset(124)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(232)] [FieldOffset(244)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(284)] [FieldOffset(296)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(285)] [FieldOffset(297)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(286)] [FieldOffset(298)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(287)] [FieldOffset(299)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(288)] [FieldOffset(300)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(289)] [FieldOffset(301)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(290)] [FieldOffset(302)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(291)] [FieldOffset(303)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(292)] [FieldOffset(304)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(296)] [FieldOffset(308)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -7738,7 +8068,7 @@ namespace CppSharp
private static void* __CopyValue(Class.Internal native) private static void* __CopyValue(Class.Internal native)
{ {
var ret = Marshal.AllocHGlobal(300); var ret = Marshal.AllocHGlobal(312);
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -7762,7 +8092,7 @@ namespace CppSharp
public Class() public Class()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(300); __Instance = Marshal.AllocHGlobal(312);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -7771,7 +8101,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0) public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(300); __Instance = Marshal.AllocHGlobal(312);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9278,7 +9608,7 @@ namespace CppSharp
public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 320)] [StructLayout(LayoutKind.Explicit, Size = 332)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9320,43 +9650,43 @@ namespace CppSharp
[FieldOffset(124)] [FieldOffset(124)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(232)] [FieldOffset(244)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(284)] [FieldOffset(296)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(285)] [FieldOffset(297)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(286)] [FieldOffset(298)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(287)] [FieldOffset(299)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(288)] [FieldOffset(300)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(289)] [FieldOffset(301)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(290)] [FieldOffset(302)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(291)] [FieldOffset(303)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(292)] [FieldOffset(304)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(296)] [FieldOffset(308)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(300)] [FieldOffset(312)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(316)] [FieldOffset(328)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9407,7 +9737,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplateSpecialization.Internal native) private static void* __CopyValue(ClassTemplateSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(320); var ret = Marshal.AllocHGlobal(332);
CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9431,7 +9761,7 @@ namespace CppSharp
public ClassTemplateSpecialization() public ClassTemplateSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(320); __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9440,7 +9770,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0) public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(320); __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9521,7 +9851,7 @@ namespace CppSharp
public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 320)] [StructLayout(LayoutKind.Explicit, Size = 332)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9563,43 +9893,43 @@ namespace CppSharp
[FieldOffset(124)] [FieldOffset(124)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(232)] [FieldOffset(244)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(284)] [FieldOffset(296)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(285)] [FieldOffset(297)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(286)] [FieldOffset(298)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(287)] [FieldOffset(299)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(288)] [FieldOffset(300)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(289)] [FieldOffset(301)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(290)] [FieldOffset(302)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(291)] [FieldOffset(303)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(292)] [FieldOffset(304)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(296)] [FieldOffset(308)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(300)] [FieldOffset(312)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(316)] [FieldOffset(328)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9630,7 +9960,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native) private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(320); var ret = Marshal.AllocHGlobal(332);
CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9654,7 +9984,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization() public ClassTemplatePartialSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(320); __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9663,7 +9993,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0) public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(320); __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10065,7 +10395,7 @@ namespace CppSharp
public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 240)] [StructLayout(LayoutKind.Explicit, Size = 252)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10107,10 +10437,10 @@ namespace CppSharp
[FieldOffset(124)] [FieldOffset(124)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(232)] [FieldOffset(244)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(236)] [FieldOffset(248)]
public byte IsInline; public byte IsInline;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10141,7 +10471,7 @@ namespace CppSharp
private static void* __CopyValue(Namespace.Internal native) private static void* __CopyValue(Namespace.Internal native)
{ {
var ret = Marshal.AllocHGlobal(240); var ret = Marshal.AllocHGlobal(252);
CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10165,7 +10495,7 @@ namespace CppSharp
public Namespace() public Namespace()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(240); __Instance = Marshal.AllocHGlobal(252);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10174,7 +10504,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0) public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(240); __Instance = Marshal.AllocHGlobal(252);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10686,7 +11016,7 @@ namespace CppSharp
public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 280)] [StructLayout(LayoutKind.Explicit, Size = 292)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10728,13 +11058,13 @@ namespace CppSharp
[FieldOffset(124)] [FieldOffset(124)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(232)] [FieldOffset(244)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(236)] [FieldOffset(248)]
public byte IsInline; public byte IsInline;
[FieldOffset(264)] [FieldOffset(276)]
public byte IsSystemHeader; public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10795,7 +11125,7 @@ namespace CppSharp
private static void* __CopyValue(TranslationUnit.Internal native) private static void* __CopyValue(TranslationUnit.Internal native)
{ {
var ret = Marshal.AllocHGlobal(280); var ret = Marshal.AllocHGlobal(292);
CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10819,7 +11149,7 @@ namespace CppSharp
public TranslationUnit() public TranslationUnit()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(280); __Instance = Marshal.AllocHGlobal(292);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10828,7 +11158,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0) public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(280); __Instance = Marshal.AllocHGlobal(292);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))

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

@ -37,30 +37,31 @@ namespace CppSharp
{ {
DeclarationContext = 0, DeclarationContext = 0,
Typedef = 1, Typedef = 1,
Parameter = 2, TypeAlias = 2,
Function = 3, Parameter = 3,
Method = 4, Function = 4,
Enumeration = 5, Method = 5,
EnumerationItem = 6, Enumeration = 6,
Variable = 7, EnumerationItem = 7,
Field = 8, Variable = 8,
AccessSpecifier = 9, Field = 9,
Class = 10, AccessSpecifier = 10,
Template = 11, Class = 11,
TypeAliasTemplate = 12, Template = 12,
ClassTemplate = 13, TypeAliasTemplate = 13,
ClassTemplateSpecialization = 14, ClassTemplate = 14,
ClassTemplatePartialSpecialization = 15, ClassTemplateSpecialization = 15,
FunctionTemplate = 16, ClassTemplatePartialSpecialization = 16,
Namespace = 17, FunctionTemplate = 17,
PreprocessedEntity = 18, Namespace = 18,
MacroDefinition = 19, PreprocessedEntity = 19,
MacroExpansion = 20, MacroDefinition = 20,
TranslationUnit = 21, MacroExpansion = 21,
Friend = 22, TranslationUnit = 22,
TemplateTemplateParm = 23, Friend = 23,
TemplateTypeParm = 24, TemplateTemplateParm = 24,
NonTypeTemplateParm = 25 TemplateTypeParm = 25,
NonTypeTemplateParm = 26
} }
public enum AccessSpecifier public enum AccessSpecifier
@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0); Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
} }
public CppSharp.Parser.AST.TypedefDecl Declaration public CppSharp.Parser.AST.TypedefNameDecl Declaration
{ {
get get
{ {
CppSharp.Parser.AST.TypedefDecl __result0; CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null; if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration)) else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
__result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration]; __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration); else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0; return __result0;
} }
@ -4088,7 +4089,7 @@ namespace CppSharp
public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 392)] [StructLayout(LayoutKind.Explicit, Size = 416)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -4130,7 +4131,7 @@ namespace CppSharp
[FieldOffset(160)] [FieldOffset(160)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(384)] [FieldOffset(408)]
public byte IsAnonymous; public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -4238,6 +4239,21 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance); internal static extern void clearTypedefs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14getTypeAliasesEj")]
internal static extern global::System.IntPtr getTypeAliases_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14addTypeAliasesERPNS1_9TypeAliasE")]
internal static extern void addTypeAliases_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16clearTypeAliasesEv")]
internal static extern void clearTypeAliases_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")]
@ -4298,6 +4314,11 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")]
internal static extern uint getTypedefsCount_0(global::System.IntPtr instance); internal static extern uint getTypedefsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext19getTypeAliasesCountEv")]
internal static extern uint getTypeAliasesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")]
@ -4321,7 +4342,7 @@ namespace CppSharp
private static void* __CopyValue(DeclarationContext.Internal native) private static void* __CopyValue(DeclarationContext.Internal native)
{ {
var ret = Marshal.AllocHGlobal(392); var ret = Marshal.AllocHGlobal(416);
CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -4345,7 +4366,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind) public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(392); __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
var __arg0 = kind; var __arg0 = kind;
@ -4355,7 +4376,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0) public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(392); __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -4517,6 +4538,30 @@ namespace CppSharp
Internal.clearTypedefs_0((__Instance + __PointerAdjustment)); Internal.clearTypedefs_0((__Instance + __PointerAdjustment));
} }
public CppSharp.Parser.AST.TypeAlias getTypeAliases(uint i)
{
var __ret = Internal.getTypeAliases_0((__Instance + __PointerAdjustment), i);
CppSharp.Parser.AST.TypeAlias __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAlias.NativeToManagedMap.ContainsKey(__ret))
__result0 = (CppSharp.Parser.AST.TypeAlias) CppSharp.Parser.AST.TypeAlias.NativeToManagedMap[__ret];
else __result0 = CppSharp.Parser.AST.TypeAlias.__CreateInstance(__ret);
return __result0;
}
public void addTypeAliases(CppSharp.Parser.AST.TypeAlias s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
Internal.addTypeAliases_0((__Instance + __PointerAdjustment), __arg0);
}
public void clearTypeAliases()
{
Internal.clearTypeAliases_0((__Instance + __PointerAdjustment));
}
public CppSharp.Parser.AST.Variable getVariables(uint i) public CppSharp.Parser.AST.Variable getVariables(uint i)
{ {
var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i); var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i);
@ -4619,6 +4664,15 @@ namespace CppSharp
} }
} }
public uint TypeAliasesCount
{
get
{
var __ret = Internal.getTypeAliasesCount_0((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint VariablesCount public uint VariablesCount
{ {
get get
@ -4651,7 +4705,148 @@ namespace CppSharp
} }
} }
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class TypedefNameDecl : CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 184)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(16)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(20)]
public int LineNumberStart;
[FieldOffset(24)]
public int LineNumberEnd;
[FieldOffset(104)]
public byte IsIncomplete;
[FieldOffset(105)]
public byte IsDependent;
[FieldOffset(106)]
public byte IsImplicit;
[FieldOffset(112)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(120)]
public uint DefinitionOrder;
[FieldOffset(152)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(160)]
public global::System.IntPtr Comment;
[FieldOffset(168)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclC2ENS1_15DeclarationKindE")]
internal static extern void ctor_0(global::System.IntPtr instance, CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclC2ERKS2_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public static new TypedefNameDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypedefNameDecl(native.ToPointer(), skipVTables);
}
public static TypedefNameDecl __CreateInstance(TypedefNameDecl.Internal native, bool skipVTables = false)
{
return new TypedefNameDecl(native, skipVTables);
}
private static void* __CopyValue(TypedefNameDecl.Internal native)
{
var ret = Marshal.AllocHGlobal(184);
CppSharp.Parser.AST.TypedefNameDecl.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefNameDecl(TypedefNameDecl.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefNameDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefNameDecl(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(184);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
Internal.ctor_0((__Instance + __PointerAdjustment), __arg0);
}
public TypedefNameDecl(CppSharp.Parser.AST.TypedefNameDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(184);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType);
}
set
{
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance);
}
}
}
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 184)] [StructLayout(LayoutKind.Explicit, Size = 184)]
public new partial struct Internal public new partial struct Internal
@ -4776,17 +4971,152 @@ namespace CppSharp
if (__ownsNativeInstance) if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
}
public CppSharp.Parser.AST.QualifiedType QualifiedType public unsafe partial class TypeAlias : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 192)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(16)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(20)]
public int LineNumberStart;
[FieldOffset(24)]
public int LineNumberEnd;
[FieldOffset(104)]
public byte IsIncomplete;
[FieldOffset(105)]
public byte IsDependent;
[FieldOffset(106)]
public byte IsImplicit;
[FieldOffset(112)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(120)]
public uint DefinitionOrder;
[FieldOffset(152)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(160)]
public global::System.IntPtr Comment;
[FieldOffset(168)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[FieldOffset(184)]
public global::System.IntPtr DescribedAliasTemplate;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasC2ERKS2_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public static new TypeAlias __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypeAlias(native.ToPointer(), skipVTables);
}
public static TypeAlias __CreateInstance(TypeAlias.Internal native, bool skipVTables = false)
{
return new TypeAlias(native, skipVTables);
}
private static void* __CopyValue(TypeAlias.Internal native)
{
var ret = Marshal.AllocHGlobal(192);
CppSharp.Parser.AST.TypeAlias.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeAlias(TypeAlias.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeAlias(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeAlias()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(192);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public TypeAlias(CppSharp.Parser.AST.TypeAlias _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(192);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.TypeAliasTemplate DescribedAliasTemplate
{ {
get get
{ {
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType); CppSharp.Parser.AST.TypeAliasTemplate __result0;
if (((Internal*) __Instance)->DescribedAliasTemplate == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->DescribedAliasTemplate))
__result0 = (CppSharp.Parser.AST.TypeAliasTemplate) CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap[((Internal*) __Instance)->DescribedAliasTemplate];
else __result0 = CppSharp.Parser.AST.TypeAliasTemplate.__CreateInstance(((Internal*) __Instance)->DescribedAliasTemplate);
return __result0;
} }
set set
{ {
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance); ((Internal*) __Instance)->DescribedAliasTemplate = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
} }
} }
} }
@ -6505,7 +6835,7 @@ namespace CppSharp
public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 432)] [StructLayout(LayoutKind.Explicit, Size = 456)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -6547,16 +6877,16 @@ namespace CppSharp
[FieldOffset(160)] [FieldOffset(160)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(384)] [FieldOffset(408)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(388)] [FieldOffset(412)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers; public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
[FieldOffset(392)] [FieldOffset(416)]
public global::System.IntPtr Type; public global::System.IntPtr Type;
[FieldOffset(400)] [FieldOffset(424)]
public global::System.IntPtr BuiltinType; public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6781,7 +7111,7 @@ namespace CppSharp
private static void* __CopyValue(Enumeration.Internal native) private static void* __CopyValue(Enumeration.Internal native)
{ {
var ret = Marshal.AllocHGlobal(432); var ret = Marshal.AllocHGlobal(456);
CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -6805,7 +7135,7 @@ namespace CppSharp
public Enumeration() public Enumeration()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(432); __Instance = Marshal.AllocHGlobal(456);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6814,7 +7144,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0) public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(432); __Instance = Marshal.AllocHGlobal(456);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -7554,7 +7884,7 @@ namespace CppSharp
public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 512)] [StructLayout(LayoutKind.Explicit, Size = 536)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -7596,37 +7926,37 @@ namespace CppSharp
[FieldOffset(160)] [FieldOffset(160)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(384)] [FieldOffset(408)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(488)] [FieldOffset(512)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(489)] [FieldOffset(513)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(490)] [FieldOffset(514)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(491)] [FieldOffset(515)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(492)] [FieldOffset(516)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(493)] [FieldOffset(517)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(494)] [FieldOffset(518)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(495)] [FieldOffset(519)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(496)] [FieldOffset(520)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(504)] [FieldOffset(528)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -7737,7 +8067,7 @@ namespace CppSharp
private static void* __CopyValue(Class.Internal native) private static void* __CopyValue(Class.Internal native)
{ {
var ret = Marshal.AllocHGlobal(512); var ret = Marshal.AllocHGlobal(536);
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -7761,7 +8091,7 @@ namespace CppSharp
public Class() public Class()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(512); __Instance = Marshal.AllocHGlobal(536);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -7770,7 +8100,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0) public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(512); __Instance = Marshal.AllocHGlobal(536);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9277,7 +9607,7 @@ namespace CppSharp
public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 552)] [StructLayout(LayoutKind.Explicit, Size = 576)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9319,43 +9649,43 @@ namespace CppSharp
[FieldOffset(160)] [FieldOffset(160)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(384)] [FieldOffset(408)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(488)] [FieldOffset(512)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(489)] [FieldOffset(513)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(490)] [FieldOffset(514)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(491)] [FieldOffset(515)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(492)] [FieldOffset(516)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(493)] [FieldOffset(517)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(494)] [FieldOffset(518)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(495)] [FieldOffset(519)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(496)] [FieldOffset(520)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(504)] [FieldOffset(528)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(512)] [FieldOffset(536)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(544)] [FieldOffset(568)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9406,7 +9736,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplateSpecialization.Internal native) private static void* __CopyValue(ClassTemplateSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(552); var ret = Marshal.AllocHGlobal(576);
CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9430,7 +9760,7 @@ namespace CppSharp
public ClassTemplateSpecialization() public ClassTemplateSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(552); __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9439,7 +9769,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0) public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(552); __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9520,7 +9850,7 @@ namespace CppSharp
public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 552)] [StructLayout(LayoutKind.Explicit, Size = 576)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9562,43 +9892,43 @@ namespace CppSharp
[FieldOffset(160)] [FieldOffset(160)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(384)] [FieldOffset(408)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(488)] [FieldOffset(512)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(489)] [FieldOffset(513)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(490)] [FieldOffset(514)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(491)] [FieldOffset(515)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(492)] [FieldOffset(516)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(493)] [FieldOffset(517)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(494)] [FieldOffset(518)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(495)] [FieldOffset(519)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(496)] [FieldOffset(520)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(504)] [FieldOffset(528)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(512)] [FieldOffset(536)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(544)] [FieldOffset(568)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9629,7 +9959,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native) private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(552); var ret = Marshal.AllocHGlobal(576);
CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9653,7 +9983,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization() public ClassTemplatePartialSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(552); __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9662,7 +9992,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0) public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(552); __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10064,7 +10394,7 @@ namespace CppSharp
public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 392)] [StructLayout(LayoutKind.Explicit, Size = 416)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10106,10 +10436,10 @@ namespace CppSharp
[FieldOffset(160)] [FieldOffset(160)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(384)] [FieldOffset(408)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(385)] [FieldOffset(409)]
public byte IsInline; public byte IsInline;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10140,7 +10470,7 @@ namespace CppSharp
private static void* __CopyValue(Namespace.Internal native) private static void* __CopyValue(Namespace.Internal native)
{ {
var ret = Marshal.AllocHGlobal(392); var ret = Marshal.AllocHGlobal(416);
CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10164,7 +10494,7 @@ namespace CppSharp
public Namespace() public Namespace()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(392); __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10173,7 +10503,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0) public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(392); __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10685,7 +11015,7 @@ namespace CppSharp
public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 448)] [StructLayout(LayoutKind.Explicit, Size = 472)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10727,13 +11057,13 @@ namespace CppSharp
[FieldOffset(160)] [FieldOffset(160)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(384)] [FieldOffset(408)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(385)] [FieldOffset(409)]
public byte IsInline; public byte IsInline;
[FieldOffset(416)] [FieldOffset(440)]
public byte IsSystemHeader; public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10794,7 +11124,7 @@ namespace CppSharp
private static void* __CopyValue(TranslationUnit.Internal native) private static void* __CopyValue(TranslationUnit.Internal native)
{ {
var ret = Marshal.AllocHGlobal(448); var ret = Marshal.AllocHGlobal(472);
CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10818,7 +11148,7 @@ namespace CppSharp
public TranslationUnit() public TranslationUnit()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(448); __Instance = Marshal.AllocHGlobal(472);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10827,7 +11157,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0) public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(448); __Instance = Marshal.AllocHGlobal(472);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))

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

@ -37,30 +37,31 @@ namespace CppSharp
{ {
DeclarationContext = 0, DeclarationContext = 0,
Typedef = 1, Typedef = 1,
Parameter = 2, TypeAlias = 2,
Function = 3, Parameter = 3,
Method = 4, Function = 4,
Enumeration = 5, Method = 5,
EnumerationItem = 6, Enumeration = 6,
Variable = 7, EnumerationItem = 7,
Field = 8, Variable = 8,
AccessSpecifier = 9, Field = 9,
Class = 10, AccessSpecifier = 10,
Template = 11, Class = 11,
TypeAliasTemplate = 12, Template = 12,
ClassTemplate = 13, TypeAliasTemplate = 13,
ClassTemplateSpecialization = 14, ClassTemplate = 14,
ClassTemplatePartialSpecialization = 15, ClassTemplateSpecialization = 15,
FunctionTemplate = 16, ClassTemplatePartialSpecialization = 16,
Namespace = 17, FunctionTemplate = 17,
PreprocessedEntity = 18, Namespace = 18,
MacroDefinition = 19, PreprocessedEntity = 19,
MacroExpansion = 20, MacroDefinition = 20,
TranslationUnit = 21, MacroExpansion = 21,
Friend = 22, TranslationUnit = 22,
TemplateTemplateParm = 23, Friend = 23,
TemplateTypeParm = 24, TemplateTemplateParm = 24,
NonTypeTemplateParm = 25 TemplateTypeParm = 25,
NonTypeTemplateParm = 26
} }
public enum AccessSpecifier public enum AccessSpecifier
@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0); Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
} }
public CppSharp.Parser.AST.TypedefDecl Declaration public CppSharp.Parser.AST.TypedefNameDecl Declaration
{ {
get get
{ {
CppSharp.Parser.AST.TypedefDecl __result0; CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null; if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration)) else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
__result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration]; __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration); else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0; return __result0;
} }
@ -4088,7 +4089,7 @@ namespace CppSharp
public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 368)] [StructLayout(LayoutKind.Explicit, Size = 392)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -4130,7 +4131,7 @@ namespace CppSharp
[FieldOffset(112)] [FieldOffset(112)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(360)] [FieldOffset(384)]
public byte IsAnonymous; public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -4238,6 +4239,21 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance); internal static extern void clearTypedefs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14getTypeAliasesEj")]
internal static extern global::System.IntPtr getTypeAliases_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext14addTypeAliasesERPNS1_9TypeAliasE")]
internal static extern void addTypeAliases_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16clearTypeAliasesEv")]
internal static extern void clearTypeAliases_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")]
@ -4298,6 +4314,11 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")]
internal static extern uint getTypedefsCount_0(global::System.IntPtr instance); internal static extern uint getTypedefsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext19getTypeAliasesCountEv")]
internal static extern uint getTypeAliasesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")] EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")]
@ -4321,7 +4342,7 @@ namespace CppSharp
private static void* __CopyValue(DeclarationContext.Internal native) private static void* __CopyValue(DeclarationContext.Internal native)
{ {
var ret = Marshal.AllocHGlobal(368); var ret = Marshal.AllocHGlobal(392);
CppSharp.Parser.AST.DeclarationContext.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.DeclarationContext.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -4345,7 +4366,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind) public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(368); __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
var __arg0 = kind; var __arg0 = kind;
@ -4355,7 +4376,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0) public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(368); __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -4517,6 +4538,30 @@ namespace CppSharp
Internal.clearTypedefs_0((__Instance + __PointerAdjustment)); Internal.clearTypedefs_0((__Instance + __PointerAdjustment));
} }
public CppSharp.Parser.AST.TypeAlias getTypeAliases(uint i)
{
var __ret = Internal.getTypeAliases_0((__Instance + __PointerAdjustment), i);
CppSharp.Parser.AST.TypeAlias __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAlias.NativeToManagedMap.ContainsKey(__ret))
__result0 = (CppSharp.Parser.AST.TypeAlias) CppSharp.Parser.AST.TypeAlias.NativeToManagedMap[__ret];
else __result0 = CppSharp.Parser.AST.TypeAlias.__CreateInstance(__ret);
return __result0;
}
public void addTypeAliases(CppSharp.Parser.AST.TypeAlias s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
Internal.addTypeAliases_0((__Instance + __PointerAdjustment), __arg0);
}
public void clearTypeAliases()
{
Internal.clearTypeAliases_0((__Instance + __PointerAdjustment));
}
public CppSharp.Parser.AST.Variable getVariables(uint i) public CppSharp.Parser.AST.Variable getVariables(uint i)
{ {
var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i); var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i);
@ -4619,6 +4664,15 @@ namespace CppSharp
} }
} }
public uint TypeAliasesCount
{
get
{
var __ret = Internal.getTypeAliasesCount_0((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint VariablesCount public uint VariablesCount
{ {
get get
@ -4651,7 +4705,148 @@ namespace CppSharp
} }
} }
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class TypedefNameDecl : CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 136)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(16)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(20)]
public int LineNumberStart;
[FieldOffset(24)]
public int LineNumberEnd;
[FieldOffset(56)]
public byte IsIncomplete;
[FieldOffset(57)]
public byte IsDependent;
[FieldOffset(58)]
public byte IsImplicit;
[FieldOffset(64)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(72)]
public uint DefinitionOrder;
[FieldOffset(104)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(112)]
public global::System.IntPtr Comment;
[FieldOffset(120)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclC2ENS1_15DeclarationKindE")]
internal static extern void ctor_0(global::System.IntPtr instance, CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclC2ERKS2_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST15TypedefNameDeclD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public static new TypedefNameDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypedefNameDecl(native.ToPointer(), skipVTables);
}
public static TypedefNameDecl __CreateInstance(TypedefNameDecl.Internal native, bool skipVTables = false)
{
return new TypedefNameDecl(native, skipVTables);
}
private static void* __CopyValue(TypedefNameDecl.Internal native)
{
var ret = Marshal.AllocHGlobal(136);
CppSharp.Parser.AST.TypedefNameDecl.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefNameDecl(TypedefNameDecl.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefNameDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefNameDecl(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(136);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
Internal.ctor_0((__Instance + __PointerAdjustment), __arg0);
}
public TypedefNameDecl(CppSharp.Parser.AST.TypedefNameDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(136);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType);
}
set
{
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance);
}
}
}
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 136)] [StructLayout(LayoutKind.Explicit, Size = 136)]
public new partial struct Internal public new partial struct Internal
@ -4776,17 +4971,152 @@ namespace CppSharp
if (__ownsNativeInstance) if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
}
public CppSharp.Parser.AST.QualifiedType QualifiedType public unsafe partial class TypeAlias : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 144)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(16)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(20)]
public int LineNumberStart;
[FieldOffset(24)]
public int LineNumberEnd;
[FieldOffset(56)]
public byte IsIncomplete;
[FieldOffset(57)]
public byte IsDependent;
[FieldOffset(58)]
public byte IsImplicit;
[FieldOffset(64)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(72)]
public uint DefinitionOrder;
[FieldOffset(104)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(112)]
public global::System.IntPtr Comment;
[FieldOffset(120)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[FieldOffset(136)]
public global::System.IntPtr DescribedAliasTemplate;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasC2ERKS2_")]
internal static extern void cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST9TypeAliasD2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public static new TypeAlias __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypeAlias(native.ToPointer(), skipVTables);
}
public static TypeAlias __CreateInstance(TypeAlias.Internal native, bool skipVTables = false)
{
return new TypeAlias(native, skipVTables);
}
private static void* __CopyValue(TypeAlias.Internal native)
{
var ret = Marshal.AllocHGlobal(144);
CppSharp.Parser.AST.TypeAlias.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeAlias(TypeAlias.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeAlias(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeAlias()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(144);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public TypeAlias(CppSharp.Parser.AST.TypeAlias _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(144);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.TypeAliasTemplate DescribedAliasTemplate
{ {
get get
{ {
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType); CppSharp.Parser.AST.TypeAliasTemplate __result0;
if (((Internal*) __Instance)->DescribedAliasTemplate == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->DescribedAliasTemplate))
__result0 = (CppSharp.Parser.AST.TypeAliasTemplate) CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap[((Internal*) __Instance)->DescribedAliasTemplate];
else __result0 = CppSharp.Parser.AST.TypeAliasTemplate.__CreateInstance(((Internal*) __Instance)->DescribedAliasTemplate);
return __result0;
} }
set set
{ {
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance); ((Internal*) __Instance)->DescribedAliasTemplate = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
} }
} }
} }
@ -6505,7 +6835,7 @@ namespace CppSharp
public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 408)] [StructLayout(LayoutKind.Explicit, Size = 432)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -6547,16 +6877,16 @@ namespace CppSharp
[FieldOffset(112)] [FieldOffset(112)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(360)] [FieldOffset(384)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(364)] [FieldOffset(388)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers; public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
[FieldOffset(368)] [FieldOffset(392)]
public global::System.IntPtr Type; public global::System.IntPtr Type;
[FieldOffset(376)] [FieldOffset(400)]
public global::System.IntPtr BuiltinType; public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6781,7 +7111,7 @@ namespace CppSharp
private static void* __CopyValue(Enumeration.Internal native) private static void* __CopyValue(Enumeration.Internal native)
{ {
var ret = Marshal.AllocHGlobal(408); var ret = Marshal.AllocHGlobal(432);
CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -6805,7 +7135,7 @@ namespace CppSharp
public Enumeration() public Enumeration()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(408); __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6814,7 +7144,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0) public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(408); __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -7554,7 +7884,7 @@ namespace CppSharp
public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 488)] [StructLayout(LayoutKind.Explicit, Size = 512)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -7596,37 +7926,37 @@ namespace CppSharp
[FieldOffset(112)] [FieldOffset(112)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(360)] [FieldOffset(384)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(464)] [FieldOffset(488)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(465)] [FieldOffset(489)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(466)] [FieldOffset(490)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(467)] [FieldOffset(491)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(468)] [FieldOffset(492)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(469)] [FieldOffset(493)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(470)] [FieldOffset(494)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(471)] [FieldOffset(495)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(472)] [FieldOffset(496)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(480)] [FieldOffset(504)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -7737,7 +8067,7 @@ namespace CppSharp
private static void* __CopyValue(Class.Internal native) private static void* __CopyValue(Class.Internal native)
{ {
var ret = Marshal.AllocHGlobal(488); var ret = Marshal.AllocHGlobal(512);
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -7761,7 +8091,7 @@ namespace CppSharp
public Class() public Class()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(488); __Instance = Marshal.AllocHGlobal(512);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -7770,7 +8100,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0) public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(488); __Instance = Marshal.AllocHGlobal(512);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9277,7 +9607,7 @@ namespace CppSharp
public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 528)] [StructLayout(LayoutKind.Explicit, Size = 552)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9319,43 +9649,43 @@ namespace CppSharp
[FieldOffset(112)] [FieldOffset(112)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(360)] [FieldOffset(384)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(464)] [FieldOffset(488)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(465)] [FieldOffset(489)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(466)] [FieldOffset(490)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(467)] [FieldOffset(491)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(468)] [FieldOffset(492)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(469)] [FieldOffset(493)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(470)] [FieldOffset(494)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(471)] [FieldOffset(495)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(472)] [FieldOffset(496)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(480)] [FieldOffset(504)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(488)] [FieldOffset(512)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(520)] [FieldOffset(544)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9406,7 +9736,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplateSpecialization.Internal native) private static void* __CopyValue(ClassTemplateSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(528); var ret = Marshal.AllocHGlobal(552);
CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9430,7 +9760,7 @@ namespace CppSharp
public ClassTemplateSpecialization() public ClassTemplateSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(528); __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9439,7 +9769,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0) public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(528); __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9520,7 +9850,7 @@ namespace CppSharp
public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 528)] [StructLayout(LayoutKind.Explicit, Size = 552)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9562,43 +9892,43 @@ namespace CppSharp
[FieldOffset(112)] [FieldOffset(112)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(360)] [FieldOffset(384)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(464)] [FieldOffset(488)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(465)] [FieldOffset(489)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(466)] [FieldOffset(490)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(467)] [FieldOffset(491)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(468)] [FieldOffset(492)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(469)] [FieldOffset(493)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(470)] [FieldOffset(494)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(471)] [FieldOffset(495)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(472)] [FieldOffset(496)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(480)] [FieldOffset(504)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(488)] [FieldOffset(512)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(520)] [FieldOffset(544)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9629,7 +9959,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native) private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(528); var ret = Marshal.AllocHGlobal(552);
CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9653,7 +9983,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization() public ClassTemplatePartialSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(528); __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9662,7 +9992,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0) public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(528); __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10064,7 +10394,7 @@ namespace CppSharp
public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 368)] [StructLayout(LayoutKind.Explicit, Size = 392)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10106,10 +10436,10 @@ namespace CppSharp
[FieldOffset(112)] [FieldOffset(112)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(360)] [FieldOffset(384)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(361)] [FieldOffset(385)]
public byte IsInline; public byte IsInline;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10140,7 +10470,7 @@ namespace CppSharp
private static void* __CopyValue(Namespace.Internal native) private static void* __CopyValue(Namespace.Internal native)
{ {
var ret = Marshal.AllocHGlobal(368); var ret = Marshal.AllocHGlobal(392);
CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10164,7 +10494,7 @@ namespace CppSharp
public Namespace() public Namespace()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(368); __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10173,7 +10503,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0) public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(368); __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10685,7 +11015,7 @@ namespace CppSharp
public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 408)] [StructLayout(LayoutKind.Explicit, Size = 432)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10727,13 +11057,13 @@ namespace CppSharp
[FieldOffset(112)] [FieldOffset(112)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(360)] [FieldOffset(384)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(361)] [FieldOffset(385)]
public byte IsInline; public byte IsInline;
[FieldOffset(376)] [FieldOffset(400)]
public byte IsSystemHeader; public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10794,7 +11124,7 @@ namespace CppSharp
private static void* __CopyValue(TranslationUnit.Internal native) private static void* __CopyValue(TranslationUnit.Internal native)
{ {
var ret = Marshal.AllocHGlobal(408); var ret = Marshal.AllocHGlobal(432);
CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10818,7 +11148,7 @@ namespace CppSharp
public TranslationUnit() public TranslationUnit()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(408); __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10827,7 +11157,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0) public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(408); __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))

546
src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs

@ -37,30 +37,31 @@ namespace CppSharp
{ {
DeclarationContext = 0, DeclarationContext = 0,
Typedef = 1, Typedef = 1,
Parameter = 2, TypeAlias = 2,
Function = 3, Parameter = 3,
Method = 4, Function = 4,
Enumeration = 5, Method = 5,
EnumerationItem = 6, Enumeration = 6,
Variable = 7, EnumerationItem = 7,
Field = 8, Variable = 8,
AccessSpecifier = 9, Field = 9,
Class = 10, AccessSpecifier = 10,
Template = 11, Class = 11,
TypeAliasTemplate = 12, Template = 12,
ClassTemplate = 13, TypeAliasTemplate = 13,
ClassTemplateSpecialization = 14, ClassTemplate = 14,
ClassTemplatePartialSpecialization = 15, ClassTemplateSpecialization = 15,
FunctionTemplate = 16, ClassTemplatePartialSpecialization = 16,
Namespace = 17, FunctionTemplate = 17,
PreprocessedEntity = 18, Namespace = 18,
MacroDefinition = 19, PreprocessedEntity = 19,
MacroExpansion = 20, MacroDefinition = 20,
TranslationUnit = 21, MacroExpansion = 21,
Friend = 22, TranslationUnit = 22,
TemplateTemplateParm = 23, Friend = 23,
TemplateTypeParm = 24, TemplateTemplateParm = 24,
NonTypeTemplateParm = 25 TemplateTypeParm = 25,
NonTypeTemplateParm = 26
} }
public enum AccessSpecifier public enum AccessSpecifier
@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0); Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
} }
public CppSharp.Parser.AST.TypedefDecl Declaration public CppSharp.Parser.AST.TypedefNameDecl Declaration
{ {
get get
{ {
CppSharp.Parser.AST.TypedefDecl __result0; CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null; if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration)) else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
__result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration]; __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration); else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0; return __result0;
} }
@ -4089,7 +4090,7 @@ namespace CppSharp
public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class DeclarationContext : CppSharp.Parser.AST.Declaration, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 408)] [StructLayout(LayoutKind.Explicit, Size = 432)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -4131,7 +4132,7 @@ namespace CppSharp
[FieldOffset(184)] [FieldOffset(184)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(400)] [FieldOffset(424)]
public byte IsAnonymous; public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -4239,6 +4240,21 @@ namespace CppSharp
EntryPoint="?clearTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")] EntryPoint="?clearTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance); internal static extern void clearTypedefs_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVTypeAlias@234@I@Z")]
internal static extern global::System.IntPtr getTypeAliases_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?addTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QEAAXAEAPEAVTypeAlias@234@@Z")]
internal static extern void addTypeAliases_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?clearTypeAliases@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
internal static extern void clearTypeAliases_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVariables@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVVariable@234@I@Z")] EntryPoint="?getVariables@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVVariable@234@I@Z")]
@ -4299,6 +4315,11 @@ namespace CppSharp
EntryPoint="?getTypedefsCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")] EntryPoint="?getTypedefsCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint getTypedefsCount_0(global::System.IntPtr instance); internal static extern uint getTypedefsCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getTypeAliasesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
internal static extern uint getTypeAliasesCount_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl, [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVariablesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")] EntryPoint="?getVariablesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
@ -4322,7 +4343,7 @@ namespace CppSharp
private static void* __CopyValue(DeclarationContext.Internal native) private static void* __CopyValue(DeclarationContext.Internal native)
{ {
var ret = Marshal.AllocHGlobal(408); var ret = Marshal.AllocHGlobal(432);
CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.DeclarationContext.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -4346,7 +4367,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind) public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(408); __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
var __arg0 = kind; var __arg0 = kind;
@ -4356,7 +4377,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0) public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(408); __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -4518,6 +4539,30 @@ namespace CppSharp
Internal.clearTypedefs_0((__Instance + __PointerAdjustment)); Internal.clearTypedefs_0((__Instance + __PointerAdjustment));
} }
public CppSharp.Parser.AST.TypeAlias getTypeAliases(uint i)
{
var __ret = Internal.getTypeAliases_0((__Instance + __PointerAdjustment), i);
CppSharp.Parser.AST.TypeAlias __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAlias.NativeToManagedMap.ContainsKey(__ret))
__result0 = (CppSharp.Parser.AST.TypeAlias) CppSharp.Parser.AST.TypeAlias.NativeToManagedMap[__ret];
else __result0 = CppSharp.Parser.AST.TypeAlias.__CreateInstance(__ret);
return __result0;
}
public void addTypeAliases(CppSharp.Parser.AST.TypeAlias s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var __arg0 = s.__Instance;
Internal.addTypeAliases_0((__Instance + __PointerAdjustment), __arg0);
}
public void clearTypeAliases()
{
Internal.clearTypeAliases_0((__Instance + __PointerAdjustment));
}
public CppSharp.Parser.AST.Variable getVariables(uint i) public CppSharp.Parser.AST.Variable getVariables(uint i)
{ {
var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i); var __ret = Internal.getVariables_0((__Instance + __PointerAdjustment), i);
@ -4620,6 +4665,15 @@ namespace CppSharp
} }
} }
public uint TypeAliasesCount
{
get
{
var __ret = Internal.getTypeAliasesCount_0((__Instance + __PointerAdjustment));
return __ret;
}
}
public uint VariablesCount public uint VariablesCount
{ {
get get
@ -4652,7 +4706,148 @@ namespace CppSharp
} }
} }
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.Declaration, IDisposable public unsafe partial class TypedefNameDecl : CppSharp.Parser.AST.Declaration, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 208)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(16)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(20)]
public int LineNumberStart;
[FieldOffset(24)]
public int LineNumberEnd;
[FieldOffset(128)]
public byte IsIncomplete;
[FieldOffset(129)]
public byte IsDependent;
[FieldOffset(130)]
public byte IsImplicit;
[FieldOffset(136)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(144)]
public uint DefinitionOrder;
[FieldOffset(176)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(184)]
public global::System.IntPtr Comment;
[FieldOffset(192)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefNameDecl@AST@CppParser@CppSharp@@QEAA@W4DeclarationKind@123@@Z")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance, CppSharp.Parser.AST.DeclarationKind kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypedefNameDecl@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TypedefNameDecl@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor_0(global::System.IntPtr instance, int delete);
}
public static new TypedefNameDecl __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypedefNameDecl(native.ToPointer(), skipVTables);
}
public static TypedefNameDecl __CreateInstance(TypedefNameDecl.Internal native, bool skipVTables = false)
{
return new TypedefNameDecl(native, skipVTables);
}
private static void* __CopyValue(TypedefNameDecl.Internal native)
{
var ret = Marshal.AllocHGlobal(208);
CppSharp.Parser.AST.TypedefNameDecl.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypedefNameDecl(TypedefNameDecl.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypedefNameDecl(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypedefNameDecl(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(208);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
Internal.ctor_0((__Instance + __PointerAdjustment), __arg0);
}
public TypedefNameDecl(CppSharp.Parser.AST.TypedefNameDecl _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(208);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.QualifiedType QualifiedType
{
get
{
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType);
}
set
{
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance);
}
}
}
public unsafe partial class TypedefDecl : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 208)] [StructLayout(LayoutKind.Explicit, Size = 208)]
public new partial struct Internal public new partial struct Internal
@ -4777,17 +4972,152 @@ namespace CppSharp
if (__ownsNativeInstance) if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance); Marshal.FreeHGlobal(__Instance);
} }
}
public CppSharp.Parser.AST.QualifiedType QualifiedType public unsafe partial class TypeAlias : CppSharp.Parser.AST.TypedefNameDecl, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 216)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.DeclarationKind Kind;
[FieldOffset(4)]
public CppSharp.Parser.AST.AccessSpecifier Access;
[FieldOffset(8)]
public global::System.IntPtr _Namespace;
[FieldOffset(16)]
public CppSharp.Parser.SourceLocation.Internal Location;
[FieldOffset(20)]
public int LineNumberStart;
[FieldOffset(24)]
public int LineNumberEnd;
[FieldOffset(128)]
public byte IsIncomplete;
[FieldOffset(129)]
public byte IsDependent;
[FieldOffset(130)]
public byte IsImplicit;
[FieldOffset(136)]
public global::System.IntPtr CompleteDeclaration;
[FieldOffset(144)]
public uint DefinitionOrder;
[FieldOffset(176)]
public global::System.IntPtr OriginalPtr;
[FieldOffset(184)]
public global::System.IntPtr Comment;
[FieldOffset(192)]
public CppSharp.Parser.AST.QualifiedType.Internal QualifiedType;
[FieldOffset(208)]
public global::System.IntPtr DescribedAliasTemplate;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeAlias@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TypeAlias@AST@CppParser@CppSharp@@QEAA@AEBV0123@@Z")]
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1TypeAlias@AST@CppParser@CppSharp@@QEAA@XZ")]
internal static extern void dtor_0(global::System.IntPtr instance, int delete);
}
public static new TypeAlias __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new TypeAlias(native.ToPointer(), skipVTables);
}
public static TypeAlias __CreateInstance(TypeAlias.Internal native, bool skipVTables = false)
{
return new TypeAlias(native, skipVTables);
}
private static void* __CopyValue(TypeAlias.Internal native)
{
var ret = Marshal.AllocHGlobal(216);
CppSharp.Parser.AST.TypeAlias.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private TypeAlias(TypeAlias.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected TypeAlias(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public TypeAlias()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public TypeAlias(CppSharp.Parser.AST.TypeAlias _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var __arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), __arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Declaration __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.TypeAliasTemplate DescribedAliasTemplate
{ {
get get
{ {
return CppSharp.Parser.AST.QualifiedType.__CreateInstance(((Internal*) __Instance)->QualifiedType); CppSharp.Parser.AST.TypeAliasTemplate __result0;
if (((Internal*) __Instance)->DescribedAliasTemplate == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->DescribedAliasTemplate))
__result0 = (CppSharp.Parser.AST.TypeAliasTemplate) CppSharp.Parser.AST.TypeAliasTemplate.NativeToManagedMap[((Internal*) __Instance)->DescribedAliasTemplate];
else __result0 = CppSharp.Parser.AST.TypeAliasTemplate.__CreateInstance(((Internal*) __Instance)->DescribedAliasTemplate);
return __result0;
} }
set set
{ {
((Internal*) __Instance)->QualifiedType = ReferenceEquals(value, null) ? new CppSharp.Parser.AST.QualifiedType.Internal() : *(CppSharp.Parser.AST.QualifiedType.Internal*) (value.__Instance); ((Internal*) __Instance)->DescribedAliasTemplate = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
} }
} }
} }
@ -6506,7 +6836,7 @@ namespace CppSharp
public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Enumeration : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 456)] [StructLayout(LayoutKind.Explicit, Size = 480)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -6548,16 +6878,16 @@ namespace CppSharp
[FieldOffset(184)] [FieldOffset(184)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(400)] [FieldOffset(424)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(408)] [FieldOffset(432)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers; public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
[FieldOffset(416)] [FieldOffset(440)]
public global::System.IntPtr Type; public global::System.IntPtr Type;
[FieldOffset(424)] [FieldOffset(448)]
public global::System.IntPtr BuiltinType; public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -6782,7 +7112,7 @@ namespace CppSharp
private static void* __CopyValue(Enumeration.Internal native) private static void* __CopyValue(Enumeration.Internal native)
{ {
var ret = Marshal.AllocHGlobal(456); var ret = Marshal.AllocHGlobal(480);
CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Enumeration.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -6806,7 +7136,7 @@ namespace CppSharp
public Enumeration() public Enumeration()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(456); __Instance = Marshal.AllocHGlobal(480);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -6815,7 +7145,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0) public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(456); __Instance = Marshal.AllocHGlobal(480);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -7555,7 +7885,7 @@ namespace CppSharp
public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Class : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 528)] [StructLayout(LayoutKind.Explicit, Size = 552)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -7597,37 +7927,37 @@ namespace CppSharp
[FieldOffset(184)] [FieldOffset(184)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(400)] [FieldOffset(424)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(504)] [FieldOffset(528)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(505)] [FieldOffset(529)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(506)] [FieldOffset(530)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(507)] [FieldOffset(531)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(508)] [FieldOffset(532)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(509)] [FieldOffset(533)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(510)] [FieldOffset(534)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(511)] [FieldOffset(535)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(512)] [FieldOffset(536)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(520)] [FieldOffset(544)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -7738,7 +8068,7 @@ namespace CppSharp
private static void* __CopyValue(Class.Internal native) private static void* __CopyValue(Class.Internal native)
{ {
var ret = Marshal.AllocHGlobal(528); var ret = Marshal.AllocHGlobal(552);
CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Class.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -7762,7 +8092,7 @@ namespace CppSharp
public Class() public Class()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(528); __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -7771,7 +8101,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0) public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(528); __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9278,7 +9608,7 @@ namespace CppSharp
public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable public unsafe partial class ClassTemplateSpecialization : CppSharp.Parser.AST.Class, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 568)] [StructLayout(LayoutKind.Explicit, Size = 592)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9320,43 +9650,43 @@ namespace CppSharp
[FieldOffset(184)] [FieldOffset(184)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(400)] [FieldOffset(424)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(504)] [FieldOffset(528)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(505)] [FieldOffset(529)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(506)] [FieldOffset(530)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(507)] [FieldOffset(531)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(508)] [FieldOffset(532)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(509)] [FieldOffset(533)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(510)] [FieldOffset(534)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(511)] [FieldOffset(535)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(512)] [FieldOffset(536)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(520)] [FieldOffset(544)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(528)] [FieldOffset(552)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(560)] [FieldOffset(584)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9407,7 +9737,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplateSpecialization.Internal native) private static void* __CopyValue(ClassTemplateSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(568); var ret = Marshal.AllocHGlobal(592);
CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplateSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9431,7 +9761,7 @@ namespace CppSharp
public ClassTemplateSpecialization() public ClassTemplateSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(568); __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9440,7 +9770,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0) public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(568); __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -9521,7 +9851,7 @@ namespace CppSharp
public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable public unsafe partial class ClassTemplatePartialSpecialization : CppSharp.Parser.AST.ClassTemplateSpecialization, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 568)] [StructLayout(LayoutKind.Explicit, Size = 592)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -9563,43 +9893,43 @@ namespace CppSharp
[FieldOffset(184)] [FieldOffset(184)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(400)] [FieldOffset(424)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(504)] [FieldOffset(528)]
public byte IsPOD; public byte IsPOD;
[FieldOffset(505)] [FieldOffset(529)]
public byte IsAbstract; public byte IsAbstract;
[FieldOffset(506)] [FieldOffset(530)]
public byte IsUnion; public byte IsUnion;
[FieldOffset(507)] [FieldOffset(531)]
public byte IsDynamic; public byte IsDynamic;
[FieldOffset(508)] [FieldOffset(532)]
public byte IsPolymorphic; public byte IsPolymorphic;
[FieldOffset(509)] [FieldOffset(533)]
public byte HasNonTrivialDefaultConstructor; public byte HasNonTrivialDefaultConstructor;
[FieldOffset(510)] [FieldOffset(534)]
public byte HasNonTrivialCopyConstructor; public byte HasNonTrivialCopyConstructor;
[FieldOffset(511)] [FieldOffset(535)]
public byte HasNonTrivialDestructor; public byte HasNonTrivialDestructor;
[FieldOffset(512)] [FieldOffset(536)]
public byte IsExternCContext; public byte IsExternCContext;
[FieldOffset(520)] [FieldOffset(544)]
public global::System.IntPtr Layout; public global::System.IntPtr Layout;
[FieldOffset(528)] [FieldOffset(552)]
public global::System.IntPtr TemplatedDecl; public global::System.IntPtr TemplatedDecl;
[FieldOffset(560)] [FieldOffset(584)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind; public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -9630,7 +9960,7 @@ namespace CppSharp
private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native) private static void* __CopyValue(ClassTemplatePartialSpecialization.Internal native)
{ {
var ret = Marshal.AllocHGlobal(568); var ret = Marshal.AllocHGlobal(592);
CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.ClassTemplatePartialSpecialization.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -9654,7 +9984,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization() public ClassTemplatePartialSpecialization()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(568); __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -9663,7 +9993,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0) public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(568); __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10065,7 +10395,7 @@ namespace CppSharp
public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable public unsafe partial class Namespace : CppSharp.Parser.AST.DeclarationContext, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 416)] [StructLayout(LayoutKind.Explicit, Size = 440)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10107,10 +10437,10 @@ namespace CppSharp
[FieldOffset(184)] [FieldOffset(184)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(400)] [FieldOffset(424)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(408)] [FieldOffset(432)]
public byte IsInline; public byte IsInline;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10141,7 +10471,7 @@ namespace CppSharp
private static void* __CopyValue(Namespace.Internal native) private static void* __CopyValue(Namespace.Internal native)
{ {
var ret = Marshal.AllocHGlobal(416); var ret = Marshal.AllocHGlobal(440);
CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.Namespace.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10165,7 +10495,7 @@ namespace CppSharp
public Namespace() public Namespace()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(416); __Instance = Marshal.AllocHGlobal(440);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10174,7 +10504,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0) public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(416); __Instance = Marshal.AllocHGlobal(440);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))
@ -10686,7 +11016,7 @@ namespace CppSharp
public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable public unsafe partial class TranslationUnit : CppSharp.Parser.AST.Namespace, IDisposable
{ {
[StructLayout(LayoutKind.Explicit, Size = 480)] [StructLayout(LayoutKind.Explicit, Size = 504)]
public new partial struct Internal public new partial struct Internal
{ {
[FieldOffset(0)] [FieldOffset(0)]
@ -10728,13 +11058,13 @@ namespace CppSharp
[FieldOffset(184)] [FieldOffset(184)]
public global::System.IntPtr Comment; public global::System.IntPtr Comment;
[FieldOffset(400)] [FieldOffset(424)]
public byte IsAnonymous; public byte IsAnonymous;
[FieldOffset(408)] [FieldOffset(432)]
public byte IsInline; public byte IsInline;
[FieldOffset(448)] [FieldOffset(472)]
public byte IsSystemHeader; public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity] [SuppressUnmanagedCodeSecurity]
@ -10795,7 +11125,7 @@ namespace CppSharp
private static void* __CopyValue(TranslationUnit.Internal native) private static void* __CopyValue(TranslationUnit.Internal native)
{ {
var ret = Marshal.AllocHGlobal(480); var ret = Marshal.AllocHGlobal(504);
CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native)); CppSharp.Parser.AST.TranslationUnit.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer(); return ret.ToPointer();
} }
@ -10819,7 +11149,7 @@ namespace CppSharp
public TranslationUnit() public TranslationUnit()
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(480); __Instance = Marshal.AllocHGlobal(504);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment)); Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10828,7 +11158,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0) public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null) : this((void*) null)
{ {
__Instance = Marshal.AllocHGlobal(480); __Instance = Marshal.AllocHGlobal(504);
__ownsNativeInstance = true; __ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this; NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null)) if (ReferenceEquals(_0, null))

38
src/CppParser/Parser.cpp

@ -478,7 +478,7 @@ static std::string GetTagDeclName(const clang::TagDecl* D)
{ {
using namespace clang; using namespace clang;
if (TypedefNameDecl *Typedef = D->getTypedefNameForAnonDecl()) if (auto Typedef = D->getTypedefNameForAnonDecl())
{ {
assert(Typedef->getIdentifier() && "Typedef without identifier?"); assert(Typedef->getIdentifier() && "Typedef without identifier?");
return GetDeclName(Typedef); return GetDeclName(Typedef);
@ -1291,14 +1291,11 @@ TypeAliasTemplate* Parser::WalkTypeAliasTemplate(
if (TA != nullptr) if (TA != nullptr)
return TA; return TA;
// TODO: Add this when we add TypeAliasDecl to AST.
//auto TemplatedDecl = TD->getTemplatedDecl();
TA = new TypeAliasTemplate(); TA = new TypeAliasTemplate();
HandleDeclaration(TD, TA); HandleDeclaration(TD, TA);
TA->Name = GetDeclName(TD); TA->Name = GetDeclName(TD);
//TA->TemplatedDecl = TAD; TA->TemplatedDecl = WalkDeclaration(TD->getTemplatedDecl());
TA->Parameters = WalkTemplateParameterList(TD->getTemplateParameters()); TA->Parameters = WalkTemplateParameterList(TD->getTemplateParameters());
NS->Templates.push_back(TA); NS->Templates.push_back(TA);
@ -1941,10 +1938,10 @@ Type* Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL,
case clang::Type::Typedef: case clang::Type::Typedef:
{ {
auto TT = Type->getAs<clang::TypedefType>(); auto TT = Type->getAs<clang::TypedefType>();
TypedefNameDecl* TD = TT->getDecl(); auto TD = TT->getDecl();
auto TTL = TD->getTypeSourceInfo()->getTypeLoc(); auto TTL = TD->getTypeSourceInfo()->getTypeLoc();
auto TDD = static_cast<TypedefDecl*>(WalkDeclaration(TD, auto TDD = static_cast<TypedefNameDecl*>(WalkDeclaration(TD,
/*IgnoreSystemDecls=*/false)); /*IgnoreSystemDecls=*/false));
auto Type = new TypedefType(); auto Type = new TypedefType();
@ -2448,7 +2445,7 @@ static const clang::CodeGen::CGFunctionInfo& GetCodeGenFuntionInfo(
return CodeGenTypes->arrangeFunctionDeclaration(FD); return CodeGenTypes->arrangeFunctionDeclaration(FD);
} }
static bool CanCheckCodeGenInfo(clang::Sema& S, const clang::Type* Ty) bool Parser::CanCheckCodeGenInfo(clang::Sema& S, const clang::Type* Ty)
{ {
auto FinalType = GetFinalType(Ty); auto FinalType = GetFinalType(Ty);
@ -3231,7 +3228,6 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
break; break;
} }
case Decl::Typedef: case Decl::Typedef:
case Decl::TypeAlias:
{ {
auto TD = cast<clang::TypedefNameDecl>(D); auto TD = cast<clang::TypedefNameDecl>(D);
@ -3249,15 +3245,39 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
Decl = Typedef; Decl = Typedef;
break; break;
} }
case Decl::TypeAlias:
{
auto TD = cast<clang::TypeAliasDecl>(D);
auto NS = GetNamespace(TD);
auto Name = GetDeclName(TD);
auto TypeAlias = NS->FindTypeAlias(Name, /*Create=*/false);
if (TypeAlias) return TypeAlias;
TypeAlias = NS->FindTypeAlias(Name, /*Create=*/true);
HandleDeclaration(TD, TypeAlias);
auto TTL = TD->getTypeSourceInfo()->getTypeLoc();
TypeAlias->QualifiedType = GetQualifiedType(TD->getUnderlyingType(), &TTL);
if (auto TAT = TD->getDescribedAliasTemplate())
TypeAlias->DescribedAliasTemplate = WalkTypeAliasTemplate(TAT);
Decl = TypeAlias;
}
case Decl::Namespace: case Decl::Namespace:
{ {
auto ND = cast<NamespaceDecl>(D); auto ND = cast<NamespaceDecl>(D);
// HACK: work around https://llvm.org/bugs/show_bug.cgi?id=28397
if (D->getKind() != Decl::Kind::TypeAlias)
{
for (auto it = ND->decls_begin(); it != ND->decls_end(); ++it) for (auto it = ND->decls_begin(); it != ND->decls_end(); ++it)
{ {
clang::Decl* D = (*it); clang::Decl* D = (*it);
Decl = WalkDeclarationDef(D); Decl = WalkDeclarationDef(D);
} }
}
break; break;
} }

1
src/CppParser/Parser.h

@ -113,6 +113,7 @@ private:
bool IsValidDeclaration(const clang::SourceLocation& Loc); bool IsValidDeclaration(const clang::SourceLocation& Loc);
std::string GetDeclMangledName(const clang::Decl* D); std::string GetDeclMangledName(const clang::Decl* D);
std::string GetTypeName(const clang::Type* Type); std::string GetTypeName(const clang::Type* Type);
bool CanCheckCodeGenInfo(clang::Sema & S, const clang::Type * Ty);
void WalkFunction(const clang::FunctionDecl* FD, Function* F, void WalkFunction(const clang::FunctionDecl* FD, Function* F,
bool IsDependent = false); bool IsDependent = false);
void HandlePreprocessedEntities(Declaration* Decl); void HandlePreprocessedEntities(Declaration* Decl);

5
src/Generator.Tests/AST/TestAST.cs

@ -106,6 +106,11 @@ namespace CppSharp.Generator.Tests.AST
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
public bool VisitTypeAliasDecl(TypeAlias typeAlias)
{
throw new NotImplementedException();
}
public bool VisitEnumDecl(Enumeration @enum) public bool VisitEnumDecl(Enumeration @enum)
{ {
throw new System.NotImplementedException(); throw new System.NotImplementedException();

5
src/Generator/Generators/CLI/CLITypePrinter.cs

@ -380,6 +380,11 @@ namespace CppSharp.Generators.CLI
return typedef.Name; return typedef.Name;
} }
public string VisitTypeAliasDecl(TypeAlias typeAlias)
{
return typeAlias.Name;
}
public string VisitEnumDecl(Enumeration @enum) public string VisitEnumDecl(Enumeration @enum)
{ {
return @enum.Name; return @enum.Name;

5
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -614,6 +614,11 @@ namespace CppSharp.Generators.CSharp
return GetNestedQualifiedName(typedef); return GetNestedQualifiedName(typedef);
} }
public CSharpTypePrinterResult VisitTypeAliasDecl(TypeAlias typeAlias)
{
return GetNestedQualifiedName(typeAlias);
}
public CSharpTypePrinterResult VisitEnumDecl(Enumeration @enum) public CSharpTypePrinterResult VisitEnumDecl(Enumeration @enum)
{ {
return GetNestedQualifiedName(@enum); return GetNestedQualifiedName(@enum);

5
src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs

@ -198,6 +198,11 @@ namespace CppSharp.Passes
return false; return false;
} }
public bool VisitTypeAliasDecl(TypeAlias typeAlias)
{
return false;
}
public bool VisitEnumDecl(Enumeration @enum) public bool VisitEnumDecl(Enumeration @enum)
{ {
return false; return false;

5
src/Generator/Types/CppTypePrinter.cs

@ -296,6 +296,11 @@ namespace CppSharp.Types
return VisitDeclaration(typedef); return VisitDeclaration(typedef);
} }
public string VisitTypeAliasDecl(TypeAlias typeAlias)
{
return VisitDeclaration(typeAlias);
}
public string VisitEnumDecl(Enumeration @enum) public string VisitEnumDecl(Enumeration @enum)
{ {
return VisitDeclaration(@enum); return VisitDeclaration(@enum);

2
tests/Common/Common.h

@ -1137,3 +1137,5 @@ class DLL_API HasAbstractOperator
public: public:
virtual bool operator==(const HasAbstractOperator& other) = 0; virtual bool operator==(const HasAbstractOperator& other) = 0;
}; };
using data_type = typename std::aligned_storage<16, 8>::type;
Loading…
Cancel
Save