default 0*Days value for Period in QLXL

Posted by Ferdinando M. Ametrano-3 on
URL: http://quantlib.414.s1.nabble.com/default-0-Days-value-for-Period-in-QLXL-tp13153.html

Hi Eric and Plamen

I am unable to provide zero days as default value for Period in the XML specification file.
The problem is that the autogenerated code has two different constructs requiring different values ("0D" or 0*QuantLib::Days) so they cannot be satisfied at the same time.

        std::string ForwardStartCpp = ObjectHandler::convert2<std::string>(
            ObjectHandler::ConvertOper(*ForwardStart), "ForwardStart", "0D");
        [...]
        QuantLib::Period ForwardStartLib = ObjectHandler::convert2<QuantLib::Period>(
            ObjectHandler::ConvertOper(*ForwardStart), "ForwardStart", 0*QuantLib::Days);

I could provide a non-explicit string constructor for QuantLib::Period(std::string s) as solution, but something tells me Luigi might frown at this (or God forbid, even balk at this ;-)

Any suggestion or quick fix ?

ciao -- Nando

RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev