public unsafe Type(CppSharp.Parser.AST.Type type) { this.type = type; this.type.AssertNotNull(); }
public static Type GetRealTypeInternal(this CppSharp.Parser.AST.Type astType) { var realType = astType.GetRealType(); switch (astType.Kind) { case CppSharp.Parser.AST.TypeKind.Tag: return(new TagType((CppSharp.Parser.AST.TagType)realType)); case CppSharp.Parser.AST.TypeKind.Array: return(new ArrayType((CppSharp.Parser.AST.ArrayType)realType)); case CppSharp.Parser.AST.TypeKind.Function: return(new FunctionType((CppSharp.Parser.AST.FunctionType)realType)); case CppSharp.Parser.AST.TypeKind.Pointer: return(new PointerType((CppSharp.Parser.AST.PointerType)realType)); case CppSharp.Parser.AST.TypeKind.MemberPointer: return(new MemberPointerType((CppSharp.Parser.AST.MemberPointerType)realType)); case CppSharp.Parser.AST.TypeKind.Typedef: return(new TypedefType((CppSharp.Parser.AST.TypedefType)realType)); case CppSharp.Parser.AST.TypeKind.Attributed: return(new AttributedType((CppSharp.Parser.AST.AttributedType)realType)); case CppSharp.Parser.AST.TypeKind.Decayed: return(new DecayedType((CppSharp.Parser.AST.DecayedType)realType)); case CppSharp.Parser.AST.TypeKind.TemplateSpecialization: return(new TemplateSpecializationType((CppSharp.Parser.AST.TemplateSpecializationType)realType)); case CppSharp.Parser.AST.TypeKind.DependentTemplateSpecialization: return(new DependentTemplateSpecializationType((CppSharp.Parser.AST.DependentTemplateSpecializationType)realType)); case CppSharp.Parser.AST.TypeKind.TemplateParameter: return(new TemplateParameterType((CppSharp.Parser.AST.TemplateParameterType)realType)); case CppSharp.Parser.AST.TypeKind.TemplateParameterSubstitution: return(new TemplateParameterSubstitutionType((CppSharp.Parser.AST.TemplateParameterSubstitutionType)realType)); case CppSharp.Parser.AST.TypeKind.InjectedClassName: return(new InjectedClassNameType((CppSharp.Parser.AST.InjectedClassNameType)realType)); case CppSharp.Parser.AST.TypeKind.DependentName: return(new DependentNameType((CppSharp.Parser.AST.DependentNameType)realType)); case CppSharp.Parser.AST.TypeKind.PackExpansion: return(new PackExpansionType((CppSharp.Parser.AST.PackExpansionType)realType)); case CppSharp.Parser.AST.TypeKind.Builtin: return(new BuiltinType((CppSharp.Parser.AST.BuiltinType)realType)); case CppSharp.Parser.AST.TypeKind.UnaryTransform: return(new UnaryTransformType((CppSharp.Parser.AST.UnaryTransformType)realType)); case CppSharp.Parser.AST.TypeKind.Vector: return(new VectorType((CppSharp.Parser.AST.VectorType)realType)); default: Debugger.Break(); return(null); } }