[Interest] Qt 5.5.x

Samuel Gaist samuel.gaist at edeltech.ch
Sat Sep 12 10:31:00 CEST 2015


> On 12 sept. 2015, at 10:19, Till Oliver Knoll <till.oliver.knoll at gmail.com> wrote:
> 
> 
>> Am 11.09.2015 um 19:59 schrieb Matthew Woehlke <mwoehlke.floss at gmail.com>:
>> 
>>> On 2015-09-11 13:41, Till Oliver Knoll wrote:
>>> You can further reduce the "dependency tree" of your sources by 
>>> making use of the private "d-pointer" pattern (there is a name for
>>> it which currently escapes me)
>> 
>> PIMPL? ;-)
>> 
>> https://en.wikipedia.org/wiki/Pimpl
> 
> Exactly :) Even though I had the term "Cheshire Cat" in mind :) (I yet have to google why that pattern is named after a cat).
> 
> But while we're there, quoting from that article:
> 
> "One type of opaque pointer commonly used in C++ class declarations is the d-pointer. The d-pointer is the only private data member of the class and points to an instance of a struct. Named by Arnt Gulbrandsen of Trolltech, this method allows class declarations to omit private data members, except for the d-pointer itself.[6] The result: (a) more of the class implementation is hidden from view; (b) adding new data members to the private struct does not affect binary compatibility; (c) the header file containing the class declaration only needs to #include those other files needed for the class interface, rather than for its implementation. One side benefit is that compilations are faster because the header file changes less often. The d-pointer is heavily used in the Qt and KDE libraries."
> 
> 
> Couldn't have explained it better :) Oh and yes, Trolltech is the initial company(*) that brought us Qt! ;)
> 
> Cheers,
>   Oliver
> 
> 
> (*) IIRC they did have (slightly) different names before that
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

Because the d pointer is the equivalent of the smile of the Cheshire Cat, the only visible part: d => D

Cheers
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150912/061a9a0b/attachment.html>


More information about the Interest mailing list