Exemplo n.º 1
0
 public override TypePrinterResult VisitInjectedClassNameType(
     InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(injected.InjectedSpecializationType.Type != null?
            injected.InjectedSpecializationType.Visit(this) :
                injected.Class.Visit(this));
 }
Exemplo n.º 2
0
        public override AST.Type VisitInjectedClassName(InjectedClassNameType type)
        {
            var _type = new CppSharp.AST.InjectedClassNameType();

            _type.TemplateSpecialization = Visit(type.TemplateSpecialization)
                                           as AST.TemplateSpecializationType;
            _type.Class = declConverter.Visit(type.Class) as AST.Class;
            VisitType(type, _type);
            return(_type);
        }
Exemplo n.º 3
0
        public virtual bool VisitInjectedClassNameType(InjectedClassNameType injected,
                                                       TypeQualifiers quals)
        {
            if (!VisitType(injected, quals))
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 4
0
 protected InjectedClassNameType(InjectedClassNameType.Internal* native, bool skipVTables = false)
     : base((CppSharp.Parser.AST.Type.Internal*) null)
 {
     __PointerAdjustment = 0;
     if (native == null)
         return;
     __Instance = new global::System.IntPtr(native);
 }
Exemplo n.º 5
0
 public override TypePrinterResult VisitInjectedClassNameType(
     InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(string.Empty);
 }
Exemplo n.º 6
0
 public static InjectedClassNameType __CreateInstance(InjectedClassNameType.Internal native, bool skipVTables = false)
 {
     return new InjectedClassNameType(native, skipVTables);
 }
Exemplo n.º 7
0
 private InjectedClassNameType(InjectedClassNameType.Internal native, bool skipVTables = false)
     : this(__CopyValue(native), skipVTables)
 {
     __ownsNativeInstance = true;
     NativeToManagedMap[__Instance] = this;
 }
Exemplo n.º 8
0
 public string VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 9
0
 public string VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(string.Empty);
 }
Exemplo n.º 10
0
 public static InjectedClassNameType __CreateInstance(InjectedClassNameType.Internal native)
 {
     return new InjectedClassNameType(native);
 }
Exemplo n.º 11
0
 internal InjectedClassNameType(InjectedClassNameType.Internal native)
     : this(__CopyValue(native))
 {
 }
Exemplo n.º 12
0
 public abstract TRet VisitInjectedClassName(InjectedClassNameType type);
Exemplo n.º 13
0
        public TRet Visit(Parser.AST.Type type)
        {
            if (type.__Instance == IntPtr.Zero)
            {
                return(default(TRet));
            }

            switch (type.Kind)
            {
            case TypeKind.Tag:
            {
                var _type = new TagType(type.__Instance);
                return(VisitTag(_type));
            }

            case TypeKind.Array:
            {
                var _type = new ArrayType(type.__Instance);
                return(VisitArray(_type));
            }

            case TypeKind.Function:
            {
                var _type = new FunctionType(type.__Instance);
                return(VisitFunction(_type));
            }

            case TypeKind.Pointer:
            {
                var _type = new PointerType(type.__Instance);
                return(VisitPointer(_type));
            }

            case TypeKind.MemberPointer:
            {
                var _type = new MemberPointerType(type.__Instance);
                return(VisitMemberPointer(_type));
            }

            case TypeKind.Typedef:
            {
                var _type = new TypedefType(type.__Instance);
                return(VisitTypedef(_type));
            }

            case TypeKind.Attributed:
            {
                var _type = new AttributedType(type.__Instance);
                return(VisitAttributed(_type));
            }

            case TypeKind.Decayed:
            {
                var _type = new DecayedType(type.__Instance);
                return(VisitDecayed(_type));
            }

            case TypeKind.TemplateSpecialization:
            {
                var _type = new TemplateSpecializationType(type.__Instance);
                return(VisitTemplateSpecialization(_type));
            }

            case TypeKind.TemplateParameter:
            {
                var _type = new TemplateParameterType(type.__Instance);
                return(VisitTemplateParameter(_type));
            }

            case TypeKind.TemplateParameterSubstitution:
            {
                var _type = new TemplateParameterSubstitutionType(type.__Instance);
                return(VisitTemplateParameterSubstitution(_type));
            }

            case TypeKind.InjectedClassName:
            {
                var _type = new InjectedClassNameType(type.__Instance);
                return(VisitInjectedClassName(_type));
            }

            case TypeKind.DependentName:
            {
                var _type = new DependentNameType(type.__Instance);
                return(VisitDependentName(_type));
            }

            case TypeKind.Builtin:
            {
                var _type = new BuiltinType(type.__Instance);
                return(VisitBuiltin(_type));
            }
            }

            throw new ArgumentOutOfRangeException();
        }
Exemplo n.º 14
0
 internal InjectedClassNameType(InjectedClassNameType.Internal native)
     : this(&native)
 {
 }
Exemplo n.º 15
0
 internal InjectedClassNameType(InjectedClassNameType.Internal* native)
     : this(new global::System.IntPtr(native))
 {
 }
Exemplo n.º 16
0
 private InjectedClassNameType(InjectedClassNameType.Internal native)
     : this(__CopyValue(native))
 {
     __ownsNativeInstance = true;
 }
 public bool VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(false);
 }
Exemplo n.º 18
0
 private InjectedClassNameType(InjectedClassNameType.Internal native)
     : this(__CopyValue(native))
 {
     __ownsNativeInstance = true;
     NativeToManagedMap[__Instance] = this;
 }
Exemplo n.º 19
0
 public CSharpTypePrinterResult VisitInjectedClassNameType(
     InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(injected.Class.Name);
 }
Exemplo n.º 20
0
 public virtual TypePrinterResult VisitInjectedClassNameType(
     InjectedClassNameType injected, TypeQualifiers quals)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 21
0
 private static InjectedClassNameType.Internal* __CopyValue(InjectedClassNameType.Internal native)
 {
     var ret = Marshal.AllocHGlobal(24);
     CppSharp.Parser.AST.InjectedClassNameType.Internal.cctor_2(ret, new global::System.IntPtr(&native));
     return (InjectedClassNameType.Internal*) ret;
 }
Exemplo n.º 22
0
 public override TypePrinterResult VisitInjectedClassNameType(
     InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(injected.Class.Visit(this));
 }
Exemplo n.º 23
0
 protected InjectedClassNameType(InjectedClassNameType.Internal* native, bool isInternalImpl = false)
     : base((CppSharp.Parser.AST.Type.Internal*) native)
 {
 }
Exemplo n.º 24
0
 private static void* __CopyValue(InjectedClassNameType.__Internal native)
 {
     var ret = Marshal.AllocHGlobal(20);
     global::CppSharp.Parser.AST.InjectedClassNameType.__Internal.cctor_2(ret, new global::System.IntPtr(&native));
     return ret.ToPointer();
 }
Exemplo n.º 25
0
 public string VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(injected.Class.Visit(this));
 }
Exemplo n.º 26
0
 public override bool VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals)
 {
     return(base.VisitInjectedClassNameType(injected, quals));
 }