[webkit-efl] Use of pimpl idiom for Ewk classes

Kangil Han kangil.han at samsung.com
Fri Oct 19 01:49:52 PDT 2012


Hi Chris,
 
FOA, thank you, of course including Mikhail, for the constructive
discussion. :)
 
My two cents heads to https://bugs.webkit.org/attachment.cgi?id=169425
<https://bugs.webkit.org/attachment.cgi?id=169425&action=prettypatch>
&action=prettypatch
No macro and so pretty!
 
Kind regards,
Kangil
 
From: webkit-efl-bounces at lists.webkit.org
[mailto:webkit-efl-bounces at lists.webkit.org] On Behalf Of Dumez, Christophe
Sent: Friday, October 19, 2012 1:28 AM
To: Thiago Marcos P. Santos
Cc: webkit-efl at lists.webkit.org; Kenneth R Christiansen
Subject: Re: [webkit-efl] Use of pimpl idiom for Ewk classes
 
Hi,

I have updated the Ewk_Download class based on the alternative mentioned by
Thiago and updated a patch here for comparison:
https://bugs.webkit.org/attachment.cgi?id=169425
<https://bugs.webkit.org/attachment.cgi?id=169425&action=prettypatch>
&action=prettypatch
(pimpl patch is still at https://bugs.webkit.org/attachment.cgi?id=169402
<https://bugs.webkit.org/attachment.cgi?id=169402&action=prettypatch>
&action=prettypatch)

One possible issue that I noticed with this approach is that we need to use
"const char*" instead of "String" type in our C++ methods API due to Eina
string sharing. This is a bit unfortunate since C++ code uses String type in
WebKit.

As I said in my previous email, we also need to write a lot more C++ methods
than with the pimpl approach. It will be a lot more work to refactor all Ewk
classes.
This approach however has the benefit of being of simpler design (no macros,
C++ methods can access members directly without dereferencing a pointer).

I'm personally open to both approaches so I'd like to hear others' opinion.

Kr,
-- 
Christophe Dumez
Linux Software Engineer, PhD
Intel Finland Oy - Open Source Technology Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-efl/attachments/20121019/eabbd6e1/attachment-0001.html>


More information about the webkit-efl mailing list