[Qtcsharp-patches] Bugtussle/src/APILoader CGen.bdsproj,1.8,1.9 Class.cs,1.51,1.52 Function.cs,1.18,
Status: Inactive
Brought to you by:
manyoso
|
From: Andreas H. <ah...@us...> - 2005-03-01 13:25:32
|
Update of /cvsroot/qtcsharp/Bugtussle/src/APILoader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17704/src/APILoader Modified Files: CGen.bdsproj Class.cs Function.cs Parameter.cs TypeReference.cs Log Message: Improved Kylix export Index: Class.cs =================================================================== RCS file: /cvsroot/qtcsharp/Bugtussle/src/APILoader/Class.cs,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** Class.cs 4 Nov 2004 18:35:46 -0000 1.51 --- Class.cs 1 Mar 2005 13:25:22 -0000 1.52 *************** *** 172,176 **** { string funcName = memberdef["name"].InnerText; - if ( sectionKind.StartsWith( "private-" ) ) { --- 172,175 ---- Index: CGen.bdsproj =================================================================== RCS file: /cvsroot/qtcsharp/Bugtussle/src/APILoader/CGen.bdsproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CGen.bdsproj 4 Nov 2004 18:35:46 -0000 1.8 --- CGen.bdsproj 1 Mar 2005 13:25:22 -0000 1.9 *************** *** 69,77 **** <Options Name="BuildInOutput" Type="Boolean">False</Options> <Options Name="OutputDirectory" Type="String">bin\Debug</Options> ! <Options Name="RunParams" Type="String">wx -t win32</Options> <Options Name="HostApplication" Type="String"></Options> <Options Name="Launcher" Type="String"></Options> <Options Name="UseLauncher" Type="Boolean">False</Options> ! <Options Name="DebugCWD" Type="String">Z:\wxC</Options> <Options Name="RemotePath" Type="String"></Options> <Options Name="RemoteHost" Type="String"></Options> --- 69,77 ---- <Options Name="BuildInOutput" Type="Boolean">False</Options> <Options Name="OutputDirectory" Type="String">bin\Debug</Options> ! <Options Name="RunParams" Type="String">qt -t win32_333</Options> <Options Name="HostApplication" Type="String"></Options> <Options Name="Launcher" Type="String"></Options> <Options Name="UseLauncher" Type="Boolean">False</Options> ! <Options Name="DebugCWD" Type="String">z:\Qts\Bugtussle\src</Options> <Options Name="RemotePath" Type="String"></Options> <Options Name="RemoteHost" Type="String"></Options> *************** *** 88,95 **** </Options> </OptionsSet> ! </Options> ! <FileList> ! <File FileName="c:\windows\microsoft.net\framework\v1.1.4322\System.dll" ContainerId="DotNetAssemblyCompiler" ModuleName="System" AssemblyName="System" Version="1.0.5000.0"/> ! <File FileName="c:\windows\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="System.XML" Version="1.0.5000.0"/> <File FileName="AssemblyInfo.cs" ContainerId="CSharpCompiler" ModuleName="AssemblyInfo"/> <File FileName="AccessKind.cs" ContainerId="CSharpCompiler" ModuleName="AccessKind"/> --- 88,96 ---- </Options> </OptionsSet> ! </Options> ! ! <FileList> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll" ContainerId="DotNetAssemblyCompiler" ModuleName="System" AssemblyName="System" Version="1.0.5000.0"/> ! <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll" ContainerId="DotNetAssemblyCompiler" ModuleName="System.XML" AssemblyName="System.XML" Version="1.0.5000.0"/> <File FileName="AssemblyInfo.cs" ContainerId="CSharpCompiler" ModuleName="AssemblyInfo"/> <File FileName="AccessKind.cs" ContainerId="CSharpCompiler" ModuleName="AccessKind"/> Index: Function.cs =================================================================== RCS file: /cvsroot/qtcsharp/Bugtussle/src/APILoader/Function.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Function.cs 19 Sep 2004 22:32:49 -0000 1.18 --- Function.cs 1 Mar 2005 13:25:22 -0000 1.19 *************** *** 133,136 **** --- 133,137 ---- list.Add( new Parameter( new TypeReference( f.ReturnType, false ), "returnValue" ) ); list.AddRange( f.parameters ); + /*Function m = new Method( (Method)f, f.Container as Class ); *************** *** 173,184 **** - /*! Gets a list of the parameters to the function. If there are no ! parameters, including the case where the Function is a Destructor, ! an empty array is returned. */ ! public Parameter[] GetParameters() ! { ! return (Parameter[]) parameters.ToArray( typeof(Parameter) ); ! } /*! Gets a list of parameters, caching a static array from the dynamic --- 174,184 ---- /*! Gets a list of the parameters to the function. If there are no ! parameters, including the case where the Function is a Destructor, ! an empty array is returned. */ ! public Parameter[] GetParameters() ! { ! return (Parameter[]) parameters.ToArray( typeof(Parameter) ); ! } /*! Gets a list of parameters, caching a static array from the dynamic *************** *** 206,210 **** } ! /* GetUniqueName returns the method's name with the Id, if Id != 0 */ public string UniqueName { --- 206,210 ---- } ! /*! GetUniqueName returns the method's name with the Id, if Id != 0 */ public string UniqueName { *************** *** 217,221 **** - // ANN: "==" must not compare the "Id" public static bool operator == (Function m1, Function m2) --- 217,220 ---- *************** *** 258,260 **** --- 257,310 ---- } + /*! OverloadEqualParameter compares Parameter p1 and p2 for overload + equality. (used by OverloadEqual) */ + private bool OverloadEqualParameter( Parameter p1, Parameter p2 ) + { + if ( p1.Type == p2.Type ) + return true; + if ( p1.Type.TypeBase == p2.Type.TypeBase && p1.Type.Mode == p2.Type.Mode ) + return true; + return false; + } + + /*! OverloadEqual compares the two parameter lists for equality when + overloading. (Used by HasUniqueParameters) */ + private bool OverloadEqual( Function f ) + { + if ( parameters.Count == f.parameters.Count ) + { + int count = parameters.Count; + for ( int i = 0; i < count; i++ ) + if ( OverloadEqualParameter((Parameter)parameters[i], (Parameter)f.parameters[i]) ) + return true; + } + return false; + } + + /*! HasUniqueParameters returns true if there is no overloaded function in + the same namespace/class that has overload-equal parameters */ + public bool HasUniqueParameters() + { + if (Overloaded) + { + if ( Container is Namespace ) + { + Namespace ns = (Namespace)Container; + foreach ( Function f in ns.Functions ) + if (f != this && f.Name == Name ) + if ( this.OverloadEqual( f ) ) + return false; + } + else if ( Container is Class ) + { + Class c = (Class)Container; + foreach ( Function f in c.Methods ) + if (f != this && f.Name == Name ) + if ( this.OverloadEqual( f ) ) + return false; + } + } + return true; + } + } \ No newline at end of file Index: TypeReference.cs =================================================================== RCS file: /cvsroot/qtcsharp/Bugtussle/src/APILoader/TypeReference.cs,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** TypeReference.cs 18 Aug 2004 12:11:57 -0000 1.29 --- TypeReference.cs 1 Mar 2005 13:25:22 -0000 1.30 *************** *** 98,101 **** --- 98,107 ---- string last = words[words.Count - 1]; + if ( last == "__stdcall" ) + { + last = words[words.Count - 2]; + lastIndex--; + } + switch ( last ) { Index: Parameter.cs =================================================================== RCS file: /cvsroot/qtcsharp/Bugtussle/src/APILoader/Parameter.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Parameter.cs 1 Oct 2004 11:32:56 -0000 1.13 --- Parameter.cs 1 Mar 2005 13:25:22 -0000 1.14 *************** *** 80,90 **** } ! ! /*! Gets or sets the name of the parameter. Normal users should not ! need to set the name, but a setter method is provided because ! Method and Constructor classes may need to back-patch the parameter ! name when the C/C++ code does not provide one. ! */ ! public string Name { get { return name; } --- 80,89 ---- } ! /*! Gets or sets the name of the parameter. Normal users should not ! need to set the name, but a setter method is provided because ! Method and Constructor classes may need to back-patch the parameter ! name when the C/C++ code does not provide one. ! */ ! public string Name { get { return name; } |