Observer Class Reference

Object that gets notified when a given observable changes. More...

#include <ql/patterns/observable.hpp>

Inherited by BootstrapHelper< YoYInflationTermStructure >, BootstrapHelper< YoYOptionletVolatilitySurface >, BootstrapHelper< ZeroInflationTermStructure >, GenericEngine< Arguments, Results >, GenericEngine< BarrierOption::arguments, BarrierOption::results >, GenericEngine< BasketOption::arguments, BasketOption::results >, GenericEngine< Bond::arguments, Bond::results >, GenericEngine< CallableBond::arguments, CallableBond::results >, GenericEngine< CapFloor::arguments, CapFloor::results >, GenericEngine< CdsOption::arguments, CdsOption::results >, GenericEngine< CliquetOption::arguments, CliquetOption::results >, GenericEngine< CompoundOption::arguments, CompoundOption::results >, GenericEngine< ContinuousAveragingAsianOption::arguments, ContinuousAveragingAsianOption::results >, GenericEngine< ContinuousFixedLookbackOption::arguments, ContinuousFixedLookbackOption::results >, GenericEngine< ContinuousFloatingLookbackOption::arguments, ContinuousFloatingLookbackOption::results >, GenericEngine< ConvertibleBond::option::arguments, ConvertibleBond::option::results >, GenericEngine< CPICapFloor::arguments, CPICapFloor::results >, GenericEngine< CPISwap::arguments, CPISwap::results >, GenericEngine< CreditDefaultSwap::arguments, CreditDefaultSwap::results >, GenericEngine< DiscreteAveragingAsianOption::arguments, DiscreteAveragingAsianOption::results >, GenericEngine< DividendBarrierOption::arguments, DividendBarrierOption::results >, GenericEngine< DividendVanillaOption::arguments, DividendVanillaOption::results >, GenericEngine< EnergyCommodity::arguments, EnergyCommodity::results >, GenericEngine< EverestOption::arguments, EverestOption::results >, GenericEngine< ForwardOptionArguments< VanillaOption::arguments >, VanillaOption::results >, GenericEngine< HimalayaOption::arguments, HimalayaOption::results >, GenericEngine< Instr::arguments, QuantoOptionResults< Instr::results > >, GenericEngine< MargrabeOption::arguments, MargrabeOption::results >, GenericEngine< MultiAssetOption::arguments, MultiAssetOption::results >, GenericEngine< OneAssetOption::arguments, OneAssetOption::results >, GenericEngine< PagodaOption::arguments, PagodaOption::results >, GenericEngine< PathMultiAssetOption::arguments, PathMultiAssetOption::results >, GenericEngine< SimpleChooserOption::arguments, SimpleChooserOption::results >, GenericEngine< SpreadOption::arguments, SpreadOption::results >, GenericEngine< Swap::arguments, Swap::results >, GenericEngine< Swaption::arguments, Swaption::results >, GenericEngine< SyntheticCDO::arguments, SyntheticCDO::results >, GenericEngine< VanillaOption::arguments, VanillaOption::results >, GenericEngine< VanillaStorageOption::arguments, VanillaStorageOption::results >, GenericEngine< VanillaSwap::arguments, VanillaSwap::results >, GenericEngine< VanillaSwingOption::arguments, VanillaSwingOption::results >, GenericEngine< VanillaVPPOption::arguments, VanillaVPPOption::results >, GenericEngine< VarianceOption::arguments, VarianceOption::results >, GenericEngine< VarianceSwap::arguments, VarianceSwap::results >, GenericEngine< WriterExtensibleOption::arguments, WriterExtensibleOption::results >, GenericEngine< YearOnYearInflationSwap::arguments, YearOnYearInflationSwap::results >, GenericEngine< YoYInflationCapFloor::arguments, YoYInflationCapFloor::results >, GenericEngine< ZeroCouponInflationSwap::arguments, ZeroCouponInflationSwap::results >, BootstrapHelper< TS >, CalibratedModel, CalibrationHelper, Claim, CommodityIndex, CompositeQuote< BinaryFunction >, ConstantRecoveryModel, CotSwapToFwdAdapterFactory, DeltaVolQuote, DerivedQuote< UnaryFunction >, FlatVolFactory, FloatingRateCoupon, FloatingRateCouponPricer [virtual], ForwardValueQuote, FuturesConvAdjustmentQuote, FwdToCotSwapAdapterFactory, GenericEngine< ArgumentsType, ResultsType >, Handle< T >::Link, IndexedCashFlow, InflationCoupon, InflationCouponPricer [virtual], InflationIndex, InterestRateIndex, LastFixingQuote, LazyObject [virtual], RendistatoBasket, SmileSection [virtual], StochasticProcess, and TermStructure [virtual].

List of all members.

Public Member Functions

 Observer (const Observer &)
Observeroperator= (const Observer &)
std::pair< std::set
< boost::shared_ptr
< Observable > >::iterator,
bool > 
registerWith (const boost::shared_ptr< Observable > &)
Size unregisterWith (const boost::shared_ptr< Observable > &)
virtual void update ()=0

Detailed Description

Object that gets notified when a given observable changes.


Member Function Documentation

virtual void update ( ) [pure virtual]

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implemented in PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, Bootstrap, Traits >, YieldTermStructure, PiecewiseDefaultCurve< Traits, Interpolator, Bootstrap >, DefaultProbabilityTermStructure, FittedBondDiscountCurve, StochasticProcess, DigitalCoupon, CappedFlooredYoYInflationCoupon, RelativeDateBootstrapHelper< TS >, TermStructure, FloatingRateCoupon, InflationIndex, InflationCoupon, PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits >, CapFloorTermVolCurve, CapFloorTermVolSurface, BootstrapHelper< TS >, PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits >, BootstrapHelper< YoYInflationTermStructure >, BootstrapHelper< ZeroInflationTermStructure >, BootstrapHelper< YoYOptionletVolatilitySurface >, SabrVolSurface, CalibratedModel, CdsHelper, CappedFlooredCoupon, AnalyticHestonHullWhiteEngine, IndexedCashFlow, FlatForward, GeneralizedBlackScholesProcess, AbcdAtmVolCurve, InflationCouponPricer, HybridHestonHullWhiteProcess, GenericEngine< ArgumentsType, ResultsType >, GenericEngine< EnergyCommodity::arguments, EnergyCommodity::results >, GenericEngine< ForwardOptionArguments< VanillaOption::arguments >, VanillaOption::results >, GenericEngine< YearOnYearInflationSwap::arguments, YearOnYearInflationSwap::results >, GenericEngine< CPISwap::arguments, CPISwap::results >, GenericEngine< VanillaSwingOption::arguments, VanillaSwingOption::results >, GenericEngine< VarianceSwap::arguments, VarianceSwap::results >, GenericEngine< PagodaOption::arguments, PagodaOption::results >, GenericEngine< MargrabeOption::arguments, MargrabeOption::results >, GenericEngine< Arguments, Results >, GenericEngine< ContinuousFixedLookbackOption::arguments, ContinuousFixedLookbackOption::results >, GenericEngine< CreditDefaultSwap::arguments, CreditDefaultSwap::results >, GenericEngine< CapFloor::arguments, CapFloor::results >, GenericEngine< VanillaStorageOption::arguments, VanillaStorageOption::results >, GenericEngine< SpreadOption::arguments, SpreadOption::results >, GenericEngine< HimalayaOption::arguments, HimalayaOption::results >, GenericEngine< EverestOption::arguments, EverestOption::results >, GenericEngine< MultiAssetOption::arguments, MultiAssetOption::results >, GenericEngine< CompoundOption::arguments, CompoundOption::results >, GenericEngine< CdsOption::arguments, CdsOption::results >, GenericEngine< SyntheticCDO::arguments, SyntheticCDO::results >, GenericEngine< ContinuousFloatingLookbackOption::arguments, ContinuousFloatingLookbackOption::results >, GenericEngine< CliquetOption::arguments, CliquetOption::results >, GenericEngine< OneAssetOption::arguments, OneAssetOption::results >, GenericEngine< DividendBarrierOption::arguments, DividendBarrierOption::results >, GenericEngine< ContinuousAveragingAsianOption::arguments, ContinuousAveragingAsianOption::results >, GenericEngine< PathMultiAssetOption::arguments, PathMultiAssetOption::results >, GenericEngine< VanillaSwap::arguments, VanillaSwap::results >, GenericEngine< ConvertibleBond::option::arguments, ConvertibleBond::option::results >, GenericEngine< VarianceOption::arguments, VarianceOption::results >, GenericEngine< BarrierOption::arguments, BarrierOption::results >, GenericEngine< VanillaVPPOption::arguments, VanillaVPPOption::results >, GenericEngine< Swaption::arguments, Swaption::results >, GenericEngine< WriterExtensibleOption::arguments, WriterExtensibleOption::results >, GenericEngine< YoYInflationCapFloor::arguments, YoYInflationCapFloor::results >, GenericEngine< CallableBond::arguments, CallableBond::results >, GenericEngine< DiscreteAveragingAsianOption::arguments, DiscreteAveragingAsianOption::results >, GenericEngine< VanillaOption::arguments, VanillaOption::results >, GenericEngine< Swap::arguments, Swap::results >, GenericEngine< Instr::arguments, QuantoOptionResults< Instr::results > >, GenericEngine< Bond::arguments, Bond::results >, GenericEngine< ZeroCouponInflationSwap::arguments, ZeroCouponInflationSwap::results >, GenericEngine< DividendVanillaOption::arguments, DividendVanillaOption::results >, GenericEngine< BasketOption::arguments, BasketOption::results >, GenericEngine< CPICapFloor::arguments, CPICapFloor::results >, GenericEngine< SimpleChooserOption::arguments, SimpleChooserOption::results >, DeltaVolQuote, ExtendedBlackVarianceSurface, ConstantRecoveryModel, PiecewiseZeroSpreadedTermStructure, FdHestonHullWhiteVanillaEngine, ExtendedBlackVarianceCurve, FdHestonVanillaEngine, InterestRateIndex, FloatingRateCouponPricer, CompositeQuote< BinaryFunction >, StrippedOptionletAdapter, CommodityIndex, FuturesConvAdjustmentQuote, CmsMarket, CalibrationHelper, LatticeShortRateModelEngine< Arguments, Results >, DerivedQuote< UnaryFunction >, LatticeShortRateModelEngine< CapFloor::arguments, CapFloor::results >, LatticeShortRateModelEngine< VanillaSwap::arguments, VanillaSwap::results >, LatticeShortRateModelEngine< Swaption::arguments, Swaption::results >, LatticeShortRateModelEngine< CallableBond::arguments, CallableBond::results >, ForwardSwapQuote, SmileSection, LastFixingQuote, ForwardValueQuote, LazyObject, and Claim.