diff --git a/src/AST/ASTVisitor.cs b/src/AST/ASTVisitor.cs
index f60041f6..e56719e7 100644
--- a/src/AST/ASTVisitor.cs
+++ b/src/AST/ASTVisitor.cs
@@ -348,6 +348,17 @@ namespace CppSharp.AST
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)
{
if (!VisitDeclaration(@enum))
diff --git a/src/AST/Declaration.cs b/src/AST/Declaration.cs
index f9014ce1..0f764550 100644
--- a/src/AST/Declaration.cs
+++ b/src/AST/Declaration.cs
@@ -354,20 +354,39 @@ namespace CppSharp.AST
}
///
- /// Represents a type definition in C++.
+ /// Base class for declarations which introduce a typedef-name.
///
- public class TypedefDecl : Declaration, ITypedDecl
+ public abstract class TypedefNameDecl : Declaration, ITypedDecl
{
public Type Type { get { return QualifiedType.Type; } }
public QualifiedType QualifiedType { get; set; }
public bool IsSynthetized { get; set; }
+ }
+ ///
+ /// Represents a type definition in C++.
+ ///
+ public class TypedefDecl : TypedefNameDecl
+ {
public override T Visit(IDeclVisitor visitor)
{
return visitor.VisitTypedefDecl(this);
}
}
+ ///
+ /// Represents a type alias in C++.
+ ///
+ public class TypeAlias : TypedefNameDecl
+ {
+ public TypeAliasTemplate DescribedAliasTemplate { get; set; }
+
+ public override T Visit(IDeclVisitor visitor)
+ {
+ return visitor.VisitTypeAliasDecl(this);
+ }
+ }
+
public interface IDeclVisitor
{
T VisitDeclaration(Declaration decl);
@@ -377,6 +396,7 @@ namespace CppSharp.AST
T VisitMethodDecl(Method method);
T VisitParameterDecl(Parameter parameter);
T VisitTypedefDecl(TypedefDecl typedef);
+ T VisitTypeAliasDecl(TypeAlias typeAlias);
T VisitEnumDecl(Enumeration @enum);
T VisitVariableDecl(Variable variable);
T VisitClassTemplateDecl(ClassTemplate template);
diff --git a/src/AST/Type.cs b/src/AST/Type.cs
index e1c6ce80..436ecec9 100644
--- a/src/AST/Type.cs
+++ b/src/AST/Type.cs
@@ -393,7 +393,7 @@ namespace CppSharp.AST
///
public class TypedefType : Type
{
- public TypedefDecl Declaration;
+ public TypedefNameDecl Declaration { get; set; }
public TypedefType()
{
diff --git a/src/Core/Parser/ASTConverter.cs b/src/Core/Parser/ASTConverter.cs
index 2a35f9ca..d64f70a0 100644
--- a/src/Core/Parser/ASTConverter.cs
+++ b/src/Core/Parser/ASTConverter.cs
@@ -123,6 +123,7 @@ namespace CppSharp
public abstract TRet VisitTranslationUnit(TranslationUnit decl);
public abstract TRet VisitNamespace(Namespace decl);
public abstract TRet VisitTypedef(TypedefDecl decl);
+ public abstract TRet VisitTypeAlias(TypeAlias decl);
public abstract TRet VisitParameter(Parameter decl);
public abstract TRet VisitFunction(Function decl);
public abstract TRet VisitMethod(Method decl);
@@ -163,6 +164,11 @@ namespace CppSharp
var _decl = TypedefDecl.__CreateInstance(decl.__Instance);
return VisitTypedef(_decl);
}
+ case DeclarationKind.TypeAlias:
+ {
+ var _decl = TypeAlias.__CreateInstance(decl.__Instance);
+ return VisitTypeAlias(_decl);
+ }
case DeclarationKind.Parameter:
{
var _decl = Parameter.__CreateInstance(decl.__Instance);
@@ -487,7 +493,7 @@ namespace CppSharp
public override AST.Type VisitMemberPointer(MemberPointerType type)
{
- var _type = new CppSharp.AST.MemberPointerType();
+ var _type = new AST.MemberPointerType();
VisitType(type, _type);
_type.QualifiedPointee = VisitQualified(type.Pointee);
return _type;
@@ -495,16 +501,15 @@ namespace CppSharp
public override AST.Type VisitTypedef(TypedefType type)
{
- var _type = new CppSharp.AST.TypedefType();
+ var _type = new AST.TypedefType();
VisitType(type, _type);
- _type.Declaration = declConverter.Visit(type.Declaration)
- as AST.TypedefDecl;
+ _type.Declaration = (AST.TypedefNameDecl) declConverter.Visit(type.Declaration);
return _type;
}
public override AST.Type VisitAttributed(AttributedType type)
{
- var _type = new CppSharp.AST.AttributedType();
+ var _type = new AST.AttributedType();
VisitType(type, _type);
_type.Modified = VisitQualified(type.Modified);
_type.Equivalent = VisitQualified(type.Equivalent);
@@ -513,7 +518,7 @@ namespace CppSharp
public override AST.Type VisitDecayed(DecayedType type)
{
- var _type = new CppSharp.AST.DecayedType();
+ var _type = new AST.DecayedType();
_type.Decayed = VisitQualified(type.Decayed);
_type.Original = VisitQualified(type.Original);
_type.Pointee = VisitQualified(type.Pointee);
@@ -932,6 +937,17 @@ namespace CppSharp
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)
{
var _param = new AST.Parameter();
diff --git a/src/CppParser/AST.cpp b/src/CppParser/AST.cpp
index ea0cec96..bc5da784 100644
--- a/src/CppParser/AST.cpp
+++ b/src/CppParser/AST.cpp
@@ -273,6 +273,7 @@ DEF_VECTOR(DeclarationContext, Function*, Functions)
DEF_VECTOR(DeclarationContext, Class*, Classes)
DEF_VECTOR(DeclarationContext, Template*, Templates)
DEF_VECTOR(DeclarationContext, TypedefDecl*, Typedefs)
+DEF_VECTOR(DeclarationContext, TypeAlias*, TypeAliases)
DEF_VECTOR(DeclarationContext, Variable*, Variables)
DEF_VECTOR(DeclarationContext, Friend*, Friends)
@@ -523,6 +524,25 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat
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)
{
auto found = std::find_if(Variables.begin(), Variables.end(),
@@ -545,10 +565,18 @@ Friend* DeclarationContext::FindFriend(const std::string& USR)
return nullptr;
}
-TypedefDecl::TypedefDecl() : Declaration(DeclarationKind::Typedef) {}
+TypedefNameDecl::TypedefNameDecl(DeclarationKind Kind) : Declaration(Kind) {}
+
+TypedefNameDecl::~TypedefNameDecl() {}
+
+TypedefDecl::TypedefDecl() : TypedefNameDecl(DeclarationKind::Typedef) {}
TypedefDecl::~TypedefDecl() {}
+TypeAlias::TypeAlias() : TypedefNameDecl(DeclarationKind::TypeAlias), DescribedAliasTemplate(0) {}
+
+TypeAlias::~TypeAlias() {}
+
Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), Declaration(0) {}
Friend::~Friend() {}
diff --git a/src/CppParser/AST.h b/src/CppParser/AST.h
index 7a975311..dbb85392 100644
--- a/src/CppParser/AST.h
+++ b/src/CppParser/AST.h
@@ -132,13 +132,13 @@ public:
QualifiedType Pointee;
};
-class TypedefDecl;
+class TypedefNameDecl;
class CS_API TypedefType : public Type
{
public:
TypedefType();
- TypedefDecl* Declaration;
+ TypedefNameDecl* Declaration;
};
class CS_API AttributedType : public Type
@@ -362,6 +362,7 @@ enum class DeclarationKind
{
DeclarationContext,
Typedef,
+ TypeAlias,
Parameter,
Function,
Method,
@@ -432,6 +433,7 @@ class Class;
class Enumeration;
class Function;
class TypedefDecl;
+class TypeAlias;
class Namespace;
class Template;
class TypeAliasTemplate;
@@ -468,6 +470,8 @@ public:
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 Friend* FindFriend(const std::string& USR);
@@ -478,6 +482,7 @@ public:
VECTOR(Class*, Classes)
VECTOR(Template*, Templates)
VECTOR(TypedefDecl*, Typedefs)
+ VECTOR(TypeAlias*, TypeAliases)
VECTOR(Variable*, Variables)
VECTOR(Friend*, Friends)
@@ -486,12 +491,27 @@ public:
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:
DECLARE_DECL_KIND(TypedefDecl, Typedef)
~TypedefDecl();
- CppSharp::CppParser::AST::QualifiedType QualifiedType;
+};
+
+class CS_API TypeAlias : public TypedefNameDecl
+{
+public:
+ TypeAlias();
+ ~TypeAlias();
+ TypeAliasTemplate* DescribedAliasTemplate;
};
class CS_API Friend : public Declaration
diff --git a/src/CppParser/Bindings/CLI/AST.cpp b/src/CppParser/Bindings/CLI/AST.cpp
index 59163b0a..85b513b8 100644
--- a/src/CppParser/Bindings/CLI/AST.cpp
+++ b/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);
}
-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)
@@ -2017,6 +2017,26 @@ void CppSharp::Parser::AST::DeclarationContext::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)
{
auto __ret = ((::CppSharp::CppParser::AST::DeclarationContext*)NativePtr)->getVariables(i);
@@ -2103,6 +2123,12 @@ unsigned int CppSharp::Parser::AST::DeclarationContext::TypedefsCount::get()
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()
{
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::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::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)
{
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::Declaration((::CppSharp::CppParser::AST::Declaration*)nullptr)
+ : CppSharp::Parser::AST::TypedefNameDecl((::CppSharp::CppParser::AST::TypedefNameDecl*)nullptr)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::AST::TypedefDecl();
}
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;
if (ReferenceEquals(_0, nullptr))
@@ -2162,14 +2236,51 @@ CppSharp::Parser::AST::TypedefDecl::TypedefDecl(CppSharp::Parser::AST::TypedefDe
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)
diff --git a/src/CppParser/Bindings/CLI/AST.h b/src/CppParser/Bindings/CLI/AST.h
index fb6e6863..7602bdca 100644
--- a/src/CppParser/Bindings/CLI/AST.h
+++ b/src/CppParser/Bindings/CLI/AST.h
@@ -91,10 +91,12 @@ namespace CppSharp
ref class TextComment;
ref class TranslationUnit;
ref class Type;
+ ref class TypeAlias;
ref class TypeAliasTemplate;
ref class TypeQualifiers;
ref class TypeTemplateParameter;
ref class TypedefDecl;
+ ref class TypedefNameDecl;
ref class TypedefType;
ref class VFTableInfo;
ref class VTableComponent;
@@ -136,30 +138,31 @@ namespace CppSharp
{
DeclarationContext = 0,
Typedef = 1,
- Parameter = 2,
- Function = 3,
- Method = 4,
- Enumeration = 5,
- EnumerationItem = 6,
- Variable = 7,
- Field = 8,
- AccessSpecifier = 9,
- Class = 10,
- Template = 11,
- TypeAliasTemplate = 12,
- ClassTemplate = 13,
- ClassTemplateSpecialization = 14,
- ClassTemplatePartialSpecialization = 15,
- FunctionTemplate = 16,
- Namespace = 17,
- PreprocessedEntity = 18,
- MacroDefinition = 19,
- MacroExpansion = 20,
- TranslationUnit = 21,
- Friend = 22,
- TemplateTemplateParm = 23,
- TemplateTypeParm = 24,
- NonTypeTemplateParm = 25
+ TypeAlias = 2,
+ Parameter = 3,
+ Function = 4,
+ Method = 5,
+ Enumeration = 6,
+ EnumerationItem = 7,
+ Variable = 8,
+ Field = 9,
+ AccessSpecifier = 10,
+ Class = 11,
+ Template = 12,
+ TypeAliasTemplate = 13,
+ ClassTemplate = 14,
+ ClassTemplateSpecialization = 15,
+ ClassTemplatePartialSpecialization = 16,
+ FunctionTemplate = 17,
+ Namespace = 18,
+ PreprocessedEntity = 19,
+ MacroDefinition = 20,
+ MacroExpansion = 21,
+ TranslationUnit = 22,
+ Friend = 23,
+ TemplateTemplateParm = 24,
+ TemplateTypeParm = 25,
+ NonTypeTemplateParm = 26
};
public enum struct AccessSpecifier
@@ -624,10 +627,10 @@ namespace CppSharp
~TypedefType();
- property CppSharp::Parser::AST::TypedefDecl^ Declaration
+ property CppSharp::Parser::AST::TypedefNameDecl^ Declaration
{
- CppSharp::Parser::AST::TypedefDecl^ get();
- void set(CppSharp::Parser::AST::TypedefDecl^);
+ CppSharp::Parser::AST::TypedefNameDecl^ get();
+ void set(CppSharp::Parser::AST::TypedefNameDecl^);
}
};
@@ -1382,6 +1385,11 @@ namespace CppSharp
unsigned int get();
}
+ property unsigned int TypeAliasesCount
+ {
+ unsigned int get();
+ }
+
property unsigned int VariablesCount
{
unsigned int get();
@@ -1434,6 +1442,12 @@ namespace CppSharp
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);
void addVariables(CppSharp::Parser::AST::Variable^ s);
@@ -1447,7 +1461,26 @@ namespace CppSharp
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:
@@ -1458,11 +1491,24 @@ namespace CppSharp
TypedefDecl(CppSharp::Parser::AST::TypedefDecl^ _0);
~TypedefDecl();
+ };
- property CppSharp::Parser::AST::QualifiedType^ QualifiedType
+ public ref class TypeAlias : CppSharp::Parser::AST::TypedefNameDecl
+ {
+ public:
+
+ 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::QualifiedType^ get();
- void set(CppSharp::Parser::AST::QualifiedType^);
+ CppSharp::Parser::AST::TypeAliasTemplate^ get();
+ void set(CppSharp::Parser::AST::TypeAliasTemplate^);
}
};
diff --git a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
index 7e3e22cf..ce40ea9a 100644
--- a/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
+++ b/src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
@@ -37,30 +37,31 @@ namespace CppSharp
{
DeclarationContext = 0,
Typedef = 1,
- Parameter = 2,
- Function = 3,
- Method = 4,
- Enumeration = 5,
- EnumerationItem = 6,
- Variable = 7,
- Field = 8,
- AccessSpecifier = 9,
- Class = 10,
- Template = 11,
- TypeAliasTemplate = 12,
- ClassTemplate = 13,
- ClassTemplateSpecialization = 14,
- ClassTemplatePartialSpecialization = 15,
- FunctionTemplate = 16,
- Namespace = 17,
- PreprocessedEntity = 18,
- MacroDefinition = 19,
- MacroExpansion = 20,
- TranslationUnit = 21,
- Friend = 22,
- TemplateTemplateParm = 23,
- TemplateTypeParm = 24,
- NonTypeTemplateParm = 25
+ TypeAlias = 2,
+ Parameter = 3,
+ Function = 4,
+ Method = 5,
+ Enumeration = 6,
+ EnumerationItem = 7,
+ Variable = 8,
+ Field = 9,
+ AccessSpecifier = 10,
+ Class = 11,
+ Template = 12,
+ TypeAliasTemplate = 13,
+ ClassTemplate = 14,
+ ClassTemplateSpecialization = 15,
+ ClassTemplatePartialSpecialization = 16,
+ FunctionTemplate = 17,
+ Namespace = 18,
+ PreprocessedEntity = 19,
+ MacroDefinition = 20,
+ MacroExpansion = 21,
+ TranslationUnit = 22,
+ Friend = 23,
+ TemplateTemplateParm = 24,
+ TemplateTypeParm = 25,
+ NonTypeTemplateParm = 26
}
public enum AccessSpecifier
@@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
}
- public CppSharp.Parser.AST.TypedefDecl Declaration
+ public CppSharp.Parser.AST.TypedefNameDecl Declaration
{
get
{
- CppSharp.Parser.AST.TypedefDecl __result0;
+ CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
- else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
- __result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
- else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
+ else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
+ __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
+ else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0;
}
@@ -4089,7 +4090,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -4131,7 +4132,7 @@ namespace CppSharp
[FieldOffset(88)]
public global::System.IntPtr Comment;
- [FieldOffset(200)]
+ [FieldOffset(212)]
public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity]
@@ -4239,6 +4240,21 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance);
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")]
@@ -4299,6 +4315,11 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")]
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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")]
@@ -4322,7 +4343,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -4346,7 +4367,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(204);
+ __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
@@ -4356,7 +4377,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(204);
+ __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -4518,6 +4539,30 @@ namespace CppSharp
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)
{
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
{
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)]
public new partial struct Internal
@@ -4777,17 +4972,152 @@ namespace CppSharp
if (__ownsNativeInstance)
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
{
- 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
{
- ((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
{
- [StructLayout(LayoutKind.Explicit, Size = 228)]
+ [StructLayout(LayoutKind.Explicit, Size = 240)]
public new partial struct Internal
{
[FieldOffset(0)]
@@ -6548,16 +6878,16 @@ namespace CppSharp
[FieldOffset(88)]
public global::System.IntPtr Comment;
- [FieldOffset(200)]
+ [FieldOffset(212)]
public byte IsAnonymous;
- [FieldOffset(204)]
+ [FieldOffset(216)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
- [FieldOffset(208)]
+ [FieldOffset(220)]
public global::System.IntPtr Type;
- [FieldOffset(212)]
+ [FieldOffset(224)]
public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity]
@@ -6782,7 +7112,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -6806,7 +7136,7 @@ namespace CppSharp
public Enumeration()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(228);
+ __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -6815,7 +7145,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(228);
+ __Instance = Marshal.AllocHGlobal(240);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -7555,7 +7885,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -7597,37 +7927,37 @@ namespace CppSharp
[FieldOffset(88)]
public global::System.IntPtr Comment;
- [FieldOffset(200)]
+ [FieldOffset(212)]
public byte IsAnonymous;
- [FieldOffset(252)]
+ [FieldOffset(264)]
public byte IsPOD;
- [FieldOffset(253)]
+ [FieldOffset(265)]
public byte IsAbstract;
- [FieldOffset(254)]
+ [FieldOffset(266)]
public byte IsUnion;
- [FieldOffset(255)]
+ [FieldOffset(267)]
public byte IsDynamic;
- [FieldOffset(256)]
+ [FieldOffset(268)]
public byte IsPolymorphic;
- [FieldOffset(257)]
+ [FieldOffset(269)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(258)]
+ [FieldOffset(270)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(259)]
+ [FieldOffset(271)]
public byte HasNonTrivialDestructor;
- [FieldOffset(260)]
+ [FieldOffset(272)]
public byte IsExternCContext;
- [FieldOffset(264)]
+ [FieldOffset(276)]
public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity]
@@ -7738,7 +8068,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -7762,7 +8092,7 @@ namespace CppSharp
public Class()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(268);
+ __Instance = Marshal.AllocHGlobal(280);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -7771,7 +8101,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(268);
+ __Instance = Marshal.AllocHGlobal(280);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9278,7 +9608,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9320,43 +9650,43 @@ namespace CppSharp
[FieldOffset(88)]
public global::System.IntPtr Comment;
- [FieldOffset(200)]
+ [FieldOffset(212)]
public byte IsAnonymous;
- [FieldOffset(252)]
+ [FieldOffset(264)]
public byte IsPOD;
- [FieldOffset(253)]
+ [FieldOffset(265)]
public byte IsAbstract;
- [FieldOffset(254)]
+ [FieldOffset(266)]
public byte IsUnion;
- [FieldOffset(255)]
+ [FieldOffset(267)]
public byte IsDynamic;
- [FieldOffset(256)]
+ [FieldOffset(268)]
public byte IsPolymorphic;
- [FieldOffset(257)]
+ [FieldOffset(269)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(258)]
+ [FieldOffset(270)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(259)]
+ [FieldOffset(271)]
public byte HasNonTrivialDestructor;
- [FieldOffset(260)]
+ [FieldOffset(272)]
public byte IsExternCContext;
- [FieldOffset(264)]
+ [FieldOffset(276)]
public global::System.IntPtr Layout;
- [FieldOffset(268)]
+ [FieldOffset(280)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(284)]
+ [FieldOffset(296)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9407,7 +9737,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9431,7 +9761,7 @@ namespace CppSharp
public ClassTemplateSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(288);
+ __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9440,7 +9770,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(288);
+ __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9521,7 +9851,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9563,43 +9893,43 @@ namespace CppSharp
[FieldOffset(88)]
public global::System.IntPtr Comment;
- [FieldOffset(200)]
+ [FieldOffset(212)]
public byte IsAnonymous;
- [FieldOffset(252)]
+ [FieldOffset(264)]
public byte IsPOD;
- [FieldOffset(253)]
+ [FieldOffset(265)]
public byte IsAbstract;
- [FieldOffset(254)]
+ [FieldOffset(266)]
public byte IsUnion;
- [FieldOffset(255)]
+ [FieldOffset(267)]
public byte IsDynamic;
- [FieldOffset(256)]
+ [FieldOffset(268)]
public byte IsPolymorphic;
- [FieldOffset(257)]
+ [FieldOffset(269)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(258)]
+ [FieldOffset(270)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(259)]
+ [FieldOffset(271)]
public byte HasNonTrivialDestructor;
- [FieldOffset(260)]
+ [FieldOffset(272)]
public byte IsExternCContext;
- [FieldOffset(264)]
+ [FieldOffset(276)]
public global::System.IntPtr Layout;
- [FieldOffset(268)]
+ [FieldOffset(280)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(284)]
+ [FieldOffset(296)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9630,7 +9960,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9654,7 +9984,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(288);
+ __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9663,7 +9993,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(288);
+ __Instance = Marshal.AllocHGlobal(300);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10065,7 +10395,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10107,10 +10437,10 @@ namespace CppSharp
[FieldOffset(88)]
public global::System.IntPtr Comment;
- [FieldOffset(200)]
+ [FieldOffset(212)]
public byte IsAnonymous;
- [FieldOffset(201)]
+ [FieldOffset(213)]
public byte IsInline;
[SuppressUnmanagedCodeSecurity]
@@ -10141,7 +10471,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10165,7 +10495,7 @@ namespace CppSharp
public Namespace()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(204);
+ __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10174,7 +10504,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(204);
+ __Instance = Marshal.AllocHGlobal(216);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10686,7 +11016,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10728,13 +11058,13 @@ namespace CppSharp
[FieldOffset(88)]
public global::System.IntPtr Comment;
- [FieldOffset(200)]
+ [FieldOffset(212)]
public byte IsAnonymous;
- [FieldOffset(201)]
+ [FieldOffset(213)]
public byte IsInline;
- [FieldOffset(216)]
+ [FieldOffset(228)]
public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity]
@@ -10795,7 +11125,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10819,7 +11149,7 @@ namespace CppSharp
public TranslationUnit()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(232);
+ __Instance = Marshal.AllocHGlobal(244);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10828,7 +11158,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(232);
+ __Instance = Marshal.AllocHGlobal(244);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
diff --git a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
index fa9d2c42..de94def6 100644
--- a/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
+++ b/src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
@@ -37,30 +37,31 @@ namespace CppSharp
{
DeclarationContext = 0,
Typedef = 1,
- Parameter = 2,
- Function = 3,
- Method = 4,
- Enumeration = 5,
- EnumerationItem = 6,
- Variable = 7,
- Field = 8,
- AccessSpecifier = 9,
- Class = 10,
- Template = 11,
- TypeAliasTemplate = 12,
- ClassTemplate = 13,
- ClassTemplateSpecialization = 14,
- ClassTemplatePartialSpecialization = 15,
- FunctionTemplate = 16,
- Namespace = 17,
- PreprocessedEntity = 18,
- MacroDefinition = 19,
- MacroExpansion = 20,
- TranslationUnit = 21,
- Friend = 22,
- TemplateTemplateParm = 23,
- TemplateTypeParm = 24,
- NonTypeTemplateParm = 25
+ TypeAlias = 2,
+ Parameter = 3,
+ Function = 4,
+ Method = 5,
+ Enumeration = 6,
+ EnumerationItem = 7,
+ Variable = 8,
+ Field = 9,
+ AccessSpecifier = 10,
+ Class = 11,
+ Template = 12,
+ TypeAliasTemplate = 13,
+ ClassTemplate = 14,
+ ClassTemplateSpecialization = 15,
+ ClassTemplatePartialSpecialization = 16,
+ FunctionTemplate = 17,
+ Namespace = 18,
+ PreprocessedEntity = 19,
+ MacroDefinition = 20,
+ MacroExpansion = 21,
+ TranslationUnit = 22,
+ Friend = 23,
+ TemplateTemplateParm = 24,
+ TemplateTypeParm = 25,
+ NonTypeTemplateParm = 26
}
public enum AccessSpecifier
@@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
}
- public CppSharp.Parser.AST.TypedefDecl Declaration
+ public CppSharp.Parser.AST.TypedefNameDecl Declaration
{
get
{
- CppSharp.Parser.AST.TypedefDecl __result0;
+ CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
- else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
- __result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
- else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
+ else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
+ __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
+ else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0;
}
@@ -4089,7 +4090,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -4131,7 +4132,7 @@ namespace CppSharp
[FieldOffset(124)]
public global::System.IntPtr Comment;
- [FieldOffset(232)]
+ [FieldOffset(244)]
public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity]
@@ -4239,6 +4240,21 @@ namespace CppSharp
EntryPoint="?clearTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QAEXXZ")]
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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getVariables@DeclarationContext@AST@CppParser@CppSharp@@QAEPAVVariable@234@I@Z")]
@@ -4299,6 +4315,11 @@ namespace CppSharp
EntryPoint="?getTypedefsCount@DeclarationContext@AST@CppParser@CppSharp@@QAEIXZ")]
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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getVariablesCount@DeclarationContext@AST@CppParser@CppSharp@@QAEIXZ")]
@@ -4322,7 +4343,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -4346,7 +4367,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(236);
+ __Instance = Marshal.AllocHGlobal(248);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
@@ -4356,7 +4377,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(236);
+ __Instance = Marshal.AllocHGlobal(248);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -4518,6 +4539,30 @@ namespace CppSharp
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)
{
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
{
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)]
public new partial struct Internal
@@ -4777,17 +4972,152 @@ namespace CppSharp
if (__ownsNativeInstance)
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
{
- 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
{
- ((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
{
- [StructLayout(LayoutKind.Explicit, Size = 260)]
+ [StructLayout(LayoutKind.Explicit, Size = 272)]
public new partial struct Internal
{
[FieldOffset(0)]
@@ -6548,16 +6878,16 @@ namespace CppSharp
[FieldOffset(124)]
public global::System.IntPtr Comment;
- [FieldOffset(232)]
+ [FieldOffset(244)]
public byte IsAnonymous;
- [FieldOffset(236)]
+ [FieldOffset(248)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
- [FieldOffset(240)]
+ [FieldOffset(252)]
public global::System.IntPtr Type;
- [FieldOffset(244)]
+ [FieldOffset(256)]
public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity]
@@ -6782,7 +7112,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -6806,7 +7136,7 @@ namespace CppSharp
public Enumeration()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(260);
+ __Instance = Marshal.AllocHGlobal(272);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -6815,7 +7145,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(260);
+ __Instance = Marshal.AllocHGlobal(272);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -7555,7 +7885,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -7597,37 +7927,37 @@ namespace CppSharp
[FieldOffset(124)]
public global::System.IntPtr Comment;
- [FieldOffset(232)]
+ [FieldOffset(244)]
public byte IsAnonymous;
- [FieldOffset(284)]
+ [FieldOffset(296)]
public byte IsPOD;
- [FieldOffset(285)]
+ [FieldOffset(297)]
public byte IsAbstract;
- [FieldOffset(286)]
+ [FieldOffset(298)]
public byte IsUnion;
- [FieldOffset(287)]
+ [FieldOffset(299)]
public byte IsDynamic;
- [FieldOffset(288)]
+ [FieldOffset(300)]
public byte IsPolymorphic;
- [FieldOffset(289)]
+ [FieldOffset(301)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(290)]
+ [FieldOffset(302)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(291)]
+ [FieldOffset(303)]
public byte HasNonTrivialDestructor;
- [FieldOffset(292)]
+ [FieldOffset(304)]
public byte IsExternCContext;
- [FieldOffset(296)]
+ [FieldOffset(308)]
public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity]
@@ -7738,7 +8068,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -7762,7 +8092,7 @@ namespace CppSharp
public Class()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(300);
+ __Instance = Marshal.AllocHGlobal(312);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -7771,7 +8101,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(300);
+ __Instance = Marshal.AllocHGlobal(312);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9278,7 +9608,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9320,43 +9650,43 @@ namespace CppSharp
[FieldOffset(124)]
public global::System.IntPtr Comment;
- [FieldOffset(232)]
+ [FieldOffset(244)]
public byte IsAnonymous;
- [FieldOffset(284)]
+ [FieldOffset(296)]
public byte IsPOD;
- [FieldOffset(285)]
+ [FieldOffset(297)]
public byte IsAbstract;
- [FieldOffset(286)]
+ [FieldOffset(298)]
public byte IsUnion;
- [FieldOffset(287)]
+ [FieldOffset(299)]
public byte IsDynamic;
- [FieldOffset(288)]
+ [FieldOffset(300)]
public byte IsPolymorphic;
- [FieldOffset(289)]
+ [FieldOffset(301)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(290)]
+ [FieldOffset(302)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(291)]
+ [FieldOffset(303)]
public byte HasNonTrivialDestructor;
- [FieldOffset(292)]
+ [FieldOffset(304)]
public byte IsExternCContext;
- [FieldOffset(296)]
+ [FieldOffset(308)]
public global::System.IntPtr Layout;
- [FieldOffset(300)]
+ [FieldOffset(312)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(316)]
+ [FieldOffset(328)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9407,7 +9737,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9431,7 +9761,7 @@ namespace CppSharp
public ClassTemplateSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(320);
+ __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9440,7 +9770,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(320);
+ __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9521,7 +9851,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9563,43 +9893,43 @@ namespace CppSharp
[FieldOffset(124)]
public global::System.IntPtr Comment;
- [FieldOffset(232)]
+ [FieldOffset(244)]
public byte IsAnonymous;
- [FieldOffset(284)]
+ [FieldOffset(296)]
public byte IsPOD;
- [FieldOffset(285)]
+ [FieldOffset(297)]
public byte IsAbstract;
- [FieldOffset(286)]
+ [FieldOffset(298)]
public byte IsUnion;
- [FieldOffset(287)]
+ [FieldOffset(299)]
public byte IsDynamic;
- [FieldOffset(288)]
+ [FieldOffset(300)]
public byte IsPolymorphic;
- [FieldOffset(289)]
+ [FieldOffset(301)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(290)]
+ [FieldOffset(302)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(291)]
+ [FieldOffset(303)]
public byte HasNonTrivialDestructor;
- [FieldOffset(292)]
+ [FieldOffset(304)]
public byte IsExternCContext;
- [FieldOffset(296)]
+ [FieldOffset(308)]
public global::System.IntPtr Layout;
- [FieldOffset(300)]
+ [FieldOffset(312)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(316)]
+ [FieldOffset(328)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9630,7 +9960,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9654,7 +9984,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(320);
+ __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9663,7 +9993,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(320);
+ __Instance = Marshal.AllocHGlobal(332);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10065,7 +10395,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10107,10 +10437,10 @@ namespace CppSharp
[FieldOffset(124)]
public global::System.IntPtr Comment;
- [FieldOffset(232)]
+ [FieldOffset(244)]
public byte IsAnonymous;
- [FieldOffset(236)]
+ [FieldOffset(248)]
public byte IsInline;
[SuppressUnmanagedCodeSecurity]
@@ -10141,7 +10471,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10165,7 +10495,7 @@ namespace CppSharp
public Namespace()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(240);
+ __Instance = Marshal.AllocHGlobal(252);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10174,7 +10504,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(240);
+ __Instance = Marshal.AllocHGlobal(252);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10686,7 +11016,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10728,13 +11058,13 @@ namespace CppSharp
[FieldOffset(124)]
public global::System.IntPtr Comment;
- [FieldOffset(232)]
+ [FieldOffset(244)]
public byte IsAnonymous;
- [FieldOffset(236)]
+ [FieldOffset(248)]
public byte IsInline;
- [FieldOffset(264)]
+ [FieldOffset(276)]
public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity]
@@ -10795,7 +11125,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10819,7 +11149,7 @@ namespace CppSharp
public TranslationUnit()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(280);
+ __Instance = Marshal.AllocHGlobal(292);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10828,7 +11158,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(280);
+ __Instance = Marshal.AllocHGlobal(292);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
diff --git a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
index 29677430..4b139323 100644
--- a/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
+++ b/src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
@@ -37,30 +37,31 @@ namespace CppSharp
{
DeclarationContext = 0,
Typedef = 1,
- Parameter = 2,
- Function = 3,
- Method = 4,
- Enumeration = 5,
- EnumerationItem = 6,
- Variable = 7,
- Field = 8,
- AccessSpecifier = 9,
- Class = 10,
- Template = 11,
- TypeAliasTemplate = 12,
- ClassTemplate = 13,
- ClassTemplateSpecialization = 14,
- ClassTemplatePartialSpecialization = 15,
- FunctionTemplate = 16,
- Namespace = 17,
- PreprocessedEntity = 18,
- MacroDefinition = 19,
- MacroExpansion = 20,
- TranslationUnit = 21,
- Friend = 22,
- TemplateTemplateParm = 23,
- TemplateTypeParm = 24,
- NonTypeTemplateParm = 25
+ TypeAlias = 2,
+ Parameter = 3,
+ Function = 4,
+ Method = 5,
+ Enumeration = 6,
+ EnumerationItem = 7,
+ Variable = 8,
+ Field = 9,
+ AccessSpecifier = 10,
+ Class = 11,
+ Template = 12,
+ TypeAliasTemplate = 13,
+ ClassTemplate = 14,
+ ClassTemplateSpecialization = 15,
+ ClassTemplatePartialSpecialization = 16,
+ FunctionTemplate = 17,
+ Namespace = 18,
+ PreprocessedEntity = 19,
+ MacroDefinition = 20,
+ MacroExpansion = 21,
+ TranslationUnit = 22,
+ Friend = 23,
+ TemplateTemplateParm = 24,
+ TemplateTypeParm = 25,
+ NonTypeTemplateParm = 26
}
public enum AccessSpecifier
@@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
}
- public CppSharp.Parser.AST.TypedefDecl Declaration
+ public CppSharp.Parser.AST.TypedefNameDecl Declaration
{
get
{
- CppSharp.Parser.AST.TypedefDecl __result0;
+ CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
- else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
- __result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
- else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
+ else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
+ __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
+ else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0;
}
@@ -4088,7 +4089,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -4130,7 +4131,7 @@ namespace CppSharp
[FieldOffset(160)]
public global::System.IntPtr Comment;
- [FieldOffset(384)]
+ [FieldOffset(408)]
public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity]
@@ -4238,6 +4239,21 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance);
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")]
@@ -4298,6 +4314,11 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")]
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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")]
@@ -4321,7 +4342,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -4345,7 +4366,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(392);
+ __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
@@ -4355,7 +4376,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(392);
+ __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -4517,6 +4538,30 @@ namespace CppSharp
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)
{
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
{
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)]
public new partial struct Internal
@@ -4776,17 +4971,152 @@ namespace CppSharp
if (__ownsNativeInstance)
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
{
- 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
{
- ((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
{
- [StructLayout(LayoutKind.Explicit, Size = 432)]
+ [StructLayout(LayoutKind.Explicit, Size = 456)]
public new partial struct Internal
{
[FieldOffset(0)]
@@ -6547,16 +6877,16 @@ namespace CppSharp
[FieldOffset(160)]
public global::System.IntPtr Comment;
- [FieldOffset(384)]
+ [FieldOffset(408)]
public byte IsAnonymous;
- [FieldOffset(388)]
+ [FieldOffset(412)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
- [FieldOffset(392)]
+ [FieldOffset(416)]
public global::System.IntPtr Type;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity]
@@ -6781,7 +7111,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -6805,7 +7135,7 @@ namespace CppSharp
public Enumeration()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(432);
+ __Instance = Marshal.AllocHGlobal(456);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -6814,7 +7144,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(432);
+ __Instance = Marshal.AllocHGlobal(456);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -7554,7 +7884,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -7596,37 +7926,37 @@ namespace CppSharp
[FieldOffset(160)]
public global::System.IntPtr Comment;
- [FieldOffset(384)]
+ [FieldOffset(408)]
public byte IsAnonymous;
- [FieldOffset(488)]
+ [FieldOffset(512)]
public byte IsPOD;
- [FieldOffset(489)]
+ [FieldOffset(513)]
public byte IsAbstract;
- [FieldOffset(490)]
+ [FieldOffset(514)]
public byte IsUnion;
- [FieldOffset(491)]
+ [FieldOffset(515)]
public byte IsDynamic;
- [FieldOffset(492)]
+ [FieldOffset(516)]
public byte IsPolymorphic;
- [FieldOffset(493)]
+ [FieldOffset(517)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(494)]
+ [FieldOffset(518)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(495)]
+ [FieldOffset(519)]
public byte HasNonTrivialDestructor;
- [FieldOffset(496)]
+ [FieldOffset(520)]
public byte IsExternCContext;
- [FieldOffset(504)]
+ [FieldOffset(528)]
public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity]
@@ -7737,7 +8067,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -7761,7 +8091,7 @@ namespace CppSharp
public Class()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(512);
+ __Instance = Marshal.AllocHGlobal(536);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -7770,7 +8100,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(512);
+ __Instance = Marshal.AllocHGlobal(536);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9277,7 +9607,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9319,43 +9649,43 @@ namespace CppSharp
[FieldOffset(160)]
public global::System.IntPtr Comment;
- [FieldOffset(384)]
+ [FieldOffset(408)]
public byte IsAnonymous;
- [FieldOffset(488)]
+ [FieldOffset(512)]
public byte IsPOD;
- [FieldOffset(489)]
+ [FieldOffset(513)]
public byte IsAbstract;
- [FieldOffset(490)]
+ [FieldOffset(514)]
public byte IsUnion;
- [FieldOffset(491)]
+ [FieldOffset(515)]
public byte IsDynamic;
- [FieldOffset(492)]
+ [FieldOffset(516)]
public byte IsPolymorphic;
- [FieldOffset(493)]
+ [FieldOffset(517)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(494)]
+ [FieldOffset(518)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(495)]
+ [FieldOffset(519)]
public byte HasNonTrivialDestructor;
- [FieldOffset(496)]
+ [FieldOffset(520)]
public byte IsExternCContext;
- [FieldOffset(504)]
+ [FieldOffset(528)]
public global::System.IntPtr Layout;
- [FieldOffset(512)]
+ [FieldOffset(536)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(544)]
+ [FieldOffset(568)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9406,7 +9736,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9430,7 +9760,7 @@ namespace CppSharp
public ClassTemplateSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(552);
+ __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9439,7 +9769,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(552);
+ __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9520,7 +9850,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9562,43 +9892,43 @@ namespace CppSharp
[FieldOffset(160)]
public global::System.IntPtr Comment;
- [FieldOffset(384)]
+ [FieldOffset(408)]
public byte IsAnonymous;
- [FieldOffset(488)]
+ [FieldOffset(512)]
public byte IsPOD;
- [FieldOffset(489)]
+ [FieldOffset(513)]
public byte IsAbstract;
- [FieldOffset(490)]
+ [FieldOffset(514)]
public byte IsUnion;
- [FieldOffset(491)]
+ [FieldOffset(515)]
public byte IsDynamic;
- [FieldOffset(492)]
+ [FieldOffset(516)]
public byte IsPolymorphic;
- [FieldOffset(493)]
+ [FieldOffset(517)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(494)]
+ [FieldOffset(518)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(495)]
+ [FieldOffset(519)]
public byte HasNonTrivialDestructor;
- [FieldOffset(496)]
+ [FieldOffset(520)]
public byte IsExternCContext;
- [FieldOffset(504)]
+ [FieldOffset(528)]
public global::System.IntPtr Layout;
- [FieldOffset(512)]
+ [FieldOffset(536)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(544)]
+ [FieldOffset(568)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9629,7 +9959,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9653,7 +9983,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(552);
+ __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9662,7 +9992,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(552);
+ __Instance = Marshal.AllocHGlobal(576);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10064,7 +10394,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10106,10 +10436,10 @@ namespace CppSharp
[FieldOffset(160)]
public global::System.IntPtr Comment;
- [FieldOffset(384)]
+ [FieldOffset(408)]
public byte IsAnonymous;
- [FieldOffset(385)]
+ [FieldOffset(409)]
public byte IsInline;
[SuppressUnmanagedCodeSecurity]
@@ -10140,7 +10470,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10164,7 +10494,7 @@ namespace CppSharp
public Namespace()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(392);
+ __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10173,7 +10503,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(392);
+ __Instance = Marshal.AllocHGlobal(416);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10685,7 +11015,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10727,13 +11057,13 @@ namespace CppSharp
[FieldOffset(160)]
public global::System.IntPtr Comment;
- [FieldOffset(384)]
+ [FieldOffset(408)]
public byte IsAnonymous;
- [FieldOffset(385)]
+ [FieldOffset(409)]
public byte IsInline;
- [FieldOffset(416)]
+ [FieldOffset(440)]
public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity]
@@ -10794,7 +11124,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10818,7 +11148,7 @@ namespace CppSharp
public TranslationUnit()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(448);
+ __Instance = Marshal.AllocHGlobal(472);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10827,7 +11157,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(448);
+ __Instance = Marshal.AllocHGlobal(472);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
diff --git a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
index 53c3eb0e..4a2e8cde 100644
--- a/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
+++ b/src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
@@ -37,30 +37,31 @@ namespace CppSharp
{
DeclarationContext = 0,
Typedef = 1,
- Parameter = 2,
- Function = 3,
- Method = 4,
- Enumeration = 5,
- EnumerationItem = 6,
- Variable = 7,
- Field = 8,
- AccessSpecifier = 9,
- Class = 10,
- Template = 11,
- TypeAliasTemplate = 12,
- ClassTemplate = 13,
- ClassTemplateSpecialization = 14,
- ClassTemplatePartialSpecialization = 15,
- FunctionTemplate = 16,
- Namespace = 17,
- PreprocessedEntity = 18,
- MacroDefinition = 19,
- MacroExpansion = 20,
- TranslationUnit = 21,
- Friend = 22,
- TemplateTemplateParm = 23,
- TemplateTypeParm = 24,
- NonTypeTemplateParm = 25
+ TypeAlias = 2,
+ Parameter = 3,
+ Function = 4,
+ Method = 5,
+ Enumeration = 6,
+ EnumerationItem = 7,
+ Variable = 8,
+ Field = 9,
+ AccessSpecifier = 10,
+ Class = 11,
+ Template = 12,
+ TypeAliasTemplate = 13,
+ ClassTemplate = 14,
+ ClassTemplateSpecialization = 15,
+ ClassTemplatePartialSpecialization = 16,
+ FunctionTemplate = 17,
+ Namespace = 18,
+ PreprocessedEntity = 19,
+ MacroDefinition = 20,
+ MacroExpansion = 21,
+ TranslationUnit = 22,
+ Friend = 23,
+ TemplateTemplateParm = 24,
+ TemplateTypeParm = 25,
+ NonTypeTemplateParm = 26
}
public enum AccessSpecifier
@@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
}
- public CppSharp.Parser.AST.TypedefDecl Declaration
+ public CppSharp.Parser.AST.TypedefNameDecl Declaration
{
get
{
- CppSharp.Parser.AST.TypedefDecl __result0;
+ CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
- else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
- __result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
- else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
+ else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
+ __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
+ else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0;
}
@@ -4088,7 +4089,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -4130,7 +4131,7 @@ namespace CppSharp
[FieldOffset(112)]
public global::System.IntPtr Comment;
- [FieldOffset(360)]
+ [FieldOffset(384)]
public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity]
@@ -4238,6 +4239,21 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext13clearTypedefsEv")]
internal static extern void clearTypedefs_0(global::System.IntPtr instance);
+ [SuppressUnmanagedCodeSecurity]
+ [DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
+ EntryPoint="_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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext12getVariablesEj")]
@@ -4298,6 +4314,11 @@ namespace CppSharp
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext16getTypedefsCountEv")]
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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST18DeclarationContext17getVariablesCountEv")]
@@ -4321,7 +4342,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -4345,7 +4366,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(368);
+ __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
@@ -4355,7 +4376,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(368);
+ __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -4517,6 +4538,30 @@ namespace CppSharp
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)
{
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
{
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)]
public new partial struct Internal
@@ -4776,17 +4971,152 @@ namespace CppSharp
if (__ownsNativeInstance)
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
{
- 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
{
- ((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
{
- [StructLayout(LayoutKind.Explicit, Size = 408)]
+ [StructLayout(LayoutKind.Explicit, Size = 432)]
public new partial struct Internal
{
[FieldOffset(0)]
@@ -6547,16 +6877,16 @@ namespace CppSharp
[FieldOffset(112)]
public global::System.IntPtr Comment;
- [FieldOffset(360)]
+ [FieldOffset(384)]
public byte IsAnonymous;
- [FieldOffset(364)]
+ [FieldOffset(388)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
- [FieldOffset(368)]
+ [FieldOffset(392)]
public global::System.IntPtr Type;
- [FieldOffset(376)]
+ [FieldOffset(400)]
public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity]
@@ -6781,7 +7111,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -6805,7 +7135,7 @@ namespace CppSharp
public Enumeration()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(408);
+ __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -6814,7 +7144,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(408);
+ __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -7554,7 +7884,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -7596,37 +7926,37 @@ namespace CppSharp
[FieldOffset(112)]
public global::System.IntPtr Comment;
- [FieldOffset(360)]
+ [FieldOffset(384)]
public byte IsAnonymous;
- [FieldOffset(464)]
+ [FieldOffset(488)]
public byte IsPOD;
- [FieldOffset(465)]
+ [FieldOffset(489)]
public byte IsAbstract;
- [FieldOffset(466)]
+ [FieldOffset(490)]
public byte IsUnion;
- [FieldOffset(467)]
+ [FieldOffset(491)]
public byte IsDynamic;
- [FieldOffset(468)]
+ [FieldOffset(492)]
public byte IsPolymorphic;
- [FieldOffset(469)]
+ [FieldOffset(493)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(470)]
+ [FieldOffset(494)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(471)]
+ [FieldOffset(495)]
public byte HasNonTrivialDestructor;
- [FieldOffset(472)]
+ [FieldOffset(496)]
public byte IsExternCContext;
- [FieldOffset(480)]
+ [FieldOffset(504)]
public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity]
@@ -7737,7 +8067,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -7761,7 +8091,7 @@ namespace CppSharp
public Class()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(488);
+ __Instance = Marshal.AllocHGlobal(512);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -7770,7 +8100,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(488);
+ __Instance = Marshal.AllocHGlobal(512);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9277,7 +9607,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9319,43 +9649,43 @@ namespace CppSharp
[FieldOffset(112)]
public global::System.IntPtr Comment;
- [FieldOffset(360)]
+ [FieldOffset(384)]
public byte IsAnonymous;
- [FieldOffset(464)]
+ [FieldOffset(488)]
public byte IsPOD;
- [FieldOffset(465)]
+ [FieldOffset(489)]
public byte IsAbstract;
- [FieldOffset(466)]
+ [FieldOffset(490)]
public byte IsUnion;
- [FieldOffset(467)]
+ [FieldOffset(491)]
public byte IsDynamic;
- [FieldOffset(468)]
+ [FieldOffset(492)]
public byte IsPolymorphic;
- [FieldOffset(469)]
+ [FieldOffset(493)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(470)]
+ [FieldOffset(494)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(471)]
+ [FieldOffset(495)]
public byte HasNonTrivialDestructor;
- [FieldOffset(472)]
+ [FieldOffset(496)]
public byte IsExternCContext;
- [FieldOffset(480)]
+ [FieldOffset(504)]
public global::System.IntPtr Layout;
- [FieldOffset(488)]
+ [FieldOffset(512)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(520)]
+ [FieldOffset(544)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9406,7 +9736,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9430,7 +9760,7 @@ namespace CppSharp
public ClassTemplateSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(528);
+ __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9439,7 +9769,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(528);
+ __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9520,7 +9850,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9562,43 +9892,43 @@ namespace CppSharp
[FieldOffset(112)]
public global::System.IntPtr Comment;
- [FieldOffset(360)]
+ [FieldOffset(384)]
public byte IsAnonymous;
- [FieldOffset(464)]
+ [FieldOffset(488)]
public byte IsPOD;
- [FieldOffset(465)]
+ [FieldOffset(489)]
public byte IsAbstract;
- [FieldOffset(466)]
+ [FieldOffset(490)]
public byte IsUnion;
- [FieldOffset(467)]
+ [FieldOffset(491)]
public byte IsDynamic;
- [FieldOffset(468)]
+ [FieldOffset(492)]
public byte IsPolymorphic;
- [FieldOffset(469)]
+ [FieldOffset(493)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(470)]
+ [FieldOffset(494)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(471)]
+ [FieldOffset(495)]
public byte HasNonTrivialDestructor;
- [FieldOffset(472)]
+ [FieldOffset(496)]
public byte IsExternCContext;
- [FieldOffset(480)]
+ [FieldOffset(504)]
public global::System.IntPtr Layout;
- [FieldOffset(488)]
+ [FieldOffset(512)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(520)]
+ [FieldOffset(544)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9629,7 +9959,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9653,7 +9983,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(528);
+ __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9662,7 +9992,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(528);
+ __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10064,7 +10394,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10106,10 +10436,10 @@ namespace CppSharp
[FieldOffset(112)]
public global::System.IntPtr Comment;
- [FieldOffset(360)]
+ [FieldOffset(384)]
public byte IsAnonymous;
- [FieldOffset(361)]
+ [FieldOffset(385)]
public byte IsInline;
[SuppressUnmanagedCodeSecurity]
@@ -10140,7 +10470,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10164,7 +10494,7 @@ namespace CppSharp
public Namespace()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(368);
+ __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10173,7 +10503,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(368);
+ __Instance = Marshal.AllocHGlobal(392);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10685,7 +11015,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10727,13 +11057,13 @@ namespace CppSharp
[FieldOffset(112)]
public global::System.IntPtr Comment;
- [FieldOffset(360)]
+ [FieldOffset(384)]
public byte IsAnonymous;
- [FieldOffset(361)]
+ [FieldOffset(385)]
public byte IsInline;
- [FieldOffset(376)]
+ [FieldOffset(400)]
public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity]
@@ -10794,7 +11124,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10818,7 +11148,7 @@ namespace CppSharp
public TranslationUnit()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(408);
+ __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10827,7 +11157,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(408);
+ __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
diff --git a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs
index 6876fe28..fd14799d 100644
--- a/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs
+++ b/src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs
@@ -37,30 +37,31 @@ namespace CppSharp
{
DeclarationContext = 0,
Typedef = 1,
- Parameter = 2,
- Function = 3,
- Method = 4,
- Enumeration = 5,
- EnumerationItem = 6,
- Variable = 7,
- Field = 8,
- AccessSpecifier = 9,
- Class = 10,
- Template = 11,
- TypeAliasTemplate = 12,
- ClassTemplate = 13,
- ClassTemplateSpecialization = 14,
- ClassTemplatePartialSpecialization = 15,
- FunctionTemplate = 16,
- Namespace = 17,
- PreprocessedEntity = 18,
- MacroDefinition = 19,
- MacroExpansion = 20,
- TranslationUnit = 21,
- Friend = 22,
- TemplateTemplateParm = 23,
- TemplateTypeParm = 24,
- NonTypeTemplateParm = 25
+ TypeAlias = 2,
+ Parameter = 3,
+ Function = 4,
+ Method = 5,
+ Enumeration = 6,
+ EnumerationItem = 7,
+ Variable = 8,
+ Field = 9,
+ AccessSpecifier = 10,
+ Class = 11,
+ Template = 12,
+ TypeAliasTemplate = 13,
+ ClassTemplate = 14,
+ ClassTemplateSpecialization = 15,
+ ClassTemplatePartialSpecialization = 16,
+ FunctionTemplate = 17,
+ Namespace = 18,
+ PreprocessedEntity = 19,
+ MacroDefinition = 20,
+ MacroExpansion = 21,
+ TranslationUnit = 22,
+ Friend = 23,
+ TemplateTemplateParm = 24,
+ TemplateTypeParm = 25,
+ NonTypeTemplateParm = 26
}
public enum AccessSpecifier
@@ -1332,15 +1333,15 @@ namespace CppSharp
Internal.cctor_2((__Instance + __PointerAdjustment), __arg0);
}
- public CppSharp.Parser.AST.TypedefDecl Declaration
+ public CppSharp.Parser.AST.TypedefNameDecl Declaration
{
get
{
- CppSharp.Parser.AST.TypedefDecl __result0;
+ CppSharp.Parser.AST.TypedefNameDecl __result0;
if (((Internal*) __Instance)->Declaration == IntPtr.Zero) __result0 = null;
- else if (CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
- __result0 = (CppSharp.Parser.AST.TypedefDecl) CppSharp.Parser.AST.TypedefDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
- else __result0 = CppSharp.Parser.AST.TypedefDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
+ else if (CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->Declaration))
+ __result0 = (CppSharp.Parser.AST.TypedefNameDecl) CppSharp.Parser.AST.TypedefNameDecl.NativeToManagedMap[((Internal*) __Instance)->Declaration];
+ else __result0 = CppSharp.Parser.AST.TypedefNameDecl.__CreateInstance(((Internal*) __Instance)->Declaration);
return __result0;
}
@@ -4089,7 +4090,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -4131,7 +4132,7 @@ namespace CppSharp
[FieldOffset(184)]
public global::System.IntPtr Comment;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public byte IsAnonymous;
[SuppressUnmanagedCodeSecurity]
@@ -4239,6 +4240,21 @@ namespace CppSharp
EntryPoint="?clearTypedefs@DeclarationContext@AST@CppParser@CppSharp@@QEAAXXZ")]
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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVariables@DeclarationContext@AST@CppParser@CppSharp@@QEAAPEAVVariable@234@I@Z")]
@@ -4299,6 +4315,11 @@ namespace CppSharp
EntryPoint="?getTypedefsCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
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]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="?getVariablesCount@DeclarationContext@AST@CppParser@CppSharp@@QEAAIXZ")]
@@ -4322,7 +4343,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -4346,7 +4367,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationKind kind)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(408);
+ __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var __arg0 = kind;
@@ -4356,7 +4377,7 @@ namespace CppSharp
public DeclarationContext(CppSharp.Parser.AST.DeclarationContext _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(408);
+ __Instance = Marshal.AllocHGlobal(432);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -4518,6 +4539,30 @@ namespace CppSharp
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)
{
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
{
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)]
public new partial struct Internal
@@ -4777,17 +4972,152 @@ namespace CppSharp
if (__ownsNativeInstance)
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
{
- 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
{
- ((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
{
- [StructLayout(LayoutKind.Explicit, Size = 456)]
+ [StructLayout(LayoutKind.Explicit, Size = 480)]
public new partial struct Internal
{
[FieldOffset(0)]
@@ -6548,16 +6878,16 @@ namespace CppSharp
[FieldOffset(184)]
public global::System.IntPtr Comment;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public byte IsAnonymous;
- [FieldOffset(408)]
+ [FieldOffset(432)]
public CppSharp.Parser.AST.Enumeration.EnumModifiers Modifiers;
- [FieldOffset(416)]
+ [FieldOffset(440)]
public global::System.IntPtr Type;
- [FieldOffset(424)]
+ [FieldOffset(448)]
public global::System.IntPtr BuiltinType;
[SuppressUnmanagedCodeSecurity]
@@ -6782,7 +7112,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -6806,7 +7136,7 @@ namespace CppSharp
public Enumeration()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(456);
+ __Instance = Marshal.AllocHGlobal(480);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -6815,7 +7145,7 @@ namespace CppSharp
public Enumeration(CppSharp.Parser.AST.Enumeration _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(456);
+ __Instance = Marshal.AllocHGlobal(480);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -7555,7 +7885,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -7597,37 +7927,37 @@ namespace CppSharp
[FieldOffset(184)]
public global::System.IntPtr Comment;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public byte IsAnonymous;
- [FieldOffset(504)]
+ [FieldOffset(528)]
public byte IsPOD;
- [FieldOffset(505)]
+ [FieldOffset(529)]
public byte IsAbstract;
- [FieldOffset(506)]
+ [FieldOffset(530)]
public byte IsUnion;
- [FieldOffset(507)]
+ [FieldOffset(531)]
public byte IsDynamic;
- [FieldOffset(508)]
+ [FieldOffset(532)]
public byte IsPolymorphic;
- [FieldOffset(509)]
+ [FieldOffset(533)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(510)]
+ [FieldOffset(534)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(511)]
+ [FieldOffset(535)]
public byte HasNonTrivialDestructor;
- [FieldOffset(512)]
+ [FieldOffset(536)]
public byte IsExternCContext;
- [FieldOffset(520)]
+ [FieldOffset(544)]
public global::System.IntPtr Layout;
[SuppressUnmanagedCodeSecurity]
@@ -7738,7 +8068,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -7762,7 +8092,7 @@ namespace CppSharp
public Class()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(528);
+ __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -7771,7 +8101,7 @@ namespace CppSharp
public Class(CppSharp.Parser.AST.Class _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(528);
+ __Instance = Marshal.AllocHGlobal(552);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9278,7 +9608,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9320,43 +9650,43 @@ namespace CppSharp
[FieldOffset(184)]
public global::System.IntPtr Comment;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public byte IsAnonymous;
- [FieldOffset(504)]
+ [FieldOffset(528)]
public byte IsPOD;
- [FieldOffset(505)]
+ [FieldOffset(529)]
public byte IsAbstract;
- [FieldOffset(506)]
+ [FieldOffset(530)]
public byte IsUnion;
- [FieldOffset(507)]
+ [FieldOffset(531)]
public byte IsDynamic;
- [FieldOffset(508)]
+ [FieldOffset(532)]
public byte IsPolymorphic;
- [FieldOffset(509)]
+ [FieldOffset(533)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(510)]
+ [FieldOffset(534)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(511)]
+ [FieldOffset(535)]
public byte HasNonTrivialDestructor;
- [FieldOffset(512)]
+ [FieldOffset(536)]
public byte IsExternCContext;
- [FieldOffset(520)]
+ [FieldOffset(544)]
public global::System.IntPtr Layout;
- [FieldOffset(528)]
+ [FieldOffset(552)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(560)]
+ [FieldOffset(584)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9407,7 +9737,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9431,7 +9761,7 @@ namespace CppSharp
public ClassTemplateSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(568);
+ __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9440,7 +9770,7 @@ namespace CppSharp
public ClassTemplateSpecialization(CppSharp.Parser.AST.ClassTemplateSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(568);
+ __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -9521,7 +9851,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -9563,43 +9893,43 @@ namespace CppSharp
[FieldOffset(184)]
public global::System.IntPtr Comment;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public byte IsAnonymous;
- [FieldOffset(504)]
+ [FieldOffset(528)]
public byte IsPOD;
- [FieldOffset(505)]
+ [FieldOffset(529)]
public byte IsAbstract;
- [FieldOffset(506)]
+ [FieldOffset(530)]
public byte IsUnion;
- [FieldOffset(507)]
+ [FieldOffset(531)]
public byte IsDynamic;
- [FieldOffset(508)]
+ [FieldOffset(532)]
public byte IsPolymorphic;
- [FieldOffset(509)]
+ [FieldOffset(533)]
public byte HasNonTrivialDefaultConstructor;
- [FieldOffset(510)]
+ [FieldOffset(534)]
public byte HasNonTrivialCopyConstructor;
- [FieldOffset(511)]
+ [FieldOffset(535)]
public byte HasNonTrivialDestructor;
- [FieldOffset(512)]
+ [FieldOffset(536)]
public byte IsExternCContext;
- [FieldOffset(520)]
+ [FieldOffset(544)]
public global::System.IntPtr Layout;
- [FieldOffset(528)]
+ [FieldOffset(552)]
public global::System.IntPtr TemplatedDecl;
- [FieldOffset(560)]
+ [FieldOffset(584)]
public CppSharp.Parser.AST.TemplateSpecializationKind SpecializationKind;
[SuppressUnmanagedCodeSecurity]
@@ -9630,7 +9960,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -9654,7 +9984,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(568);
+ __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -9663,7 +9993,7 @@ namespace CppSharp
public ClassTemplatePartialSpecialization(CppSharp.Parser.AST.ClassTemplatePartialSpecialization _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(568);
+ __Instance = Marshal.AllocHGlobal(592);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10065,7 +10395,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10107,10 +10437,10 @@ namespace CppSharp
[FieldOffset(184)]
public global::System.IntPtr Comment;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public byte IsAnonymous;
- [FieldOffset(408)]
+ [FieldOffset(432)]
public byte IsInline;
[SuppressUnmanagedCodeSecurity]
@@ -10141,7 +10471,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10165,7 +10495,7 @@ namespace CppSharp
public Namespace()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(416);
+ __Instance = Marshal.AllocHGlobal(440);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10174,7 +10504,7 @@ namespace CppSharp
public Namespace(CppSharp.Parser.AST.Namespace _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(416);
+ __Instance = Marshal.AllocHGlobal(440);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@@ -10686,7 +11016,7 @@ namespace CppSharp
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
{
[FieldOffset(0)]
@@ -10728,13 +11058,13 @@ namespace CppSharp
[FieldOffset(184)]
public global::System.IntPtr Comment;
- [FieldOffset(400)]
+ [FieldOffset(424)]
public byte IsAnonymous;
- [FieldOffset(408)]
+ [FieldOffset(432)]
public byte IsInline;
- [FieldOffset(448)]
+ [FieldOffset(472)]
public byte IsSystemHeader;
[SuppressUnmanagedCodeSecurity]
@@ -10795,7 +11125,7 @@ namespace CppSharp
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));
return ret.ToPointer();
}
@@ -10819,7 +11149,7 @@ namespace CppSharp
public TranslationUnit()
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(480);
+ __Instance = Marshal.AllocHGlobal(504);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@@ -10828,7 +11158,7 @@ namespace CppSharp
public TranslationUnit(CppSharp.Parser.AST.TranslationUnit _0)
: this((void*) null)
{
- __Instance = Marshal.AllocHGlobal(480);
+ __Instance = Marshal.AllocHGlobal(504);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp
index 295d2942..b6532f49 100644
--- a/src/CppParser/Parser.cpp
+++ b/src/CppParser/Parser.cpp
@@ -478,7 +478,7 @@ static std::string GetTagDeclName(const clang::TagDecl* D)
{
using namespace clang;
- if (TypedefNameDecl *Typedef = D->getTypedefNameForAnonDecl())
+ if (auto Typedef = D->getTypedefNameForAnonDecl())
{
assert(Typedef->getIdentifier() && "Typedef without identifier?");
return GetDeclName(Typedef);
@@ -1291,14 +1291,11 @@ TypeAliasTemplate* Parser::WalkTypeAliasTemplate(
if (TA != nullptr)
return TA;
- // TODO: Add this when we add TypeAliasDecl to AST.
- //auto TemplatedDecl = TD->getTemplatedDecl();
-
TA = new TypeAliasTemplate();
HandleDeclaration(TD, TA);
TA->Name = GetDeclName(TD);
- //TA->TemplatedDecl = TAD;
+ TA->TemplatedDecl = WalkDeclaration(TD->getTemplatedDecl());
TA->Parameters = WalkTemplateParameterList(TD->getTemplateParameters());
NS->Templates.push_back(TA);
@@ -1941,10 +1938,10 @@ Type* Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL,
case clang::Type::Typedef:
{
auto TT = Type->getAs();
- TypedefNameDecl* TD = TT->getDecl();
+ auto TD = TT->getDecl();
auto TTL = TD->getTypeSourceInfo()->getTypeLoc();
- auto TDD = static_cast(WalkDeclaration(TD,
+ auto TDD = static_cast(WalkDeclaration(TD,
/*IgnoreSystemDecls=*/false));
auto Type = new TypedefType();
@@ -2448,7 +2445,7 @@ static const clang::CodeGen::CGFunctionInfo& GetCodeGenFuntionInfo(
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);
@@ -3231,7 +3228,6 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
break;
}
case Decl::Typedef:
- case Decl::TypeAlias:
{
auto TD = cast(D);
@@ -3249,14 +3245,38 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
Decl = Typedef;
break;
}
+ case Decl::TypeAlias:
+ {
+ auto TD = cast(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:
{
auto ND = cast(D);
- for (auto it = ND->decls_begin(); it != ND->decls_end(); ++it)
+ // HACK: work around https://llvm.org/bugs/show_bug.cgi?id=28397
+ if (D->getKind() != Decl::Kind::TypeAlias)
{
- clang::Decl* D = (*it);
- Decl = WalkDeclarationDef(D);
+ for (auto it = ND->decls_begin(); it != ND->decls_end(); ++it)
+ {
+ clang::Decl* D = (*it);
+ Decl = WalkDeclarationDef(D);
+ }
}
break;
diff --git a/src/CppParser/Parser.h b/src/CppParser/Parser.h
index d0de7ede..a2254387 100644
--- a/src/CppParser/Parser.h
+++ b/src/CppParser/Parser.h
@@ -113,6 +113,7 @@ private:
bool IsValidDeclaration(const clang::SourceLocation& Loc);
std::string GetDeclMangledName(const clang::Decl* D);
std::string GetTypeName(const clang::Type* Type);
+ bool CanCheckCodeGenInfo(clang::Sema & S, const clang::Type * Ty);
void WalkFunction(const clang::FunctionDecl* FD, Function* F,
bool IsDependent = false);
void HandlePreprocessedEntities(Declaration* Decl);
diff --git a/src/Generator.Tests/AST/TestAST.cs b/src/Generator.Tests/AST/TestAST.cs
index b6e5455d..6ac428ce 100644
--- a/src/Generator.Tests/AST/TestAST.cs
+++ b/src/Generator.Tests/AST/TestAST.cs
@@ -106,6 +106,11 @@ namespace CppSharp.Generator.Tests.AST
throw new System.NotImplementedException();
}
+ public bool VisitTypeAliasDecl(TypeAlias typeAlias)
+ {
+ throw new NotImplementedException();
+ }
+
public bool VisitEnumDecl(Enumeration @enum)
{
throw new System.NotImplementedException();
diff --git a/src/Generator/Generators/CLI/CLITypePrinter.cs b/src/Generator/Generators/CLI/CLITypePrinter.cs
index c69019d8..4af2de7e 100644
--- a/src/Generator/Generators/CLI/CLITypePrinter.cs
+++ b/src/Generator/Generators/CLI/CLITypePrinter.cs
@@ -380,6 +380,11 @@ namespace CppSharp.Generators.CLI
return typedef.Name;
}
+ public string VisitTypeAliasDecl(TypeAlias typeAlias)
+ {
+ return typeAlias.Name;
+ }
+
public string VisitEnumDecl(Enumeration @enum)
{
return @enum.Name;
diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs
index d5cf5f50..122f2300 100644
--- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs
+++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs
@@ -614,6 +614,11 @@ namespace CppSharp.Generators.CSharp
return GetNestedQualifiedName(typedef);
}
+ public CSharpTypePrinterResult VisitTypeAliasDecl(TypeAlias typeAlias)
+ {
+ return GetNestedQualifiedName(typeAlias);
+ }
+
public CSharpTypePrinterResult VisitEnumDecl(Enumeration @enum)
{
return GetNestedQualifiedName(@enum);
diff --git a/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs b/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs
index fc661f94..6036e43a 100644
--- a/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs
+++ b/src/Generator/Passes/CheckVirtualOverrideReturnCovariance.cs
@@ -198,6 +198,11 @@ namespace CppSharp.Passes
return false;
}
+ public bool VisitTypeAliasDecl(TypeAlias typeAlias)
+ {
+ return false;
+ }
+
public bool VisitEnumDecl(Enumeration @enum)
{
return false;
diff --git a/src/Generator/Types/CppTypePrinter.cs b/src/Generator/Types/CppTypePrinter.cs
index 4752144c..c50d1158 100644
--- a/src/Generator/Types/CppTypePrinter.cs
+++ b/src/Generator/Types/CppTypePrinter.cs
@@ -296,6 +296,11 @@ namespace CppSharp.Types
return VisitDeclaration(typedef);
}
+ public string VisitTypeAliasDecl(TypeAlias typeAlias)
+ {
+ return VisitDeclaration(typeAlias);
+ }
+
public string VisitEnumDecl(Enumeration @enum)
{
return VisitDeclaration(@enum);
diff --git a/tests/Common/Common.h b/tests/Common/Common.h
index 52b81c6f..6722bd23 100644
--- a/tests/Common/Common.h
+++ b/tests/Common/Common.h
@@ -1137,3 +1137,5 @@ class DLL_API HasAbstractOperator
public:
virtual bool operator==(const HasAbstractOperator& other) = 0;
};
+
+using data_type = typename std::aligned_storage<16, 8>::type;
\ No newline at end of file