[KDE/Mac] Multiplatform frameworks

Ian Wadham iandw.au at gmail.com
Tue Mar 3 05:08:31 UTC 2015


Hi René,

On 02/03/2015, at 7:58 PM, René J.V. Bertin wrote:
>> Ian wrote:
>> Yes, that is some strange puppy: a private constructor, but no
>> implementation and no instantiation anywhere.  And QSP has no data-state
>> ATM, static or otherwise, except what is on the stack.
> 
> A private ctor? I can't recall having seen one at all. QSP *seems* to be "just an exercise" in using OOP techniques where simple functions would have been enough. No offence intended, David; I'm sure there's a bit more to it than that.

See http://stackoverflow.com/questions/2062560/what-is-the-use-of-making-constructor-private-in-a-class
answer 63 for a good summary.  Or maybe Google something like "C++ design patterns"
for the full story.

In QSP, I guess having a class allows you to qualify names of static "simple functions" and
enums by using the name of the class and having a private ctor with no implementation
ensures that you cannot create a QSP object, copy a QSP object or inherit from the class.

Cheers, Ian W.



More information about the kde-mac mailing list