GtkSharp/generator/InterfaceGen.cs
Mike Kestner 6d30cf0c3e refactoring to remove substantial code duplication thoughout the generator
2002-05-23  Mike Kestner <mkestner@speakeasy.net>

	* generator/BoxedGen.cs : Update for Static SymbolTable
	* generator/CallbackGen.cs : Use GenBase and Parameters classes
	* generator/CodeGenerator.cs : Update for Static SymbolTable
	* generator/Ctor.cs : code from StructBase using Parameters class
	* generator/EnumGen.cs : Use GenBase
	* generator/GenBase.cs : Abstract Stream Writer creation, stream
	  boilerplate, and common *Name properties
	* generator/IGeneratable.cs : Update for Static SymbolTable
	* generator/InterfaceGen.cs : Use GenBase
	* generator/Method.cs : code from StructBase using Parameters class
	* generator/ObjectGen.cs : Major refactoring. Use GenBase. Build
	  tables of Member generatables at construct time to facilitate
	  future name collision resolution logic.
	* generator/Parameters.cs : new generatable to abstract duplicated
	  parameter parsing logic.
	* generator/Parser.cs : Update for Static SymbolTable
	* generator/Property.cs : code from ObjectGen
	* generator/Signal.cs : code from ObjectGen
	* generator/SignalHandler.cs : Update for Static SymbolTable
	* generator/StructBase.cs : Update for Static SymbolTable
	* generator/StructGen.cs : Update for Static SymbolTable
	* generator/SymbolTable.cs : Make all methods and private members
	  static.  There is no reason to ever have multiple tables.

svn path=/trunk/gtk-sharp/; revision=4895
2002-05-23 23:43:25 +00:00

59 lines
1.1 KiB
C#

// GtkSharp.Generation.InterfaceGen.cs - The Interface Generatable.
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2001-2002 Mike Kestner
namespace GtkSharp.Generation {
using System;
using System.IO;
using System.Xml;
public class InterfaceGen : GenBase, IGeneratable {
public InterfaceGen (string ns, XmlElement elem) : base (ns, elem) {}
public String MarshalType {
get
{
return "";
}
}
public String CallByName (String var_name)
{
return "";
}
public String FromNative(String var)
{
return "";
}
public void Generate ()
{
StreamWriter sw = CreateWriter ();
sw.WriteLine ("\tusing System;");
sw.WriteLine ();
sw.WriteLine ("\tpublic interface " + Name + " {");
sw.WriteLine ();
foreach (XmlNode node in Elem.ChildNodes) {
if (node.Name != "member") {
continue;
}
//FIXME: Generate the methods.
XmlElement member = (XmlElement) node;
}
sw.WriteLine ("\t}");
CloseWriter (sw);
Statistics.IFaceCount++;
}
}
}