Observable Class Reference
[Design patterns]

Object that notifies its changes to a set of observers. More...

#include <ql/patterns/observable.hpp>

Inherited by BootstrapHelper< QuantLib::DefaultProbabilityTermStructure >, BootstrapHelper< QuantLib::YieldTermStructure >, BootstrapHelper< QuantLib::YoYInflationTermStructure >, BootstrapHelper< QuantLib::YoYOptionletVolatilitySurface >, BootstrapHelper< QuantLib::ZeroInflationTermStructure >, AffineModel [virtual], BootstrapHelper, CalibratedModel [virtual], CalibrationHelper, Claim, CommodityIndex, Event, FdmQuantoHelper, FloatingRateCouponPricer [virtual], Handle::Link, Index, InflationCouponPricer [virtual], LazyObject [virtual], MarketModelFactory, PricingEngine, Quote [virtual], RecoveryRateModel [virtual], SmileSection [virtual], StochasticProcess, TermStructure [virtual], and TermStructureConsistentModel [virtual].

List of all members.

Public Member Functions

 Observable (const Observable &)
Observableoperator= (const Observable &)
void notifyObservers ()

Friends

class Observer


Detailed Description

Object that notifies its changes to a set of observers.


Member Function Documentation

Observable & operator= ( const Observable o  ) 

Warning:
notification is sent before the copy constructor has a chance of actually change the data members. Therefore, observers whose update() method tries to use their observables will not see the updated values. It is suggested that the update() method just raise a flag in order to trigger a later recalculation.

void notifyObservers (  ) 

This method should be called at the end of non-const methods or when the programmer desires to notify any changes.