> On 12 sept. 2015, at 10:19, Till Oliver Knoll <till.oliver.kn...@gmail.com> 
> wrote:
> 
> 
>> Am 11.09.2015 um 19:59 schrieb Matthew Woehlke <mwoehlke.fl...@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@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
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to