|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
Object that gets notified when a given observable changes. More...
#include <ql/patterns/observable.hpp>
Public Types | |
| typedef set_type::iterator | iterator |
Public Member Functions | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
| void | registerWithObservables (const ext::shared_ptr< Observer > &) |
| Size | unregisterWith (const ext::shared_ptr< Observable > &) |
| void | unregisterWithAll () |
| virtual void | update ()=0 |
| virtual void | deepUpdate () |
Object that gets notified when a given observable changes.
| void registerWithObservables | ( | const ext::shared_ptr< Observer > & | o | ) |
register with all observables of a given observer. Note that this does not include registering with the observer itself.
|
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 AbcdAtmVolCurve, AnalyticHestonHullWhiteEngine, BaseCorrelationTermStructure< Interpolator2D_T >, Basket, BootstrapHelper< TS >, BootstrapHelper< DefaultProbabilityTermStructure >, BootstrapHelper< YieldTermStructure >, BootstrapHelper< YoYInflationTermStructure >, BootstrapHelper< YoYOptionletVolatilitySurface >, BootstrapHelper< ZeroInflationTermStructure >, CalibratedModel, CapFloorTermVolCurve, CapFloorTermVolSurface, CappedFlooredYoYInflationCoupon, CdsHelper, Claim, CmsMarket, CommodityIndex, CompositeQuote< BinaryFunction >, ConstantRecoveryModel, COSHestonEngine, DefaultLatentModel< copulaPolicy >, DefaultLatentModel< GaussianCopulaPolicy >, DefaultLatentModel< TCopulaPolicy >, DefaultProbabilityTermStructure, DeltaVolQuote, DerivedQuote< UnaryFunction >, ExtendedBlackVarianceCurve, ExtendedBlackVarianceSurface, FdHestonHullWhiteVanillaEngine, FdHestonVanillaEngine, FittedBondDiscountCurve, FlatForward, FloatingRateCouponPricer, ForwardSpreadedTermStructure, ForwardSwapQuote, ForwardValueQuote, FuturesConvAdjustmentQuote, GaussianLHPLossModel, GeneralizedBlackScholesProcess, GenericEngine< ArgumentsType, ResultsType >, GenericEngine< Arguments, Results >, 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< CatBond::arguments, CatBond::results >, GenericEngine< CdsOption::arguments, CdsOption::results >, GenericEngine< CliquetOption::arguments, CliquetOption::results >, GenericEngine< ComplexChooserOption::arguments, ComplexChooserOption::results >, GenericEngine< CompoundOption::arguments, CompoundOption::results >, GenericEngine< ContinuousAveragingAsianOption::arguments, ContinuousAveragingAsianOption::results >, GenericEngine< ContinuousFixedLookbackOption::arguments, ContinuousFixedLookbackOption::results >, GenericEngine< ContinuousFloatingLookbackOption::arguments, ContinuousFloatingLookbackOption::results >, GenericEngine< ContinuousPartialFixedLookbackOption::arguments, ContinuousPartialFixedLookbackOption::results >, GenericEngine< ContinuousPartialFloatingLookbackOption::arguments, ContinuousPartialFloatingLookbackOption::results >, GenericEngine< ConvertibleBond::arguments, ConvertibleBond::results >, GenericEngine< CPICapFloor::arguments, CPICapFloor::results >, GenericEngine< CPISwap::arguments, CPISwap::results >, GenericEngine< CreditDefaultSwap::arguments, CreditDefaultSwap::results >, GenericEngine< DiscreteAveragingAsianOption::arguments, DiscreteAveragingAsianOption::results >, GenericEngine< DoubleBarrierOption::arguments, DoubleBarrierOption::results >, GenericEngine< EnergyCommodity::arguments, EnergyCommodity::results >, GenericEngine< EverestOption::arguments, EverestOption::results >, GenericEngine< FixedVsFloatingSwap::arguments, FixedVsFloatingSwap::results >, GenericEngine< FloatFloatSwap::arguments, FloatFloatSwap::results >, GenericEngine< FloatFloatSwaption::arguments, FloatFloatSwaption::results >, GenericEngine< ForwardOptionArguments< VanillaOption::arguments >, VanillaOption::results >, GenericEngine< HimalayaOption::arguments, HimalayaOption::results >, GenericEngine< HolderExtensibleOption::arguments, HolderExtensibleOption::results >, GenericEngine< Instr::arguments, QuantoOptionResults< Instr::results > >, GenericEngine< IrregularSwap::arguments, IrregularSwap::results >, GenericEngine< IrregularSwaption::arguments, IrregularSwaption::results >, GenericEngine< MargrabeOption::arguments, MargrabeOption::results >, GenericEngine< MultiAssetOption::arguments, MultiAssetOption::results >, GenericEngine< NonstandardSwap::arguments, NonstandardSwap::results >, GenericEngine< NonstandardSwaption::arguments, NonstandardSwaption::results >, GenericEngine< NthToDefault::arguments, NthToDefault::results >, GenericEngine< OneAssetOption::arguments, OneAssetOption::results >, GenericEngine< PagodaOption::arguments, PagodaOption::results >, GenericEngine< PartialTimeBarrierOption::arguments, PartialTimeBarrierOption::results >, GenericEngine< PathMultiAssetOption::arguments, PathMultiAssetOption::results >, GenericEngine< PerpetualFutures::arguments, PerpetualFutures::results >, GenericEngine< SimpleChooserOption::arguments, SimpleChooserOption::results >, GenericEngine< SoftBarrierOption::arguments, SoftBarrierOption::results >, GenericEngine< SpreadOption::arguments, SpreadOption::results >, GenericEngine< Swap::arguments, Swap::results >, GenericEngine< Swaption::arguments, Swaption::results >, GenericEngine< SyntheticCDO::arguments, SyntheticCDO::results >, GenericEngine< TwoAssetBarrierOption::arguments, TwoAssetBarrierOption::results >, GenericEngine< TwoAssetCorrelationOption::arguments, TwoAssetCorrelationOption::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 >, Gsr, HybridHestonHullWhiteProcess, Index, InflationCouponPricer, InterpolatedPiecewiseForwardSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Linear >, InterpolatedSpreadDiscountCurve< Interpolator >, InterpolatedSpreadDiscountCurve< LogLinear >, LastFixingQuote, LatentModel< copulaPolicyImpl >, LatentModel< copulaPolicy >, LatentModel< GaussianCopulaPolicy >, LatticeShortRateModelEngine< Arguments, Results >, LatticeShortRateModelEngine< CallableBond::arguments, CallableBond::results >, LatticeShortRateModelEngine< CapFloor::arguments, CapFloor::results >, LatticeShortRateModelEngine< Swaption::arguments, Swaption::results >, LatticeShortRateModelEngine< VanillaSwap::arguments, VanillaSwap::results >, LazyObject, MarkovFunctional, PiecewiseDefaultCurve< Traits, Interpolator, Bootstrap >, PiecewiseDefaultCurve< Traits, Interpolator, Bootstrap >, PiecewiseDefaultCurve< Traits, Interpolator, IterativeBootstrap >, PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >, PiecewiseYieldCurve< detail::SpreadTraits< Traits >, Interpolator, IterativeBootstrap >, PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >, PiecewiseYieldCurve< Traits, Interpolator, IterativeBootstrap >, PiecewiseYieldCurve< traits_type, Interpolator, Bootstrap >, PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYInflationCurve< Interpolator, IterativeBootstrap, YoYInflationTraits >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, IterativeBootstrap, YoYInflationVolatilityTraits >, PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseZeroInflationCurve< Interpolator, IterativeBootstrap, ZeroInflationTraits >, RandomDefaultModel, RandomLM< derivedRandomLM, copulaPolicy, USNG >, RandomLM< RandomDefaultLM, copulaPolicy, SobolRsg >, RandomLM< RandomLossLM, copulaPolicy, SobolRsg >, RelativeDateBootstrapHelper< TS >, RelativeDateBootstrapHelper< DefaultProbabilityTermStructure >, RelativeDateBootstrapHelper< YieldTermStructure >, RelativeDateBootstrapHelper< YoYInflationTermStructure >, RelativeDateBootstrapHelper< ZeroInflationTermStructure >, SabrVolSurface, SmileSection, StochasticProcess, StrippedOptionletAdapter, template FactorSampler< USNG >, TermStructure, UltimateForwardTermStructure, YieldTermStructure, and ZeroSpreadedTermStructure.
|
virtual |
This method allows to explicitly update the instance itself and nested observers. If notifications are disabled a call to this method ensures an update of such nested observers. It should be implemented in derived classes whenever applicable
Reimplemented in Bond, CapFloor, CappedFlooredCoupon, CompositeInstrument, DigitalCoupon, StrippedOptionletAdapter, Swap, and Swaption.