A final class? You mean like a final variable in Java? I haven't heard of that before in C++. But to answer your question about making private constructors, the only reason why I could see you doing something like that would be in this case:
class Something {
private:
Something();
static list<Something *> somethings;
public:
static Something *New() {
Something *something = new Something;
somethings.push_back(something);
return something;
}
//...
};
// ...
// In code somewhere
Something *something = Something::New();
That way you could possibly do a kind of memory management..not sure how that ties in with a 'final' class, though.
-Fredric
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
Offline 80 posts
since Aug 2005