expose to excel a function with vector of shared_ptr to objects as argument
Posted by ikku100 on Feb 12, 2014; 10:21am
URL: http://quantlib.414.s1.nabble.com/expose-to-excel-a-function-with-vector-of-shared-ptr-to-objects-as-argument-tp14962.html
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