GtkSharp/generator/CodeGenerator.cs
Mike Kestner 66c0ec1d43 2002-08-07 Mike Kestner <mkestner@speakeasy.net>
* generator/CodeGenerator.cs : call ObjectGen.GenerateMapper
	* generator/Method.cs : Remove the if null workaround
	* generator/ObjectGen.cs : build a hash of object types.
	(GenerateMapper): generate the GtkSharp.ObjectManager class.
	* glib/Object.cs : use ObjectManager.CreateObject.
	* glue/type.c : helper for typename lookup.

svn path=/trunk/gtk-sharp/; revision=6526
2002-08-08 04:48:41 +00:00

37 lines
748 B
C#

// GtkSharp.Generation.CodeGenerator.cs - The main code generation engine.
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2001 Mike Kestner
namespace GtkSharp.Generation {
using System;
using System.Collections;
using System.Xml;
public class CodeGenerator {
public static int Main (string[] args)
{
if (args.Length != 1) {
Console.WriteLine ("Usage: codegen <filename>");
return 0;
}
Parser p = new Parser (args[0]);
p.Parse ();
Console.WriteLine (SymbolTable.Count + " types parsed.");
foreach (IGeneratable gen in SymbolTable.Generatables) {
gen.Generate ();
}
ObjectGen.GenerateMapper ();
Statistics.Report();
return 0;
}
}
}