[Kde-bindings] Using generics in Qyoto

Arno Rehn arno at arnorehn.de
Fri Jan 12 15:43:58 UTC 2007


Am Donnerstag, 11. Januar 2007 14:30 schrieb Richard Dale:
> On Thursday 11 January 2007 13:05, Arno Rehn wrote:
> > > I think we just need to build Qyoto with gmcs instead of mcs, and don't
> > > need to change anything much so it looks as though it should be easy to
> > > switch.
> >
> > Good idea, but we would have to re-write some major parts of the
> > list-marshallers. But that shouldn't be the problem.
> > Anyway, I first try to get my dbus things to work
>
> Well I was assuming the marshallers wouldn't need a huge change, but maybe
> I'm wrong. But I won't checkin that uses generics until you've tracked down
> why your dbus doesn't work anyway.

OK, as my dbus is now working, let's come back to generics.
I see two possibilities for things like QLists and QPairs etc...
We could parse those classes with Kalyptus and work with them like with any 
other class, when we request an element via QLists.At() it would probably get 
marshalled the normal way - that would not require a huge change in the 
marshalling functions - I think we could even just delete the ValueList 
Marshallers.
The other possibility would be to create our own Lists<T>, but it would be 
quite difficult to marshall from a C++-QList to a C#-List<T>.

I would prefer to just parse the Qt stuff with kalyptus and nothing more. We 
can then add some functions for interopability with C#, e.g. to cast a QList 
to an ArrayList and vice versa, so it is easier to use other libraries for 
Mono.
Well, that's my opinion.
Do you already have some code?

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list