Hi Bohan,
Bohan Liu <
[hidden email]> writes:
> Why does this function have the return type "observable&" instead of "void"?
> Because I think this function is just to notify the registered
> observers.
The reason is so that you can string assignments together in the usual
C++ way, i.e., do:
o1=o2=o3=o4;
> Besides "notifyObservers()", what other things happen if an object of
> observable is assigned to the other object (e.g. observable1 = observable2)?
Like the comments indicate, the observers are not copied to the new
object, so as far as I know, nothing else happens. Derived class can
of course implement more functionality in this call to copy over any
required class data.
Best,
Bojan
--
Bojan Nikolic ||
http://www.bnikolic.co.uk------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users