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

List:       kde-multimedia
Subject:    Re: SmartWrappers => Object conversion done!
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2000-05-15 10:16:17
[Download RAW message or body]

   Hi!

On Sat, May 13, 2000 at 08:49:13PM +0100, Nicolas Brodu wrote:
> The subject says it all. Nowhere in the code you'll find SmartWrappers again.
> Instead, the Object wrapper is used.
> Advantages:
> - At last, all functionnalities of Object are available for the other
> interfaces.
> - Much, much, more logical. An Object is an Object, and all interfaces _are_
> Objects now since they derive from it.
> - Everything can be made const again, and nearly everything inline.
> - The code is much clear.
> 
> I marked done a few things in the TODO, but things like dynamic casting still
> need a little work. Stefan, could you please check what else has been solved by
> this change?
> 
> This version can be found here:
>   http://nicolas.brodu.free.fr/arts.tar.bz2
> What are the current limitations for commiting in kdelibs? Do we have to check
> with another programmer first?

For kdelibs/arts, there are two things that should be done:
- I should have reviewed what gets committed before it gets into the CVS
- the change shouldn't break compilation of any dependant code in kdelibs and
  kdemultimedia - or the appropriate fixes have to be committed at the same
  time

Other than that, for the next few weeks there are no limitations.

The SmartWrapper changes look good - I would suggest that we first get these
into the CVS, independant from the aliasing code. So if you like, please
commit them, without aliasing and dynamic casting for now.

There is one thing I'd also suggest changing right now:

Assigning SmartWrappers from (Foo_base *) either with an operator= or with
the constructor is quite dangerous, as you will often mess up the reference
count, so maybe it would be a good idea to remove this constructor and
operator one day (not now).

As you have changed 0 to (Foo_base *)0 all over the code, perhaps it would
be a good idea to do it right, and make these

Foo f = Object::null();  /* which would due to inheritance of course be
                            equivalent to Foo::null() */

and

Foo f(Object::null());

Maybe you could add this, too. Please test the compilation of kdemultimedia
before committing.

   Cu... Stefan
-- 
  -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany
     KDE Developer, project infos at http://space.twc.de/~stefan/kde *-
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia

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

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