DCOPRef and dynamic stubs ( 3.1? )
lars at trolltech.com
Mon Sep 9 11:35:41 BST 2002
> On Mon, Sep 09, 2002 at 10:22:52AM +0200, Matthias Ettrich wrote:
> > On Monday 09 September 2002 09:46, Simon Hausmann wrote:
> > > On Sun, Sep 08, 2002 at 04:50:57PM +0200, Matthias Ettrich wrote:
> > > > I was playing with the idea to extend DCOPRef to allow using if for
> > > > calls and sends.
> > >
> > > Nice! One thing that impressed me very much in Qtopia was
> > > QCopEnvelope, inherited from QDataStream, for sending one-way messages:
> > >
> > > DCOPEnvelope( "kdesktop", "default", "void setFoo( int, QString )" )
> > > << blah << blubb;
> > >
> > > I think it would be cool to have such a class in kdelibs, too. But I
> > > don't know if that's possible with regard to licensing...
> > Of course it was possible. I looked at the DCOPEnvelope (which inherits
> > QDataStream), but I don't think it's good enough. The pattern does not
> > support return values and it doesn't do type checking at all. With
> > DCOPRef,
> Yes, that's a big disadvantage.
> > your send call would look like
> > DCOPRef( "desktop" ).send( "setFoo", blah, blubb );
> > Doesn't that look even better? "setFoo" is automatically extended to
> > "setFoo(int, QString)" depending on the types of the arguments 'blah' and
> > 'blubb'.
> How does the signature of send look like?
It's a template function:
template class<Arg1, Arg2> send( const char*, const Arg1 &arg1, const Arg2
More information about the kde-core-devel