Re: Problem in extending QuantLibXL functionality

Posted by Nicola Jean on
URL: http://quantlib.414.s1.nabble.com/Problem-in-extending-QuantLibXL-functionality-tp5520p5528.html

In stock.hpp instead of:
namespace QuantLibAddin {
    class Stock : public Instrument {
        public:
            Stock(const QuantLib::Handle<QuantLib::Quote>& quote);
    };
}
I was expecting something like
namespace QuantLibAddin {
    class Stock : public Instrument {
        public:
            Stock(const boost::shared_ptr<ObjectHandler::ValueObject>&
properties,
                      const QuantLib::Handle<QuantLib::Quote>& quote,
                      bool permanent);
    };
}

Therefore your new stock.cpp should be:

    Stock::Stock(const boost::shared_ptr<ObjectHandler::ValueObject>&
properties,
                      const QuantLib::Handle<QuantLib::Quote>& quote,
                      bool permanent):Instrument(properties, permanent){
        libraryObject_ = boost::shared_ptr<QuantLib::Stock>(
            new QuantLib::Stock(quote));
    }
Try with these two files and tell me if it works.

To Eric: is there any reason why properties and permanent variables
were not in the tutorial files?

N.Jean

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