[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KSharedPtr
From: Waldo Bastian <bastian () ens ! ascom ! ch>
Date: 1999-07-13 10:03:46
[Download RAW message or body]
Simon Hausmann wrote:
>
> I just like to note that the other solution is to avoid the *X cast
> problem by typedef'ing:
>
> class Foo: public QShared
> {
> typedef KSharedPtr<Foo> Ptr;
> ...
> }
>
> and use Foo::Ptr instead of *X all around.
>
> This is what Torben does in KScript (KSValue::Ptr, KSModule::Ptr, etc.)
>
> The ::Ptr variant looks very nice and clean, but it's dangerous
> if the developer doesn't pay attention.
>
> Nevertheless I like the ::Ptr variant because it
> 1) re-uses QShared
> 2) forces to create clean code (IMHO)
>
> But Waldo's variant is also very nice.. :-)
It makes sense to have these typedefs as well.
--
The "gui" in "Penguin" is pronounced "K-D-E"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic