GtkSharp/generator/ClassGen.cs
Mike Kestner 5b7aaf1c4f 2003-10-03 Mike Kestner <mkestner@ximian.com>
* generator/*.cs : Kill DoGenerate.

svn path=/trunk/gtk-sharp/; revision=18572
2003-10-03 22:20:40 +00:00

49 lines
1 KiB
C#

// GtkSharp.Generation.ObjectGen.cs - The Object Generatable.
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (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 ()
{
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);
}
}
}