Hi, Patrick
> Yongsheng, can you
> review this so? It's ready to replace the current code in the "dbus-api"
> branch.
New solution uses boost bind and function to solve the issue. It should be
workable.
But I have a concern about private inheritance and boost bind. 
When boost does binding for a instance and a function member of its base 
classes, 
if the class of the instance privately or protectedly
inherits from its base class, boost binding could not access that function and 
raises errors.
This problem could be resolved by changing to public inheritance, but this
would prevent private/protected inheritance which might make code structure 
clear.

Cheers,
Yongsheng

-----Original Message-----
From: Ohly, Patrick 
Sent: Tuesday, October 13, 2009 4:00 AM
To: Zhu, Yongsheng
Cc: SyncEvolution
Subject: Re: [SyncEvolution] gdbus-cxx and methods in base classes

On Thu, 2009-10-08 at 17:33 +0100, Patrick Ohly wrote:
> I couldn't answer this without looking into the problem more thoroughly.
> The result is in the "gdbus-cxx" branch. This is still experimental. I
> need to split it up into smaller commits, want to set the ASYNC flag
> automatically (should be doable now), const members don't work yet, have
> to adapt SyncEvolution, ...

Okay, done. See the updated "gdbus-cxx" branch. Yongsheng, can you
review this so? It's ready to replace the current code in the "dbus-api"
branch.

I didn't get the "const methods" case to work. The last commit contains
an example (hello_const) which is commented out at the moment, because
enabling it demonstrates that registering such a const method fails. C++
experts to the rescue...

On the other hand, this is not an essential feature as long as one
controls the implementation of the methods. An extra "const" keyword can
always be removed, even though it is not nice.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.


_______________________________________________
SyncEvolution mailing list
SyncEvolution@syncevolution.org
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to