[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: dcop question
From: Luke Sandell <kdedevel () luketopia ! net>
Date: 2005-08-08 20:44:26
Message-ID: 200508082044.26848.kdedevel () luketopia ! net
[Download RAW message or body]
On Monday, August 8, 2005 2:11 pm, Boudewijn Rempt wrote:
> when I have a method that
> returns a Krita class, I return a DCOPRef, like
>
> class KisDocIface : virtual public KoDocumentIface
> {
> K_DCOP
> public:
> KisDocIface( KisDoc *doc_ );
> k_dcop:
> virtual DCOPRef currentImage();
> }
>
> When I have a method that takes a Krita class as a parameter, should I pass
> a dcopref, too?
Well, the orignal method probably takes *reference* to a Krita class. Since
you can't have ordinary reference parameters in DCOP methods, you should use
a DCOPRef.
> What about type safety in these cases?
DCOPRef has type safety built in. Use the three argument constructor to
include a typename and the type() method to retrieve it.
> class KisImageIface : virtual public DCOPObject
> {
> K_DCOP
> public:
> KisImageIface( KisImage *img_ );
> k_dcop:
>
> bool raise(KisLayerSP layer); // This?
> bool raise(DCOPRef layer); // Or this?
> }
If you include both raise(...) methods, then the former should be public,
while the later should be k_dcop. However, wouldn't it be better to have a
raise() method (with no parameters) in KisLayerSP instead?
--
Luke Sandell
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic