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

List:       kde-devel
Subject:    Re: Forward declaration of template classes
From:       Waldo Bastian <bastian () ens ! ascom ! ch>
Date:       1999-04-29 15:37:33
[Download RAW message or body]

Robert Hagemann wrote:
> 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?

I guess that's the most pragmatic approach. You loose a bit of
abstraction
that way. I've never read Stroustrup but I don't see what is wrong with
inheriting from template classes. Not that this is important in any way.

Cheers,
Waldo

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

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