2003-10-04 Mike Kestner <mkestner@ximian.com>

* generator/CallbackGen.cs : remove CloseWriter call.
	* generator/GenBase.cs : kill CreateWriter and CloseWriter.

svn path=/trunk/gtk-sharp/; revision=18616
This commit is contained in:
Mike Kestner 2003-10-05 00:37:24 +00:00
parent 460b3e5623
commit be9946dca2
3 changed files with 7 additions and 36 deletions

View file

@ -1,3 +1,8 @@
2003-10-04 Mike Kestner <mkestner@ximian.com>
* generator/CallbackGen.cs : remove CloseWriter call.
* generator/GenBase.cs : kill CreateWriter and CloseWriter.
2003-10-04 Mike Kestner <mkestner@ximian.com>
* generator/AliasGen.cs : stub new Generate overload.

View file

@ -170,11 +170,10 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\t\t\tNativeDelegate = new {0} (NativeCallback);", wrapper);
sw.WriteLine ("\t\t\t_managed = managed;");
sw.WriteLine ("\t\t}");
sw.WriteLine ("\t}");
sw.WriteLine ("#endregion");
CloseWriter (sw);
sw.WriteLine ("}");
sw.Close ();
return ns + "Sharp." + Name + "Wrapper";
}

View file

@ -63,39 +63,6 @@ namespace GtkSharp.Generation {
}
}
protected StreamWriter CreateWriter ()
{
char sep = Path.DirectorySeparatorChar;
string dir = ".." + sep + NS.ToLower() + sep + "generated";
if (!Directory.Exists(dir)) {
Console.WriteLine ("creating " + dir);
Directory.CreateDirectory(dir);
}
String filename = dir + sep + Name + ".cs";
// Console.WriteLine ("creating " + filename);
FileStream stream = new FileStream (filename, FileMode.Create, FileAccess.Write);
StreamWriter sw = new StreamWriter (stream);
sw.WriteLine ("// This file was generated by the Gtk# code generator.");
sw.WriteLine ("// Any changes made will be lost if regenerated.");
sw.WriteLine ();
sw.WriteLine ("namespace " + NS + " {");
sw.WriteLine ();
sw.WriteLine ("\tusing System;");
sw.WriteLine ();
return sw;
}
protected void CloseWriter (StreamWriter sw)
{
sw.WriteLine ();
sw.WriteLine ("}");
sw.Flush();
sw.Close();
}
public void AppendCustom (StreamWriter sw, string custom_dir)
{
char sep = Path.DirectorySeparatorChar;