Observable class

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Observable class

Naoufel El Bachir
Hi,
I was looking at the Observable class and have a few
questions:

- Is there any reason this class is not abstract ?
- What happens when Observable is deleted ? Does not
it need to notify Observers in its destructor ?
- Why is Observable::notifyObservers() still public
and not protected as suggested in the Ehancement
Proposal ?

Thanks for any clarifications


               
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com


Reply | Threaded
Open this post in threaded view
|

Re: Observable class

Nicolas Di Césaré
Selon Naoufel El Bachir <[hidden email]>:

> Hi,
> I was looking at the Observable class and have a few
> questions:
>
> - Is there any reason this class is not abstract ?

Is there any reason to be abstract ;-)

> - What happens when Observable is deleted ? Does not
> it need to notify Observers in its destructor ?

Classes derived from Observers contain a "link" to Observable class using Handle
  or shared_ptr. It ensure that observed classes are not destroyed since
Observer class observes.


>
> ___________________________________________________________
> To help you stay safe and secure online, we've developed the all new Yahoo!
> Security Centre. http://uk.security.yahoo.com
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> Quantlib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>


--
Nicolas Di Césaré
http://nicolas.dicesare.free.fr