public Driver(Project project, Options options) { Project = project; Options = options; Options.GenerateSupportFiles = Options.GeneratorKind == GeneratorKind.C || Options.GeneratorKind == GeneratorKind.CPlusPlus || Options.GeneratorKind == GeneratorKind.ObjectiveC; Assemblies = new List <IKVM.Reflection.Assembly>(); Context = new BindingContext(options); Context.ASTContext = new ASTContext(); if (Options.Verbose) { Diagnostics.Level = DiagnosticKind.Debug; } if (!Options.Compilation.Platform.HasValue) { Options.Compilation.Platform = Platform.Host; } Declaration.QualifiedNameSeparator = "_"; }
public Driver(Options options, IDiagnostics diagnostics = null) { Options = options; Diagnostics = diagnostics; if (Diagnostics == null) { Diagnostics = new TextDiagnosticPrinter(); } if (Options.OutputDir == null) { Options.OutputDir = Directory.GetCurrentDirectory(); } Assemblies = new List <IKVM.Reflection.Assembly>(); Context = new BindingContext(Diagnostics, new DriverOptions()); Context.ASTContext = new ASTContext(); Declaration.QualifiedNameSeparator = "_"; CppSharp.AST.Type.TypePrinterDelegate = type => { var typePrinter = new CppTypePrinter(); return(type.Visit(typePrinter)); }; }
public void Setup() { ValidateOptions(); ParserOptions.SetupIncludes(); Context = new BindingContext(Diagnostics, Options, ParserOptions); Generator = CreateGeneratorFromKind(Options.GeneratorKind); }
public Driver(Project project, Options options) { Project = project; Options = options; Assemblies = new List <IKVM.Reflection.Assembly>(); Context = new BindingContext(options); Context.ASTContext = new ASTContext(); if (Options.Verbose) { Diagnostics.Level = DiagnosticKind.Debug; } Declaration.QualifiedNameSeparator = "_"; SetupTypePrinter(); }
public Driver(Project project, Options options) { Project = project; Options = options; Options.MainModule.LibraryName = null; Options.GenerateSupportFiles = Options.GeneratorKind == GeneratorKind.C || Options.GeneratorKind == GeneratorKind.CPlusPlus || Options.GeneratorKind == GeneratorKind.ObjectiveC; Assemblies = new List <IKVM.Reflection.Assembly>(); Context = new BindingContext(options); Context.ASTContext = new ASTContext(); if (Options.Verbose) { Diagnostics.Level = DiagnosticKind.Debug; } Declaration.QualifiedNameSeparator = "_"; }
protected Generator(BindingContext context) { Context = context; CppSharp.AST.Type.TypePrinterDelegate += TypePrinterDelegate; }
protected Template(BindingContext context, IEnumerable<TranslationUnit> units) { Context = context; TranslationUnits = new List<TranslationUnit>(units); RootBlock = new Block(); ActiveBlock = RootBlock; }
protected CodeGenerator(BindingContext context, IEnumerable <TranslationUnit> units) { Context = context; TranslationUnits = new List <TranslationUnit>(units); }
protected CodeGenerator(BindingContext context, TranslationUnit unit) : this(context, new List <TranslationUnit> { unit }) { }
protected CodeGenerator(BindingContext context) { Context = context; }