void setCorrelation( const Handle<Quote> &correlation = Handle<Quote>()) { unregisterWith(correlation_); correlation_ = correlation; registerWith(correlation_); update(); }
void setCapletVolatility( const Handle<OptionletVolatilityStructure>& v = Handle<OptionletVolatilityStructure>()) { unregisterWith(capletVol_); capletVol_ = v; registerWith(capletVol_); update(); }
void setSwaptionVolatility( const Handle<SwaptionVolatilityStructure>& v= Handle<SwaptionVolatilityStructure>()) { unregisterWith(swaptionVol_); swaptionVol_ = v; registerWith(swaptionVol_); update(); }
void YoYInflationCapFloorEngine::setVolatility( const Handle<YoYOptionletVolatilitySurface> &v) { if (!volatility_.empty()) unregisterWith(volatility_); volatility_ = v; registerWith(volatility_); update(); }
void InflationCoupon::setPricer(const boost::shared_ptr<InflationCouponPricer>& pricer) { QL_REQUIRE(checkPricerImpl(pricer),"pricer given is wrong type"); if (pricer_) unregisterWith(pricer_); pricer_ = pricer; if (pricer_) registerWith(pricer_); update(); }
void setPricer( const boost::shared_ptr<FloatingRateCouponPricer>& pricer) { if (pricer_) unregisterWith(pricer_); pricer_ = pricer; if (pricer_) registerWith(pricer_); update(); underlying_->setPricer(pricer); }
inline void Handle<T>::Link::linkTo(const boost::shared_ptr<T>& h, bool registerAsObserver) { if ((h != h_) || (isObserver_ != registerAsObserver)) { if (h_ && isObserver_) unregisterWith(h_); h_ = h; isObserver_ = registerAsObserver; if (h_ && isObserver_) registerWith(h_); notifyObservers(); } }
void setMeanReversion(const Handle<Quote>& meanReversion) { unregisterWith(meanReversion_); meanReversion_ = meanReversion; registerWith(meanReversion_); update(); }