Good day,
The subject says it all: I would like to expose to Excel a function which has as argument a vector of shared_ptr's. The problem is that either I do not know how to write the xml or that the scripts which generate the cpp code from the xml do not know how to handle this combination. Passing a shared_ptr works, passing a vector of objects works too. But as soon as I pass the combination, it no longer creates the object in the create_XXX.cpp file (so when the constructor is called, it has an unknown argument). Could someone tell me how to do this? Ps. below my piece of XML: <Constructor name='qlCurvesInterpolator'> <libraryFunction>CurvesInterpolator</libraryFunction> <SupportedPlatforms> <SupportedPlatform name='Excel'/> <SupportedPlatform name='Cpp'/> </SupportedPlatforms> <ParameterList> <Parameters> <Parameter name='CurveIds'> <type>QuantLib::YieldTermStructure</type> <tensorRank>vector</tensorRank> <description>curve object IDs.</description> </Parameter> </Parameters> </ParameterList> </Constructor> and the error is: error C2065: 'CurveIdsLibObjPtr' : undeclared identifier |
Hello,
On 2014-02-12 11:21, ikku100 wrote: > Good day, > > The subject says it all: I would like to expose to Excel a function > which > has as argument a vector of shared_ptr's. The problem is that either I > do > not know how to write the xml or that the scripts which generate the > cpp > code from the xml do not know how to handle this combination. > > Passing a shared_ptr works, passing a vector of objects works too. But > as > soon as I pass the combination, it no longer creates the object in the > create_XXX.cpp file (so when the constructor is called, it has an > unknown > argument). > > Could someone tell me how to do this? > > Ps. below my piece of XML: > > <Constructor name='qlCurvesInterpolator'> > <libraryFunction>CurvesInterpolator</libraryFunction> > <SupportedPlatforms> > <SupportedPlatform name='Excel'/> > <SupportedPlatform name='Cpp'/> > </SupportedPlatforms> > <ParameterList> > <Parameters> > <Parameter name='CurveIds'> > <type>QuantLib::YieldTermStructure</type> > <tensorRank>vector</tensorRank> > <description>curve object IDs.</description> > </Parameter> > </Parameters> > </ParameterList> > </Constructor> > > and the error is: > error C2065: 'CurveIdsLibObjPtr' : undeclared identifier This should do it: <Constructor name='qlCurvesInterpolator'> <libraryFunction>CurvesInterpolator</libraryFunction> <SupportedPlatforms> <SupportedPlatform name='Excel'/> <SupportedPlatform name='Cpp'/> </SupportedPlatforms> <ParameterList> <Parameters> <Parameter name='CurveIds'> <type>QuantLib::YieldTermStructure</type> <superType>libraryClass</superType> <tensorRank>vector</tensorRank> <description>curve object IDs.</description> </Parameter> </Parameters> </ParameterList> </Constructor> Kind Regards, Eric -- =================================================== Eric Ehlers nazcatech sprl | Brussels | http://www.nazcatech.be * Distributed computing for pricing analytics * Use Microsoft Excel as a client to the Grid ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |