// GtkSharp.Generation.ObjectGen.cs - The Object Generatable. // // Author: Mike Kestner // // (c) 2001-2003 Mike Kestner namespace GtkSharp.Generation { using System; using System.Collections; using System.IO; using System.Text; using System.Xml; public class ClassGen : ClassBase, IGeneratable { private ArrayList strings = new ArrayList(); private static Hashtable namespaces = new Hashtable (); public ClassGen (XmlElement ns, XmlElement elem) : base (ns, elem) {} public void Generate () { if (!DoGenerate) return; StreamWriter sw = CreateWriter (); sw.WriteLine ("\tusing System.Runtime.InteropServices;"); sw.WriteLine (); SymbolTable table = SymbolTable.Table; sw.WriteLine ("#region Autogenerated code"); sw.Write ("\tpublic class " + Name); sw.WriteLine (" {"); sw.WriteLine (); GenProperties (sw); GenMethods (sw, null, null, false); sw.WriteLine ("#endregion"); AppendCustom(sw); sw.WriteLine ("\t}"); CloseWriter (sw); } } }