[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Forward declaration of template classes
From: "Robert Hagemann" <rhagemann () psipenta ! com>
Date: 1999-04-29 13:58:17
[Download RAW message or body]
Hi Waldo and all other,
<cite>
BList is not a class but a typedef.
You could probably define BList as:
class Blist : public QList<B>
{
BList(...) : QList<B>(...) { }
}
(Instead of typedef BList Qlist<B>;)
That might be a bit more work though.
</cite>
Thanx for Your suggestion.
I don't know the implementation details of the Qt Collection classes,
but B. Stroustrup (inventor of C++) has described the rationale behind the
template mechanism in C++ and the philosopy that is behind the STL.
Conclusion is, *not* to inherit template classes, unless it's absolutely
inevitable (see his C++ Book).
Another idea, that has come to my mind:
I ommitted the detail, that class B is inheriting QFrame. So I could use
QList<QFrame> instead. I consider this bearable, because the list is a
private member and therefor the usage is restricted to my own class A.
Any comments on that?
Ciao,
Robert
.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic