From: Tim R. <ti...@us...> - 2004-09-11 19:36:45
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13853/generator Modified Files: AssemblyInfo.cs config.cs function.cs generator.build generator.cs typedef.cs Log Message: the generator has new optons Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** generator.cs 11 Sep 2004 18:52:45 -0000 1.8 --- generator.cs 11 Sep 2004 19:36:36 -0000 1.9 *************** *** 81,86 **** writer = new StreamWriter( fs ); // bind stream to file define = new Define( writer ); // initialize define compiler ! typedef = new TypeDef( writer, config.baseTypes ); // initialize typedef compiler ! function = new Function( writer, typedef, config.linkLibrary, config.ignoreFunctions ); // initiaize function compiler writeHeader(); // write file header --- 81,86 ---- writer = new StreamWriter( fs ); // bind stream to file define = new Define( writer ); // initialize define compiler ! typedef = new TypeDef( writer, config.baseTypes, config.DelegateAttribute ); // initialize typedef compiler ! function = new Function( writer, typedef, config.DllImportFlags, config.DllImportAttributes, config.linkLibrary, config.ignoreFunctions ); // initiaize function compiler writeHeader(); // write file header Index: generator.build =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** generator.build 11 Sep 2004 17:26:19 -0000 1.2 --- generator.build 11 Sep 2004 19:36:36 -0000 1.3 *************** *** 19,23 **** <attributes> <attribute type="ComVisibleAttribute" value="false" /> ! <attribute type="CLSCompliantAttribute" value="true" /> <attribute type="AssemblyTitleAttribute" value="csDragons WrapperGenerator" /> <attribute type="AssemblyDescriptionAttribute" value="A tool to build C# bindings" /> --- 19,23 ---- <attributes> <attribute type="ComVisibleAttribute" value="false" /> ! <attribute type="CLSCompliantAttribute" value="false" /> <attribute type="AssemblyTitleAttribute" value="csDragons WrapperGenerator" /> <attribute type="AssemblyDescriptionAttribute" value="A tool to build C# bindings" /> Index: config.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/config.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config.cs 5 Aug 2004 21:13:56 -0000 1.4 --- config.cs 11 Sep 2004 19:36:36 -0000 1.5 *************** *** 33,36 **** --- 33,40 ---- */ public string outputFile; + public string DllImportFlags; + public string DelegateAttribute; + public string DllImportAttributes; + public bool writeFunctions; public bool writeDelegates; Index: typedef.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/typedef.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** typedef.cs 6 Aug 2004 11:42:34 -0000 1.5 --- typedef.cs 11 Sep 2004 19:36:36 -0000 1.6 *************** *** 28,31 **** --- 28,33 ---- protected SortedList dList; + protected string delegateAttribute = ""; + /** \brief Constructor * *************** *** 59,63 **** } ! public TypeDef( StreamWriter w, ArrayList typedefs ) : this ( w ) { IEnumerator e = typedefs.GetEnumerator(); while (e.MoveNext()) { --- 61,66 ---- } ! public TypeDef( StreamWriter w, ArrayList typedefs, string delAttr ) : this ( w ) { ! delegateAttribute = delAttr; IEnumerator e = typedefs.GetEnumerator(); while (e.MoveNext()) { *************** *** 222,225 **** --- 225,233 ---- while ( e.MoveNext() ) { + if ( (delegateAttribute!=null) && (delegateAttribute!="") ) { + writer.Write( " " ); + writer.Write( delegateAttribute ); + writer.Write( "\n" ); + } writer.Write( " public delegate " ); writer.Write( e.Value ); Index: function.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/function.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** function.cs 11 Sep 2004 17:31:47 -0000 1.5 --- function.cs 11 Sep 2004 19:36:36 -0000 1.6 *************** *** 36,39 **** --- 36,42 ---- */ protected string lib; + + protected string dllFlags; + protected string dllAttr; protected ArrayList baseTypes; *************** *** 49,56 **** * @param l the name of the library to be wrapped */ ! public Function( StreamWriter w, TypeDef t, string l, ArrayList _ignoreFunctions ) { Debug.Indent(); Debug.WriteLine( "Entering Function.Function(StreamWriter)" ); writer = w; typedef = t; --- 52,61 ---- * @param l the name of the library to be wrapped */ ! public Function( StreamWriter w, TypeDef t, string df, string da, string l, ArrayList _ignoreFunctions ) { Debug.Indent(); Debug.WriteLine( "Entering Function.Function(StreamWriter)" ); + dllFlags = df; + dllAttr = da; writer = w; typedef = t; *************** *** 284,288 **** writer.Write( " [ DllImport( \"" ); writer.Write( lib ); ! writer.Write( "\" ) ]\n" ); writer.Write( " public static extern " ); --- 289,303 ---- writer.Write( " [ DllImport( \"" ); writer.Write( lib ); ! writer.Write( "\" " ); ! if ( (dllFlags!=null) && (dllFlags!="") ) { ! writer.Write( ", " ); ! writer.Write( dllFlags.Trim() ); ! } ! writer.Write( " ) " ); ! if ( (dllAttr!=null) && (dllAttr!="") ) { ! writer.Write( ", " ); ! writer.Write( dllAttr.Trim() ); ! } ! writer.Write(" ]\n" ); writer.Write( " public static extern " ); Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/AssemblyInfo.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AssemblyInfo.cs 11 Sep 2004 18:52:45 -0000 1.3 --- AssemblyInfo.cs 11 Sep 2004 19:36:36 -0000 1.4 *************** *** 3,21 **** using System.Runtime.InteropServices; ! //------------------------------------------------------------------------------ ! // <autogenerated> ! // This code was generated by a tool. ! // Runtime Version: 1.1.4322.573 ! // ! // Changes to this file may cause incorrect behavior and will be lost if ! // the code is regenerated. ! // </autogenerated> ! //------------------------------------------------------------------------------ [assembly: ComVisibleAttribute(false)] ! [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyTitleAttribute("csDragons WrapperGenerator")] [assembly: AssemblyDescriptionAttribute("A tool to build C# bindings")] ! [assembly: AssemblyConfigurationAttribute("net-1.1.win32")] [assembly: AssemblyCompanyAttribute("http://www.csdragons.de")] [assembly: AssemblyProductAttribute("wrapper-generator")] --- 3,21 ---- using System.Runtime.InteropServices; ! // ------------------------------------------------------------------------------ ! // <autogenerated> ! // This code was generated by a tool. ! // Mono Runtime Version: 1.1.4322.573 ! // ! // Changes to this file may cause incorrect behavior and will be lost if ! // the code is regenerated. ! // </autogenerated> ! // ------------------------------------------------------------------------------ [assembly: ComVisibleAttribute(false)] ! [assembly: CLSCompliantAttribute(false)] [assembly: AssemblyTitleAttribute("csDragons WrapperGenerator")] [assembly: AssemblyDescriptionAttribute("A tool to build C# bindings")] ! [assembly: AssemblyConfigurationAttribute("mono-1.0.unix")] [assembly: AssemblyCompanyAttribute("http://www.csdragons.de")] [assembly: AssemblyProductAttribute("wrapper-generator")] *************** *** 25,27 **** [assembly: AssemblyVersionAttribute("0.2.1.1715")] [assembly: AssemblyInformationalVersionAttribute("0.2.1")] - --- 25,26 ---- |