Re: [QuantLib-svn] SF.net SVN: quantlib: [12795] trunk/QuantLib/ql

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib: [12795] trunk/QuantLib/ql

Luigi Ballabio
On Sat, 2007-09-22 at 09:40 -0700, [hidden email] wrote:

> Revision: 12795
>           http://quantlib.svn.sourceforge.net/quantlib/?rev=12795&view=rev
> Author:   nando
> Date:     2007-09-22 09:40:17 -0700 (Sat, 22 Sep 2007)
>
> Modified: trunk/QuantLib/ql/termstructure.hpp
> ===================================================================
> --- trunk/QuantLib/ql/termstructure.hpp 2007-09-22 13:32:21 UTC (rev 12794)
> +++ trunk/QuantLib/ql/termstructure.hpp 2007-09-22 16:40:17 UTC (rev 12795)
> @@ -102,84 +101,44 @@
>          void checkRange(const Date&,
>                          bool extrapolate) const;
>          //! time-range check
> -        void checkRange(Time,
> +        void checkRange(Time t,
>                          bool extrapolate) const;
>          bool moving_;
> +        Calendar calendar_;
>        private:
>          mutable Date referenceDate_;
>          mutable bool updated_;
>          Natural settlementDays_;
> -        Calendar calendar_;
>          DayCounter dayCounter_;
>      };

Nando,
        the calendar was private on purpose. The information should be accessed
by means of the calendar() method, not the data member. This is because
derived classes can override calendar() and have it return something
else---see ImpliedTermStructure for an example.

Luigi


--

The wisdom of the wise and the experience of the ages are perpetuated
by quotations.
-- Benjamin Disraeli



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev