From a14b9f281fb18b74fbc25166e86f284d253d9579 Mon Sep 17 00:00:00 2001 From: triton Date: Sat, 2 Feb 2013 23:20:42 +0000 Subject: [PATCH] Initialize the library in the constructor. --- src/Generator/Driver.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Generator/Driver.cs b/src/Generator/Driver.cs index f1e6c219..9e1a4429 100644 --- a/src/Generator/Driver.cs +++ b/src/Generator/Driver.cs @@ -9,23 +9,22 @@ using System.IO; namespace Cxxi { - public class CodeGenerator + public class Driver { private readonly Options options; - private Library library; + private readonly Library library; private readonly ILibrary transform; public TypeDatabase typeDatabase; - public CodeGenerator(Options options, ILibrary transform) + public Driver(Options options, ILibrary transform) { this.options = options; this.transform = transform; + this.library = new Library(options.OutputNamespace, options.LibraryName); } public void ParseCode() { - library = new Library(options.OutputNamespace, options.LibraryName); - Console.WriteLine("Parsing code..."); var headers = new List();