mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 16:45:35 +00:00
49 lines
1 KiB
C#
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);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|