[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-mac
Subject:    Re: [KDE/Mac] Multiplatform frameworks
From:       Ian Wadham <iandw.au () gmail ! com>
Date:       2015-03-03 5:08:31
Message-ID: 0D1D6356-25DD-49EE-939F-A2492C08D013 () gmail ! com
[Download RAW message or body]

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.

_______________________________________________
kde-mac@kde.org
List Information: https://mail.kde.org/mailman/listinfo/kde-mac
KDE/Mac Information: http://community.kde.org/Mac


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic