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


C# ASTContext.IgnoreFunctionWithName方法代码示例

本文整理汇总了C#中ASTContext.IgnoreFunctionWithName方法的典型用法代码示例。如果您正苦于以下问题:C# ASTContext.IgnoreFunctionWithName方法的具体用法?C# ASTContext.IgnoreFunctionWithName怎么用?C# ASTContext.IgnoreFunctionWithName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ASTContext的用法示例。


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

示例1: Preprocess

        public void Preprocess(Driver driver, ASTContext ctx)
        {
            ctx.IgnoreEnumWithMatchingItem("SDL_FALSE");
            ctx.IgnoreEnumWithMatchingItem("DUMMY_ENUM_VALUE");

            ctx.SetNameOfEnumWithMatchingItem("SDL_SCANCODE_UNKNOWN", "ScanCode");
            ctx.SetNameOfEnumWithMatchingItem("SDLK_UNKNOWN", "Key");
            ctx.SetNameOfEnumWithMatchingItem("KMOD_NONE", "KeyModifier");
            ctx.SetNameOfEnumWithMatchingItem("SDL_LOG_CATEGORY_CUSTOM", "LogCategory");

            ctx.GenerateEnumFromMacros("InitFlags", "SDL_INIT_(.*)").SetFlags();
            ctx.GenerateEnumFromMacros("Endianness", "SDL_(.*)_ENDIAN");
            ctx.GenerateEnumFromMacros("InputState", "SDL_RELEASED", "SDL_PRESSED");
            ctx.GenerateEnumFromMacros("AlphaState", "SDL_ALPHA_(.*)");
            ctx.GenerateEnumFromMacros("HatState", "SDL_HAT_(.*)");

            ctx.IgnoreHeadersWithName("SDL_atomic*");
            ctx.IgnoreHeadersWithName("SDL_endian*");
            ctx.IgnoreHeadersWithName("SDL_main*");
            ctx.IgnoreHeadersWithName("SDL_mutex*");
            ctx.IgnoreHeadersWithName("SDL_stdinc*");
            ctx.IgnoreHeadersWithName("SDL_error");

            ctx.IgnoreEnumWithMatchingItem("SDL_ENOMEM");
            ctx.IgnoreFunctionWithName("SDL_Error");
        }
开发者ID:tritao,项目名称:CppSharp,代码行数:26,代码来源:SDL.cs

示例2: Preprocess

        public void Preprocess(Driver driver, ASTContext ctx)
        {
            ctx.IgnoreHeadersWithName("API.h");
            ctx.IgnoreHeadersWithName("Concurrency.h");
            ctx.IgnoreHeadersWithName("ConcurrentQueue.h");
            ctx.IgnoreHeadersWithName("Delegate.h");
            ctx.IgnoreHeadersWithName("Event.h");
            ctx.IgnoreHeadersWithName("Handle.h");
            ctx.IgnoreHeadersWithName("Object.h");
            ctx.IgnoreHeadersWithName("Pointers.h");
            ctx.IgnoreHeadersWithName("References.h");
            ctx.IgnoreHeadersWithName("Reflection.h");
            ctx.IgnoreHeadersWithName("ReflectionHelpers.h");
            ctx.IgnoreHeadersWithName("Task.h");
            ctx.IgnoreHeadersWithName("Timer.h");
            ctx.IgnoreHeadersWithName("Swap.h");

            //Core
            ctx.IgnoreClassWithName("Object");
            ctx.IgnoreClassWithName("Class");
            ctx.IgnoreClassWithName("ReferenceCounted");
            ctx.IgnoreClassWithName("HandleManager");

            ctx.IgnoreClassWithName("Delegate0");
            ctx.IgnoreClassWithName("Delegate1");
            ctx.IgnoreClassWithName("Delegate2");

            ctx.IgnoreClassWithName("TaskPool");
            ctx.IgnoreClassWithName("ConcurrentQueue");

            ctx.SetClassAsValueType("StringHash");
            ctx.IgnoreClassWithName("RawStringCompare");

            ctx.SetClassAsValueType("LogEntry");
            ctx.IgnoreFunctionWithName("LogCreate");

            ctx.IgnoreFunctionWithName("AllocatorAllocate");
            ctx.IgnoreFunctionWithName("AllocatorDeallocate");
            ctx.SetNameOfFunction("AllocatorReset", "AllocatorResetMemory");

            ctx.IgnoreClassWithName("StreamFuncs");
            ctx.IgnoreClassWithName("FileStream");
            ctx.SetClassAsValueType("FileWatchEvent");

            ctx.IgnoreFunctionWithPattern(".+GetType");
            ctx.IgnoreFunctionWithName("ClassGetIdMap");

            ctx.IgnoreFunctionWithName("ReflectionSetHandleContext");
            ctx.IgnoreFunctionWithName("SerializerCreateJSON");
            ctx.IgnoreFunctionWithName("SerializerCreateBinary");
            ctx.IgnoreClassWithName("ReflectionContext");
            ctx.IgnoreClassWithName("ValueContext");

            ctx.SetClassAsValueType("ExtensionMetadata");

            ctx.IgnoreClassWithName("MemoryStream");
            ctx.IgnoreClassWithName("Serializer");
            ctx.IgnoreClassWithName("Thread");

            // Math
            ctx.SetClassAsValueType("ColorP");
            ctx.SetClassAsValueType("Color");
            ctx.SetClassAsValueType("Vector2P");
            ctx.SetClassAsValueType("Vector2");
            ctx.SetClassAsValueType("Vector2i");
            ctx.SetClassAsValueType("Vector3P");
            ctx.SetClassAsValueType("Vector3");
            ctx.SetClassAsValueType("Vector4");
            ctx.SetClassAsValueType("EulerAngles");
            ctx.SetClassAsValueType("QuaternionP");
            ctx.SetClassAsValueType("Quaternion");
            ctx.SetClassAsValueType("Matrix4x3");
            ctx.SetClassAsValueType("Matrix4x4");

            ctx.CopyClassFields("ColorP", "Color");
            ctx.CopyClassFields("Vector2P", "Vector2");
            ctx.CopyClassFields("Vector3P", "Vector3");
            ctx.CopyClassFields("QuaternionP", "Quaternion");

            ctx.IgnoreClassWithName("ColorP");
            ctx.IgnoreClassWithName("Vector2P");
            ctx.IgnoreClassWithName("Vector3P");
            ctx.IgnoreClassWithName("QuaternionP");

            ctx.SetNameOfClassMethod("Matrix4x3", "identity", "setIdentity");
            ctx.SetNameOfClassMethod("Matrix4x4", "identity", "setIdentity");
            ctx.SetNameOfClassMethod("Quaternion", "identity", "setIdentity");
            ctx.SetNameOfClassMethod("Vector2", "zero", "setZero");
            ctx.SetNameOfClassMethod("Vector3", "zero", "setZero");
            ctx.SetNameOfClassMethod("Vector4", "zero", "setZero");

            // Resources
            ctx.IgnoreFunctionWithName("ResourcesInitialize");
            ctx.IgnoreFunctionWithName("ResourcesDeinitialize");
            //lib.SetClassAsValueType("ResourceEvent");
            ctx.SetClassAsValueType("ResourceLoadOption");
            ctx.SetClassAsValueType("ResourceLoadOptions");
            ctx.SetNameOfClassMethod("Texture", "allocate", "alloc");
            ctx.ExcludeFromPass("ResourceHandleCreate", typeof (FunctionToInstanceMethodPass));

//.........这里部分代码省略.........
开发者ID:FloodProject,项目名称:flood,代码行数:101,代码来源:Flood.cs


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