From: Tim R. <ti...@us...> - 2004-08-05 13:09:26
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21768/generator Modified Files: Makefile function.cs generator.cs typedef.cs Removed Files: AssemblyInfo_csdGL.cs AssemblyInfo_csdGLGtk.cs csdGL.cs gtkArea.cs gtkContext.cs Log Message: Cg binding Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** generator.cs 12 Jul 2004 17:17:52 -0000 1.1.1.1 --- generator.cs 5 Aug 2004 13:09:15 -0000 1.2 *************** *** 73,76 **** --- 73,79 ---- */ protected ArrayList typedefFiles; + + protected bool onlyFunctions = false; + /** \brief The constructor Generator is the main entry point. * *************** *** 216,223 **** function.process(); // pre-processing ! writer.WriteLine( "\n // constant definitions" ); ! define.write(); // write defines ! writer.WriteLine( "\n // delegates" ); ! typedef.write(); writer.WriteLine( "\n // functions" ); function.write(); // write functions --- 219,229 ---- function.process(); // pre-processing ! if (!onlyFunctions) { ! writer.WriteLine( "\n // constant definitions" ); ! define.write(); // write defines ! writer.WriteLine( "\n // delegates" ); ! typedef.write(); ! } ! writer.WriteLine( "\n // functions" ); function.write(); // write functions --- gtkArea.cs DELETED --- Index: typedef.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/typedef.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** typedef.cs 1 Aug 2004 13:42:01 -0000 1.2 --- typedef.cs 5 Aug 2004 13:09:15 -0000 1.3 *************** *** 55,58 **** --- 55,64 ---- } + public TypeDef( StreamWriter w, string addTypes ) : this ( w ) { + tList.Add( "CGcontext", "CGcontext" ); + tList.Add( "CGprogram", "CGprogram" ); + tList.Add( "CGparameter", "CGparameter" ); + } + /** \brief resolve type aliases * *************** *** 149,154 **** } ! tList.Add( n, n ); ! dList.Add( n, ret+" "+n+"( " + par + ")" ); } --- 155,169 ---- } ! try { ! tList.Add( n, n ); ! } catch (Exception e ) { ! Debug.WriteLine( e.ToString() ); ! } ! ! try { ! dList.Add( n, ret+" "+n+"( " + par + ")" ); ! } catch (Exception e ) { ! Debug.WriteLine( e.ToString() ); ! } } *************** *** 242,246 **** Console.WriteLine( t ); ! tList.Add( n, t ); // add typedef to list } --- 257,265 ---- Console.WriteLine( t ); ! try { ! tList.Add( n, t ); // add typedef to list ! } catch (Exception e) { ! Debug.WriteLine( e.ToString() ); ! } } *************** *** 282,286 **** j = q.IndexOf( '>' ); } - // split type string into components string[] s = q.Split( ' ' ); --- 301,304 ---- --- gtkContext.cs DELETED --- Index: function.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/function.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** function.cs 12 Jul 2004 17:17:50 -0000 1.1.1.1 --- function.cs 5 Aug 2004 13:09:15 -0000 1.2 *************** *** 36,40 **** */ protected string lib; ! protected ArrayList baseTypes; --- 36,40 ---- */ protected string lib; ! protected ArrayList baseTypes; *************** *** 46,50 **** * @param t the TypeDef compiler which is used for resolving types * @param l the name of the library to be wrapped ! */ public Function( StreamWriter w, TypeDef t, string l ) { Debug.Indent(); --- 46,50 ---- * @param t the TypeDef compiler which is used for resolving types * @param l the name of the library to be wrapped ! */ public Function( StreamWriter w, TypeDef t, string l ) { Debug.Indent(); *************** *** 69,72 **** --- 69,73 ---- baseTypes.Add( "uint" ); baseTypes.Add( "ulong" ); + baseTypes.Add( "string" ); Debug.WriteLine( "Exiting Function.Function(StreamWriter)" ); *************** *** 149,153 **** xl=doc.DocumentElement.GetElementsByTagName( "type" ); t=xl[0].InnerXml; ! // retrieve original parameter string string par = doc.DocumentElement.GetElementsByTagName( "argsstring" )[0].InnerXml; --- 150,154 ---- xl=doc.DocumentElement.GetElementsByTagName( "type" ); t=xl[0].InnerXml; ! // retrieve original parameter string string par = doc.DocumentElement.GetElementsByTagName( "argsstring" )[0].InnerXml; Index: Makefile =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 1 Aug 2004 13:26:42 -0000 1.8 --- Makefile 5 Aug 2004 13:09:15 -0000 1.9 *************** *** 1,4 **** FILES=generator.cs AssemblyInfo.cs define.cs typedef.cs function.cs - GLFILES=csdGLBase.cs csdGL.cs csdGLUBase.cs csdGLUTBase.cs Exceptions.cs CC=mcs --- 1,3 ---- *************** *** 10,73 **** GAC=gacutil $(GACUTIL_FLAGS) ! all: csdGenerator.exe csdGL.dll csdGL_Gtk.dll csdGenerator.exe: $(FILES) $(CC) $(OPTS) $(LIBOPTS) $(FILES) -out:$@ - csdGL.dll: libcsdGL.so AssemblyInfo_csdGL.cs $(GLFILES) - $(MCS) -target:library AssemblyInfo_csdGL.cs $(GLFILES) -out:$@ - - csdGL_Gtk.dll: libcsdGL.so gtkContext.cs csdGLXTokens.cs gtkArea.cs AssemblyInfo_csdGLGtk.cs $(GLFILES) - $(MCS) -target:library -r:glib-sharp.dll -r:gtk-sharp.dll -r:gdk-sharp.dll gtkContext.cs csdGLXTokens.cs gtkArea.cs AssemblyInfo_csdGLGtk.cs $(GLFILES) -out:$@ - - csdGLXTokens.cs: csdGenerator.exe glxtokens_8h.xml - mono ./csdGenerator.exe glxtokens_8h.xml libcsdGL.so csdGLXTokens System.Object csdGLXTokens.cs - - csdGLBase.cs: csdGenerator.exe gl_8h.xml glut_8h.xml - mono ./csdGenerator.exe gl_8h.xml libcsdGL.so csdGLBase System.Object csdGLBase.cs - - csdGLUBase.cs: csdGenerator.exe gl_8h.xml glu_8h.xml - mono ./csdGenerator.exe glu_8h.xml libcsdGL.so csdGLUBase csdGLBase csdGLUBase.cs gl_8h.xml - - csdGLUTBase.cs: csdGenerator.exe gl_8h.xml glut_8h.xml - mono ./csdGenerator.exe glut_8h.xml libcsdGL.so csdGLUTBase csdGLUBase csdGLUTBase.cs gl_8h.xml - - - gl_8h.xml: - ln -sf ../doxygen/xml/gl_8h.xml . - - glu_8h.xml: - ln -sf ../doxygen/xml/glu_8h.xml . - - glut_8h.xml: - ln -sf ../doxygen/xml/glut_8h.xml . - - glxtokens_8h.xml: - ln -sf ../doxygen/xml/glxtokens_8h.xml . - - libcsdGL.so: - ln -sf ../cbonding/libcsdGL.so . - - install: install-gac - - - install-gac: csdGL.dll csdGL_Gtk.dll - $(GAC) /i csdGL.dll /f /package $(PACKAGE) - $(GAC) /i csdGL_Gtk.dll /f /package $(PACKAGE) - - uninstall: uninstall-gac - - uninstall-gac: - $(GAC) /u csdGL - $(GAC) /u csdGL_Gtk - clean: ! rm -f *.exe ! rm -f *.dll ! rm -f csdGLBase.cs ! rm -f csdGLUBase.cs ! rm -f csdGLUTBase.cs ! rm -f csdGLXTokens.cs ! .IGNORE: clean --- 9,20 ---- GAC=gacutil $(GACUTIL_FLAGS) ! all: csdGenerator.exe csdGenerator.exe: $(FILES) $(CC) $(OPTS) $(LIBOPTS) $(FILES) -out:$@ clean: ! rm -f csdGenerator.exe ! .IGNORE: clean --- csdGL.cs DELETED --- --- AssemblyInfo_csdGLGtk.cs DELETED --- --- AssemblyInfo_csdGL.cs DELETED --- |