From 34eeb8e05221911bed00fad1f2137845dd537d42 Mon Sep 17 00:00:00 2001 From: triton Date: Mon, 4 Feb 2013 23:46:53 +0000 Subject: [PATCH] Renamed Options to DriverOptions. --- src/Generator/Driver.cs | 8 ++++---- src/Generator/Generators/CLI/CLIHeadersTemplate.cs | 2 +- src/Generator/Generators/CLI/CLIHelpers.cs | 4 ++-- src/Generator/Generators/CLI/CLISourcesTemplate.cs | 2 +- src/Generator/Generators/Generator.cs | 6 +++--- src/Generator/Generators/Template.cs | 2 +- src/Generator/Parser.cs | 4 ++-- src/Generator/Program.cs | 4 ++-- src/Generator/Transforms/Transform.cs | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Generator/Driver.cs b/src/Generator/Driver.cs index 0c4ea643..08ebbc9c 100644 --- a/src/Generator/Driver.cs +++ b/src/Generator/Driver.cs @@ -8,13 +8,13 @@ namespace Cxxi { public class Driver { - private readonly Options options; + private readonly DriverOptions options; private readonly ILibrary transform; private readonly IDiagnosticConsumer diagnostics; private readonly TypeMapDatabase typeDatabase; private Library library; - public Driver(Options options, ILibrary transform) + public Driver(DriverOptions options, ILibrary transform) { this.options = options; this.transform = transform; @@ -75,9 +75,9 @@ namespace Cxxi } } - public class Options + public class DriverOptions { - public Options() + public DriverOptions() { Defines = new List(); IncludeDirs = new List(); diff --git a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs index 5449af24..0095a0ff 100644 --- a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs +++ b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs @@ -381,7 +381,7 @@ namespace Cxxi.Generators.CLI public void GenerateDebug(Declaration decl) { - if (Options.OutputDebug && !String.IsNullOrWhiteSpace(decl.DebugText)) + if (DriverOptions.OutputDebug && !String.IsNullOrWhiteSpace(decl.DebugText)) WriteLine("// DEBUG: " + decl.DebugText); } diff --git a/src/Generator/Generators/CLI/CLIHelpers.cs b/src/Generator/Generators/CLI/CLIHelpers.cs index eec7ecd9..a9dd718b 100644 --- a/src/Generator/Generators/CLI/CLIHelpers.cs +++ b/src/Generator/Generators/CLI/CLIHelpers.cs @@ -6,7 +6,7 @@ namespace Cxxi.Generators.CLI { public class CLIGenerator : ILanguageGenerator { - public Options Options { get; set; } + public DriverOptions Options { get; set; } public Library Library { get; set; } public ILibrary Transform { get; set; } public ITypeMapDatabase TypeMapDatabase { get; set; } @@ -26,7 +26,7 @@ namespace Cxxi.Generators.CLI var template = new T { Generator = Generator, - Options = Options, + DriverOptions = Options, Library = Library, Transform = Transform, Module = unit, diff --git a/src/Generator/Generators/CLI/CLISourcesTemplate.cs b/src/Generator/Generators/CLI/CLISourcesTemplate.cs index 08c70fbd..ab9b90d1 100644 --- a/src/Generator/Generators/CLI/CLISourcesTemplate.cs +++ b/src/Generator/Generators/CLI/CLISourcesTemplate.cs @@ -353,7 +353,7 @@ namespace Cxxi.Generators.CLI public void GenerateDebug(Declaration decl) { - if (Options.OutputDebug && !String.IsNullOrWhiteSpace(decl.DebugText)) + if (DriverOptions.OutputDebug && !String.IsNullOrWhiteSpace(decl.DebugText)) WriteLine("// DEBUG: " + decl.DebugText); } diff --git a/src/Generator/Generators/Generator.cs b/src/Generator/Generators/Generator.cs index 5385da07..fb42d04d 100644 --- a/src/Generator/Generators/Generator.cs +++ b/src/Generator/Generators/Generator.cs @@ -12,7 +12,7 @@ namespace Cxxi.Generators public interface ILanguageGenerator { - Options Options { get; set; } + DriverOptions Options { get; set; } Library Library { get; set; } ILibrary Transform { get; set; } ITypeMapDatabase TypeMapDatabase { get; set; } @@ -23,12 +23,12 @@ namespace Cxxi.Generators public partial class Generator { - public Options Options; + public DriverOptions Options; public Library Library; public ILibrary LibraryTransform; public ITypeMapDatabase TypeMapDatabase; - public Generator(Options options, Library library, ILibrary libraryTransform, + public Generator(DriverOptions options, Library library, ILibrary libraryTransform, ITypeMapDatabase typeMapDatabase) { this.Options = options; diff --git a/src/Generator/Generators/Template.cs b/src/Generator/Generators/Template.cs index 93ca8164..8ae9145c 100644 --- a/src/Generator/Generators/Template.cs +++ b/src/Generator/Generators/Template.cs @@ -10,7 +10,7 @@ namespace Cxxi.Generators private const uint MaxIndent = 80; public Generator Generator { get; set; } - public Options Options { get; set; } + public DriverOptions DriverOptions { get; set; } public Library Library { get; set; } public ILibrary Transform; public TranslationUnit Module { get; set; } diff --git a/src/Generator/Parser.cs b/src/Generator/Parser.cs index f8bdae2d..6dbf48ab 100644 --- a/src/Generator/Parser.cs +++ b/src/Generator/Parser.cs @@ -6,9 +6,9 @@ namespace Cxxi public class Parser { public Library Library { get; private set; } - private readonly Options options; + private readonly DriverOptions options; - public Parser(Options options) + public Parser(DriverOptions options) { this.options = options; Library = new Library(options.OutputNamespace, options.LibraryName); diff --git a/src/Generator/Program.cs b/src/Generator/Program.cs index b5fa1da8..4b670b61 100644 --- a/src/Generator/Program.cs +++ b/src/Generator/Program.cs @@ -41,7 +41,7 @@ namespace Cxxi "); } - static bool ParseCommandLineOptions(String[] args, Options options) + static bool ParseCommandLineOptions(String[] args, DriverOptions options) { var set = new OptionSet() { @@ -117,7 +117,7 @@ namespace Cxxi public static void Main(String[] args) { - var options = new Options(); + var options = new DriverOptions(); if (!ParseCommandLineOptions(args, options)) return; diff --git a/src/Generator/Transforms/Transform.cs b/src/Generator/Transforms/Transform.cs index 34a83e93..e591e0e3 100644 --- a/src/Generator/Transforms/Transform.cs +++ b/src/Generator/Transforms/Transform.cs @@ -6,7 +6,7 @@ namespace Cxxi.Passes { public class Transform { - public Options Options; + public DriverOptions Options; public PassBuilder Passes; public void TransformLibrary(Library library)