koala

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Apr 29 19:05:04 UTC 2002


On Monday 29 April 2002 3:16 pm, Bernd Gehrmann wrote:
> On Sunday 28 April 2002 20:11, Richard Dale wrote:
> > But manually producing .pig or SWIG interface files as input instead of
> > using the headers 'as is' is 10 times worse.
>
> How do you use headers 'as is' when there are overloaded methods,
> like the zillion variants of QMenuData::insertItem() or multiple
> constructors?
The method overloading rules for java are pretty much the same as for C++ as 
far as I know, so it's just a one-to-one mapping of C++ methods or 
constructors onto the java equivalents. The only problems are when there is 
more than one C++ type which maps onto a single java type (eg QString*, 
QString&, QCString * and char * all map onto java.lang.String). Then there 
can be duplicate java method signatures and the QString variant would need to 
be chosen over the QCString or char * one.

Please find QPopupMenu.java attached as an example of how a zillion 
insertItem()'s look in java. This involved some hand editing, but it could 
(and should) have been generated automatically.

-- Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QPopupMenu.java
Type: text/x-java
Size: 11290 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20020429/2da75e11/attachment.java>


More information about the KDevelop-devel mailing list