Beispiel #1
0
 public override void Preprocess(Driver driver, ASTContext ctx)
 {
     driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
     driver.AddTranslationUnitPass(new CheckMacroPass());
     ctx.SetClassAsValueType("Bar");
     ctx.SetClassAsValueType("Bar2");
 }
Beispiel #2
0
 /// <summary>
 /// Setup passes. Second method called.
 /// </summary>
 /// <param name="driver"></param>
 public void SetupPasses(Driver driver)
 {
     driver.AddTranslationUnitPass(new PassObjectNamesFix());
     driver.AddTranslationUnitPass(new PassCommentsFix());
     driver.Context.TranslationUnitPasses.AddPass(new FunctionToInstanceMethodPass());
     driver.Context.TranslationUnitPasses.AddPass(new MarshalPrimitivePointersAsRefTypePass());
 }
Beispiel #3
0
 public override void Preprocess(Driver driver, ASTContext ctx)
 {
     driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
     driver.AddTranslationUnitPass(new CheckMacroPass());
     ctx.SetClassAsValueType("Bar");
     ctx.SetClassAsValueType("Bar2");
 }
Beispiel #4
0
 /// <summary>
 /// Setup passes. Second method called.
 /// </summary>
 /// <param name="driver"></param>
 public void SetupPasses(Driver driver)
 {
     driver.AddTranslationUnitPass(new FixOutParamsPass());
     driver.AddTranslationUnitPass(m_xmlExportPass);
     driver.AddTranslationUnitPass(new FixObjectNamesPass());
     driver.AddTranslationUnitPass(new FixCommentsPass());
 }
Beispiel #5
0
        public void SetupPasses(Driver driver)
        {
            driver.AddTranslationUnitPass(new ReplaceStringsWithSbytesPass());
            driver.AddTranslationUnitPass(new FixFunctionOutParametersPass());
            driver.AddTranslationUnitPass(new FixSvnBooleanPointersPass());

            driver.AddTranslationUnitPass(new IgnoreUnneededAprDeclarationsPass());
            driver.AddTranslationUnitPass(new IgnoreUnneededSvnDeclarationsPass());
        }
Beispiel #6
0
        public override void Preprocess(Driver driver, ASTContext ctx)
        {
            driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
            driver.AddTranslationUnitPass(new CheckMacroPass());
            ctx.SetClassAsValueType("Bar");
            ctx.SetClassAsValueType("Bar2");
            ctx.IgnoreClassWithName("IgnoredType");

            ctx.FindCompleteClass("Foo").Enums.First(
                e => string.IsNullOrEmpty(e.Name)).Name = "RenamedEmptyEnum";
        }
Beispiel #7
0
        public override void Preprocess(Driver driver, ASTContext ctx)
        {
            driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
            driver.AddTranslationUnitPass(new CheckMacroPass());
            ctx.SetClassAsValueType("Bar");
            ctx.SetClassAsValueType("Bar2");
            ctx.IgnoreClassWithName("IgnoredType");

            ctx.FindCompleteClass("Foo").Enums.First(
                e => string.IsNullOrEmpty(e.Name)).Name = "RenamedEmptyEnum";
        }
Beispiel #8
0
        public override void SetupPasses(Driver driver)
        {
            base.SetupPasses(driver);
            if (WithoutCommon)
            {
                driver.AddTranslationUnitPass(new CUDA_IgnoreCommonClassesPass(this, driver.Generator));
            }

            if (cuBlas)
            {
                driver.AddTranslationUnitPass(new CUDA_RemoveCuBlasFunctionPrefixPass(this, driver.Generator));
            }
        }
Beispiel #9
0
 public override void SetupPasses(Driver driver)
 {
     base.SetupPasses(driver);
     driver.AddTranslationUnitPass(new MKL_IgnoreFortranAndUpperCaseDeclsPass(this, driver.Generator));
     if (WithoutCommon)
     {
         driver.AddTranslationUnitPass(new MKL_IgnoreCommonDeclsPass(this, driver.Generator));
     }
     if (CBlas)
     {
         driver.AddTranslationUnitPass(new MKL_RemoveCBlasFunctionPrefixPass(this, driver.Generator));
     }
 }
Beispiel #10
0
 public override void Preprocess(Driver driver, ASTContext ctx)
 {
     driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
     ctx.SetClassAsValueType("Bar");
     ctx.SetClassAsValueType("Bar2");
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOut", 1, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOutRef", 1, ParameterUsage.Out);
 }
Beispiel #11
0
        public override bool SetupPasses()
        {
            // Both the CheckOperatorsOverloadsPass and CheckAbiParameters can
            // create and and new parameters to functions and methods. Make sure
            // CheckAbiParameters runs last because hidden structure parameters
            // should always occur first.

            Driver.AddTranslationUnitPass(new CheckAbiParameters());

            return(true);
        }
Beispiel #12
0
 public override void Preprocess(Driver driver, ASTContext ctx)
 {
     driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
     ctx.SetClassAsValueType("Bar");
     ctx.SetClassAsValueType("Bar2");
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOut", 1, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOutRef", 1, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveInOut", 1, ParameterUsage.InOut);
     ctx.SetMethodParameterUsage("Hello", "TestPrimitiveInOutRef", 1, ParameterUsage.InOut);
     ctx.SetMethodParameterUsage("Hello", "EnumOut", 2, ParameterUsage.Out);
     ctx.SetMethodParameterUsage("Hello", "EnumOutRef", 2, ParameterUsage.Out);
 }
Beispiel #13
0
        public void SetupPasses(Driver driver)
        {
            const RenameTargets renameTargets = RenameTargets.Function
                                                | RenameTargets.Method
                                                | RenameTargets.Field;

            driver.AddTranslationUnitPass(new CaseRenamePass(renameTargets, RenameCasePattern.UpperCamelCase));
            driver.AddTranslationUnitPass(new CheckMacroPass());
            driver.AddTranslationUnitPass(new FindEventsPass(driver.TypeDatabase));
            driver.AddTranslationUnitPass(new GetterSetterToPropertyPass());
            driver.AddTranslationUnitPass(new FieldToPropertyPass());
            if (driver.Options.GeneratorKind == LanguageGeneratorKind.CPlusPlusCLI)
            {
                driver.AddTranslationUnitPass(new ObjectOverridesPass());
            }
            driver.AddTranslationUnitPass(new FunctionToInstanceMethodPass());
            driver.AddTranslationUnitPass(new FunctionToStaticMethodPass());

            driver.AddGeneratorOutputPass(new FLDObjectOverridesPass());
        }
Beispiel #14
0
 public void SetupPasses(Driver driver)
 {
     driver.AddTranslationUnitPass(new RemoveFunctionPrefixPass());
 }
Beispiel #15
0
 /// Setup your passes here.
 public override void SetupPasses(Driver driver)
 {
     driver.AddTranslationUnitPass(new GetAllClassDeclsPass(this, driver.Generator));
     driver.AddTranslationUnitPass(new ConvertFunctionParameterDeclsPass(this, driver.Generator));
 }
Beispiel #16
0
 public override void SetupPasses(Driver driver)
 {
     driver.AddTranslationUnitPass(new CompleteIgnoredClassTemplateForEmployeeTypedefPass());
 }
Beispiel #17
0
 public void SetupPasses(Driver driver)
 {
     //driver.AddTranslationUnitPass(new FieldToPropertyPass());
     // driver.AddTranslationUnitPass(new CharArrayTypeRenamePass());
     driver.AddTranslationUnitPass(new MyPass());
 }
Beispiel #18
0
 public void SetupPasses(Driver driver)
 {
     driver.AddTranslationUnitPass(new FixCommentsPass());
 }
 public void SetupPasses(Driver driver)
 {
     driver.AddTranslationUnitPass(new IncludeOnlyExportsPass("EXPORT"));
 }