当前位置: 首页>>代码示例>>C#>>正文


C# TypedefDecl类代码示例

本文整理汇总了C#中TypedefDecl的典型用法代码示例。如果您正苦于以下问题:C# TypedefDecl类的具体用法?C# TypedefDecl怎么用?C# TypedefDecl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TypedefDecl类属于命名空间,在下文中一共展示了TypedefDecl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VisitTypedefDecl

 public override bool VisitTypedefDecl(TypedefDecl typedef)
 {
     Type type = typedef.Type.Desugar();
     List<TypedefDecl> typedefDecls;
     if (TypeDefsPerType.ContainsKey(type))
         typedefDecls = TypeDefsPerType[type];
     else
         TypeDefsPerType.Add(type, typedefDecls = new List<TypedefDecl>());
     if (!typedefDecls.Contains(typedef))
         typedefDecls.Add(typedef);
     return base.VisitTypedefDecl(typedef);
 }
开发者ID:RodolpheFouquet,项目名称:QtSharp,代码行数:12,代码来源:CollectTypeDefsPerTypePass.cs

示例2: VisitTypedefDecl

        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            TypeMap typeMap;
            if (TypeMapDatabase.FindTypeMap(typedef, out typeMap))
            {
                if (typeMap.IsIgnored)
                    Ignore();
                return false;
            }

            return base.VisitTypedefDecl(typedef);
        }
开发者ID:ddobrev,项目名称:CppSharp,代码行数:12,代码来源:Types.cs

示例3: VisitTypedefDecl

        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            var @class = typedef.Namespace.FindClass(typedef.Name);

            // Clang will walk the typedef'd tag decl and the typedef decl,
            // so we ignore the class and process just the typedef.

            if (@class != null)
                typedef.ExplicityIgnored = true;

            if (typedef.Type == null)
                typedef.ExplicityIgnored = true;

            return base.VisitTypedefDecl(typedef);
        }
开发者ID:jijamw,项目名称:CppSharp,代码行数:15,代码来源:CleanInvalidDeclNamesPass.cs

示例4: VisitMethodDecl

        public override bool VisitMethodDecl(Method method)
        {
            if (!base.VisitMethodDecl(method) || !method.IsVirtual || method.Ignore)
                return false;

            var @params = method.GatherInternalParams(Driver.Options.IsItaniumLikeAbi, true).ToList();
            var delegateName = GenerateDelegateSignature(@params, method.ReturnType);

            var @delegate = new TypedefDecl
                {
                    Name = delegateName,
                    QualifiedType = new QualifiedType(
                        new PointerType(
                            new QualifiedType(
                                new FunctionType
                                {
                                    CallingConvention = method.CallingConvention,
                                    IsDependent = method.IsDependent,
                                    Parameters = @params,
                                    ReturnType = method.ReturnType
                                }))),
                    Namespace = namespaceDelegates
                };

            var delegateString = @delegate.Visit(TypePrinter).Type;
            var existingDelegate = GetExistingDelegate(delegateString);
            if (existingDelegate != null)
            {
                Driver.Delegates.Add(method, existingDelegate);
                return true;
            }

            existingDelegate = new DelegateDefinition(Driver.Options.OutputNamespace, delegateString);
            Driver.Delegates.Add(method, existingDelegate);
            foreach (var library in Driver.Options.Libraries)
                libsDelegates[library].Add(delegateString, existingDelegate);

            namespaceDelegates.Declarations.Add(@delegate);

            return true;
        }
开发者ID:daxiazh,项目名称:CppSharp,代码行数:41,代码来源:DelegatesPass.cs

示例5: TypedefDecl

 internal TypedefDecl(TypedefDecl.Internal* native)
     : this(new global::System.IntPtr(native))
 {
 }
开发者ID:kidleon,项目名称:CppSharp,代码行数:4,代码来源:AST.cs

示例6: TypedefDecl

 private TypedefDecl(TypedefDecl.Internal native)
     : this(__CopyValue(native))
 {
     __ownsNativeInstance = true;
 }
开发者ID:KonajuGames,项目名称:CppSharp,代码行数:5,代码来源:AST.cs

示例7: VisitTypedefDecl

        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!base.VisitTypedefDecl(typedef))
                return false;

            if (typedef.TranslationUnit.IsSystemHeader)
                typedef.ExplicitlyIgnore();

            return true;
        }
开发者ID:ddobrev,项目名称:CppSharp,代码行数:10,代码来源:IgnoreSystemDeclarationsPass.cs

示例8: TypedefDecl

 private TypedefDecl(TypedefDecl.Internal native)
     : this(__CopyValue(native))
 {
     __ownsNativeInstance = true;
     NativeToManagedMap[__Instance] = this;
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:6,代码来源:AST.cs

示例9: __CreateInstance

 public static TypedefDecl __CreateInstance(TypedefDecl.Internal native)
 {
     return new TypedefDecl(native);
 }
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:4,代码来源:AST.cs

示例10: TypedefDecl

 private TypedefDecl(TypedefDecl.Internal native, bool skipVTables = false)
     : this(__CopyValue(native), skipVTables)
 {
     __ownsNativeInstance = true;
     NativeToManagedMap[__Instance] = this;
 }
开发者ID:CSRedRat,项目名称:CppSharp,代码行数:6,代码来源:AST.cs

示例11: __CopyValue

 private static void* __CopyValue(TypedefDecl.__Internal native)
 {
     var ret = Marshal.AllocHGlobal(136);
     global::CppSharp.Parser.AST.TypedefDecl.__Internal.cctor_1(ret, new global::System.IntPtr(&native));
     return ret.ToPointer();
 }
开发者ID:ddobrev,项目名称:CppSharp,代码行数:6,代码来源:CppSharp.CppParser.cs

示例12: VisitTypedefDecl

 public override bool VisitTypedefDecl(TypedefDecl typedef)
 {
     throw new NotImplementedException();
 }
开发者ID:corefan,项目名称:CppSharp,代码行数:4,代码来源:CLIMarshal.cs

示例13: AddInternalImplementation

        private Class AddInternalImplementation(Class @class)
        {
            var internalImpl = GetInternalImpl(@class);

            var abstractMethods = GetRelevantAbstractMethods(@class);

            foreach (var abstractMethod in abstractMethods)
            {
                var method = new Method(abstractMethod) { Namespace = internalImpl };
                internalImpl.Methods.Add(method);
                var @delegate = new TypedefDecl
                                {
                                    Name = ASTHelpers.GetDelegateName(abstractMethod),
                                    QualifiedType = abstractMethod.GetFunctionType(),
                                    IgnoreFlags = abstractMethod.IgnoreFlags,
                                    Namespace = internalImpl,
                                    Access = AccessSpecifier.Private
                                };
                internalImpl.Typedefs.Add(@delegate);
            }

            internalImpl.Layout = new ClassLayout(@class.Layout);
            FillVTable(@class, abstractMethods, internalImpl);

            foreach (var method in internalImpl.Methods)
            {
                method.IsPure = false;
                method.IsOverride = true;
                method.IsSynthetized = true;
            }
            return internalImpl;
        }
开发者ID:jijamw,项目名称:CppSharp,代码行数:32,代码来源:GenerateAbstractImplementationsPass.cs

示例14: VisitTypedefDecl

        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!Targets.HasFlag(RenameTargets.Delegate))
                return false;

            return base.VisitTypedefDecl(typedef);
        }
开发者ID:jijamw,项目名称:CppSharp,代码行数:7,代码来源:RenamePass.cs

示例15: VisitTypedefDecl

        public override bool VisitTypedefDecl(TypedefDecl typedef)
        {
            if (!VisitDeclaration(typedef))
                return false;

            string msg;
            if (HasInvalidType(typedef.Type, out msg))
            {
                typedef.ExplicitlyIgnore();
                Log.Debug("Typedef '{0}' was ignored due to {1} type",
                    typedef.Name, msg);
                return false;
            }

            return true;
        }
开发者ID:daxiazh,项目名称:CppSharp,代码行数:16,代码来源:CheckIgnoredDecls.cs


注:本文中的TypedefDecl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。