Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 protected override bool checkPricerImpl(InflationCouponPricer i)
 {
     return(i is YoYInflationCouponPricer);
 }
Exemplo n.º 3
0
 //! 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);
 }
Exemplo n.º 4
0
        protected override bool checkPricerImpl(InflationCouponPricer pricer)
        {
            CPICouponPricer p = pricer as CPICouponPricer;

            return(p != null);
        }