QuantLib_Observer man page

Observer — Object that gets notified when a given observable changes.  

Synopsis

#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< 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::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< DoubleBarrierOption::arguments, DoubleBarrierOption::results >, GenericEngine< EnergyCommodity::arguments, EnergyCommodity::results >, GenericEngine< EverestOption::arguments, EverestOption::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< 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< 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 >, LatentModel< copulaPolicy > [virtual], LatentModel< GaussianCopulaPolicy > [virtual], BaseCorrelationLossModel< BaseModel_T, Corr2DInt_T > [virtual], BootstrapHelper< TS >, CalibratedModel [virtual], 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, LatentModel< copulaPolicyImpl > [virtual], LazyObject [virtual], RandomDefaultModel, RendistatoBasket, SmileSection [virtual], StochasticProcess, and TermStructure [virtual].

Public Types

typedef std::set< boost::shared_ptr< Observable > > set_type
typedef set_type::iterator iterator

Public Member Functions

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

Detailed Description

Object that gets notified when a given observable changes.

Member Function Documentation

void registerWithObservables (const boost::shared_ptr< Observer > & o)

register with all observables of a given observer. Note that this does not include registering with the observer itself.

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 MarkovFunctional, LatentModel< copulaPolicyImpl >, LatentModel< GaussianCopulaPolicy >, LatentModel< copulaPolicy >, PiecewiseDefaultCurve< Traits, Interpolator, Bootstrap >, PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, Bootstrap, Traits >, YieldTermStructure, Gsr, StochasticProcess, DefaultProbabilityTermStructure, RelativeDateBootstrapHelper< TS >, DefaultLatentModel< copulaPolicy >, FittedBondDiscountCurve, DigitalCoupon, CappedFlooredYoYInflationCoupon, RandomLM< derivedRandomLM, copulaPolicy, USNG >, RandomLM< RandomDefaultLM, copulaPolicy, USNG >, RandomLM< RandomLossLM, copulaPolicy, USNG >, BootstrapHelper< TS >, BootstrapHelper< YoYInflationTermStructure >, BootstrapHelper< ZeroInflationTermStructure >, BootstrapHelper< YoYOptionletVolatilitySurface >, BaseCorrelationTermStructure< Interpolator2D_T >, CdsHelper, FloatingRateCoupon, TermStructure, InflationIndex, GeneralizedBlackScholesProcess, InflationCoupon, CalibratedModel, CapFloorTermVolCurve, CapFloorTermVolSurface, PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits >, SabrVolSurface, CappedFlooredCoupon, GaussianLHPLossModel, AnalyticHestonHullWhiteEngine, IndexedCashFlow, FlatForward, AbcdAtmVolCurve, Basket, InflationCouponPricer, HybridHestonHullWhiteProcess, GenericEngine< ArgumentsType, ResultsType >, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, GenericEngine< EnergyCommodity::arguments, EnergyCommodity::results >, GenericEngine< ForwardOptionArguments< VanillaOption::arguments >, VanillaOption::results >, GenericEngine< HolderExtensibleOption::arguments, HolderExtensibleOption::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< NonstandardSwap::arguments, NonstandardSwap::results >, GenericEngine< VanillaStorageOption::arguments, VanillaStorageOption::results >, GenericEngine< IrregularSwaption::arguments, IrregularSwaption::results >, GenericEngine< IrregularSwap::arguments, IrregularSwap::results >, GenericEngine< ContinuousPartialFloatingLookbackOption::arguments, ContinuousPartialFloatingLookbackOption::results >, GenericEngine< TwoAssetCorrelationOption::arguments, TwoAssetCorrelationOption::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< PartialTimeBarrierOption::arguments, PartialTimeBarrierOption::results >, GenericEngine< ContinuousFloatingLookbackOption::arguments, ContinuousFloatingLookbackOption::results >, GenericEngine< NthToDefault::arguments, NthToDefault::results >, GenericEngine< CliquetOption::arguments, CliquetOption::results >, GenericEngine< OneAssetOption::arguments, OneAssetOption::results >, GenericEngine< FloatFloatSwaption::arguments, FloatFloatSwaption::results >, GenericEngine< DividendBarrierOption::arguments, DividendBarrierOption::results >, GenericEngine< ComplexChooserOption::arguments, ComplexChooserOption::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< CatBond::arguments, CatBond::results >, GenericEngine< FloatFloatSwap::arguments, FloatFloatSwap::results >, GenericEngine< BarrierOption::arguments, BarrierOption::results >, GenericEngine< ContinuousPartialFixedLookbackOption::arguments, ContinuousPartialFixedLookbackOption::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< TwoAssetBarrierOption::arguments, TwoAssetBarrierOption::results >, GenericEngine< Swap::arguments, Swap::results >, GenericEngine< NonstandardSwaption::arguments, NonstandardSwaption::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 >, GenericEngine< DoubleBarrierOption::arguments, DoubleBarrierOption::results >, DeltaVolQuote, ExtendedBlackVarianceSurface, ConstantRecoveryModel, ZeroSpreadedTermStructure, FdHestonHullWhiteVanillaEngine, FdHestonVanillaEngine, ExtendedBlackVarianceCurve, COSHestonEngine, ForwardSpreadedTermStructure, FloatingRateCouponPricer, InterestRateIndex, CompositeQuote< BinaryFunction >, StrippedOptionletAdapter, CommodityIndex, FuturesConvAdjustmentQuote, SmileSection, CmsMarket, 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, RandomDefaultModel, LastFixingQuote, ForwardValueQuote, LazyObject, and Claim.

void deepUpdate () [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 StrippedOptionletAdapter, and CompositeInstrument.

Author

Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

The man pages registerWith(3), registerWithObservables(3), set_type(3), unregisterWith(3) and unregisterWithAll(3) are aliases of QuantLib_Observer(3).

Mon Apr 30 2018 Version 1.12.1 QuantLib