Posted by
petercaspers on
URL: http://quantlib.414.s1.nabble.com/Return-object-in-QLXL-tp8942.html
Hi,
I have a little problem ...
There is a class KernelDensity declared as follows in the type.xml file:
<DataType defaultSuperType='libraryClass'>QuantLib::KernelDensity</DataType>
There is a second class RiskEngine with a member function which returns a shared_ptr<KerndelDensity>. In QuantLib:
boost::shared_ptr<KernelDensity> kernelDensity(string name, int method);
The xml for the declaration of this member function looks like this:
<ReturnValue>
<type>QuantLib::KernelDensity</type>
<tensorRank>scalar</tensorRank>
</ReturnValue>
When I compile the whole thing I get
error C2440: 'Initialisierung': 'boost::shared_ptr<T>' kann nicht in 'std::basic_string<_Elem,_Traits,_Ax>' konvertiert werden
with
2> T=QuantLib::KernelDensity
2> and
2> _Elem=char,
2> _Traits=std::char_traits<char>,
2> _Ax=std::allocator<char>
I did not find an example in the existing code where an object (other than native types) is returned, so can someone explain to me, how to do this?
Thanks a lot in advance, best regards
Peter
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev