public void setPricer(InflationCouponPricer pricer) { if (!checkPricerImpl(pricer)) { throw new Exception("pricer given is wrong type"); } if (pricer_ != null) { pricer_.unregisterWith(update); } pricer_ = pricer; if (pricer_ != null) { pricer_.registerWith(update); } update(); }
public void setPricer(InflationCouponPricer pricer) { Utils.QL_REQUIRE(checkPricerImpl(pricer), () => "pricer given is wrong type"); if (pricer_ != null) { pricer_.unregisterWith(update); } pricer_ = pricer; if (pricer_ != null) { pricer_.registerWith(update); } update(); }
protected override bool checkPricerImpl(InflationCouponPricer i) { return(i is YoYInflationCouponPricer); }
protected override bool checkPricerImpl(InflationCouponPricer pricer) { CPICouponPricer p = pricer as CPICouponPricer; return ( p != null ); }
//! makes sure you were given the correct type of pricer // this can also done in external pricer setter classes via // accept/visit mechanism protected virtual bool checkPricerImpl(InflationCouponPricer i) { return false; }
public void setPricer(InflationCouponPricer pricer) { if (!checkPricerImpl(pricer)) throw new ApplicationException("pricer given is wrong type"); if (pricer_ != null) pricer_.unregisterWith(update); pricer_ = pricer; if (pricer_ != null) pricer_.registerWith(update); update(); }
protected override bool checkPricerImpl(InflationCouponPricer pricer) { CPICouponPricer p = pricer as CPICouponPricer; return(p != null); }
protected override bool checkPricerImpl(InflationCouponPricer i) { return (i is YoYInflationCouponPricer); }
//! makes sure you were given the correct type of pricer // this can also done in external pricer setter classes via // accept/visit mechanism protected virtual bool checkPricerImpl(InflationCouponPricer i) { return(false); }