From kde-devel Thu Aug 09 18:17:56 2001 From: Kurt Granroth Date: Thu, 09 Aug 2001 18:17:56 +0000 To: kde-devel Subject: Re: DCOP for custom objects X-MARC-Message: https://marc.info/?l=kde-devel&m=99738128723205 On Monday 06 August 2001 06:44 pm, Yee_Keat Phuah wrote: > I am using DCOPIDL, how do I use dcop for sending/receiving custom objects? > Lets say I have > > class Person > { > QString name; > int age; > }; > > I did overload both the QDataStream &operator<< and operator>>, but the > problem is when the dcopidl/dcopidlcpp makes the dcopsvr_stub.cpp, it does > not include my own "person.h" header file. > > For the dcopsvr_stub.cpp to include it, I have to put in "#include > " and parse the -I./ as the CFLAGS for it to work. Is there any > particular reason that dcopidl only parses those includes that is standard? > such as those in <>? Or is there any other way to do dcop of custom objects > that I don't know of. No, this is a limitation of DCOPIDL so far. Getting support for custom objects in DCOPIDL would take some work. I actually had a prototype mostly working quite some months ago... I honestly don't remember why I never committed it. Maybe it never worked completely or maybe it was during a release freeze and I accidently deleted it. In any event, I can't find it anymore. Basically, what needs to be done is to create a new DCOP tag (like DCOP_OBJECT) to put in custom objects and have dcopidl parse it. It should also handle the proper includes and operator overloads. I'm vaguely remembering that there will be a problem with the scope of the overloads (defined in headers vs defined in source files, I think). -- Kurt Granroth | http://www.granroth.org KDE Developer/Evangelist | SuSE Labs Open Source Developer granroth@kde.org | granroth@suse.com KDE -- Conquer Your Desktop >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<